[SOLVED] Looking for a kind of ON/OFF switch Inputfield for my GroupMailer module
Recently Browsing 0 members
No registered users viewing this page.
for my GroupMailer module I've created a custom Fieldtype + Inputfield module which provides multi-column field values. The first field column is a visible text field and there are some other columns which are not presented to user (they are rendered as hidden form fields).
This is the database schema:
$schema['data'] = 'text NOT NULL'; // we're using 'data' to represent our 'subject' field $schema['sendstatus'] = 'tinyint NOT NULL DEFAULT 0'; // message send status $schema['recipients'] = "int(10) unsigned NOT NULL DEFAULT 0"; // recipients counter $schema['sent'] = "int(10) unsigned NOT NULL DEFAULT 0"; // sent counter $schema['started'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending start $schema['finished'] = "int(10) unsigned NOT NULL DEFAULT 0"; // message sending finished This are the ___wakeupValue and ___sleepValue methods:
Now I try to extend this Fieldtype/Inputfield to provide multi language features.
Only the first value ("data" which represents the "subject" field) should be/needs to be multi language!
I had a look at the built in Fieldtypes (e.g FieldtypeText & FieldtypeTextLanguage) which provides multi language support but I couldn't find a similar case (multi-value field with language support). All built in Fieldtypes are single-value fields.
I know this is a very "general" question but maybe somebody could push me in the right direction?
I'm starting the port of my MODX add-on GoodNews - a powerful integrated group and newsletter mailing system - to Processwire:
I know I'll have a long and hard way to go... 🙂
In order to plan the basic principles for my module in advance, here is my first question (more will come, that's for sure):
GoodNews Subscribers are basically MODX users extended with the necessary meta informations to handle subscriptions and other mailing related stuff. The benefit for a subscriber being a MODX user is that it I also can use the permission system of MODX. How should I handle this in Processwire? Should subscribers also be Processwire users? Or is it better to use a custom user type? How will processwire handle lists of thousands of users?
Thanks in advance for your help!
Under MODX my Newsletter Add-On manages all mailings in its own resource containers. This is comparable to a PW page, which serves as a container for subpages.
My newsletter module GroupMailer will also provide an administration console where you can start, stop and generally manage mailings + allows you to watch the sending status.
What would you recommend as an experienced PW user? How should the mailings be managed in the PW module? I want to follow the PW paradigms as much as possible and also offer the greatest possible flexibility.
Here is a screenshot from the MODX version:
Greetings, and a Happy New Year!