XoopsCore25
XoopsCore25 copied to clipboard
Added an option to set the default notification method for users
This applies when a new user registers themselves. It also sets the default value for the notification method in the form for adding a new user from the users admin area.
I have not added an option to core Xoops before, so this may be completely the wrong way to go about it.
To support the code changes, I (manually) ran SQL equivalent to the following against my (Xoops) database:
INSERT INTO `xoops_config` (`conf_modid`, `conf_catid`, `conf_name`, `conf_title`, `conf_value`, `conf_desc`, `conf_formtype`, `conf_valuetype`, `conf_order`)
VALUES (0, 2, 'defaultnotificationmethod', '_MD_AM_DEFAULT_NOTIFICATION_METHOD', '1', '_MD_AM_DEFAULT_NOTIFICATION_METHOD_DESC', 'select', 'int', 3);
INSERT INTO `xoops_configoption` (`confop_name`, `confop_value`, `conf_id`)
VALUES ('_MD_AM_DEFAULT_NOTIFICATION_METHOD_DISABLE', '0', (SELECT `conf_id` FROM `xoops_config` WHERE `conf_name` = 'defaultnotificationmethod')),
('_MD_AM_DEFAULT_NOTIFICATION_METHOD_PM', '1', (SELECT `conf_id` FROM `xoops_config` WHERE `conf_name` = 'defaultnotificationmethod')),
('_MD_AM_DEFAULT_NOTIFICATION_METHOD_EMAIL', '2', (SELECT `conf_id` FROM `xoops_config` WHERE `conf_name` = 'defaultnotificationmethod'));
I have little to no idea how these queries should be represented in the repository (if they should be at all). Please do let me know how I can get these queries into the repository and/or clean up this implementation (as necessary) - thanks!
Though I expect this is unfinished, I'm setting it to "Ready for review" as I don't know how to proceed without reviews/advice.
Richard (aka @Geekwright), our Core Team leader, is in process of moving, and will be available in the latter part of August to take a look into this and approve it. I hope, you can be patient till then. Thanks!
Sure, this is a case of trying to cleanly implement something that was previously hacked into a production install some years ago (not by me!). This is my attempt at a cleaner replacement and is what said install is now running. I'm just looking to future-proof this by (hopefully) getting some equivalent functionality into Xoops core. I'm open to advice on cleaning this up further. But there's no rush, it's running fine and is (somewhat) less hacky than when I started 🙂
Thank you for this proposal. We will study the code in detail for a future version of XOOPS (after the release of XOOPS 2.5.11).
I'll take care of it
was anybody else able to test it? I would like to commit it for RC3