[3.2][RC] New User Default Settings

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
davye
Registered User
Posts: 20
Joined: Mon Aug 19, 2019 12:49 pm

Re: [3.2][RC] New User Default Settings

Post by davye »

Your description is exactly the manifestation of the bug that I fixed on my system.
I don't know what david63 did to the file on github but it still has the bug

here is the complete fix before(commented code) and after (uncomment the print_r's and echo's to see how it works.

Code: Select all

    protected function set_options()
    {
        $this->config->set('ud_allow_massemail', $this->request->variable('ud_allow_massemail', 0));
        $this->config->set('ud_allow_pm', $this->request->variable('ud_allow_pm', 0));
        $this->config->set('ud_allow_viewemail', $this->request->variable('ud_allow_viewemail', 0));
        $this->config->set('ud_date_format', $this->request->variable('ud_date_format', ''));
        $this->config->set('ud_moderation_queue', $this->request->variable('ud_moderation_queue', 0));
        $this->config->set('ud_notify', $this->request->variable('ud_notify', ''));
        $this->config->set('ud_notify_pm', $this->request->variable('ud_notify_pm', ''));
        //echo "phpbb_optionset" . "<br />";
        //echo $this->config['ud_options'] . "<br />";

        // this was experiment - $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);

        //echo $keyoptions['attachsig'] . "<br />";
        //echo $this->request->variable('ud_sig', 0)."<br />";
        //echo $this->config['ud_options']."<br />";

        //$this->config->set('ud_options', phpbb_optionset(constants::ATTACHSIG, $this->request->variable('ud_sig', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::BBCODE, $this->request->variable('ud_bbcode', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::SMILIES, $this->request->variable('ud1_smilies', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWAVATARS, $this->request->variable('ud_avatars', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWCENSORS, $this->request->variable('ud_wordcensor', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWFLASH, $this->request->variable('ud_flash', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWIMG, $this->request->variable('ud_images', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWSIGS, $this->request->variable('ud_sigs', 0), $this->config['ud_options']));
        //$this->config->set('ud_options', phpbb_optionset(constants::VIEWSMILIES, $this->request->variable('ud_smilies', 0), $this->config['ud_options']));

        //print_r($udconstants);
        //print_r($this->request);
        //print_r($this->constants);

        $bitfield = $this->config['ud_options'];
        //echo decbin($bitfield) . "<br />";

        $bitfield = phpbb_optionset($this->constants['attachsig'], $this->request->variable('ud_sig', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['bbcode'], $this->request->variable('ud_bbcode', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['smilies'], $this->request->variable('ud1_smilies', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewavatars'], $this->request->variable('ud_avatars', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewcensors'], $this->request->variable('ud_wordcensor', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewflash'], $this->request->variable('ud_flash', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewimg'], $this->request->variable('ud_images', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewsigs'], $this->request->variable('ud_sigs', ''), $bitfield);
        $bitfield = phpbb_optionset($this->constants['viewsmilies'], $this->request->variable('ud_smilies', ''), $bitfield);
        $this->config->set('ud_options', $bitfield);

        //echo decbin($bitfield) . "<br />";

        $this->config->set('ud_post_sd', $this->request->variable('post_sd', 'a'));
        $this->config->set('ud_post_sk', $this->request->variable('post_sk', 't'));
        $this->config->set('ud_post_st', $this->request->variable('post_st', 0));
        $this->config->set('ud_topic_sd', $this->request->variable('topic_sd', 'd'));
        $this->config->set('ud_topic_sk', $this->request->variable('topic_sk', 't'));
        $this->config->set('ud_topic_st', $this->request->variable('topic_st', 0));
        $this->config->set('ud_type_bookmark', $this->request->variable('ud_type_bookmark', 0));
        $this->config->set('ud_type_group', $this->request->variable('ud_type_group', 0));
        $this->config->set('ud_type_needs_approval', $this->request->variable('ud_type_needs_approval', 0));
        $this->config->set('ud_type_pm', $this->request->variable('ud_type_pm', 0));
        $this->config->set('ud_type_post', $this->request->variable('ud_type_post', 1));
        $this->config->set('ud_type_quote', $this->request->variable('ud_type_quote', 0));
        $this->config->set('ud_type_report', $this->request->variable('ud_type_report', 0));
        $this->config->set('ud_type_topic', $this->request->variable('ud_type_topic', 1));

		$this->config->set('ud_type_subfor', $this->request->variable('ud_type_subfor', 1));

        //$this->config->set('ud_options', phpbb_optionset(constants::ATTACHSIG, $this->request->variable('ud_sig', 0), $this->config['ud_options']));

    }
urzh
Registered User
Posts: 239
Joined: Mon Aug 05, 2019 1:51 pm
Name: Robert

Re: [3.2][RC] New User Default Settings

Post by urzh »

Thank you. I implemented and its working fine. But, this option: "Notify me when a reply is posted" is still not ticking when i draft a new post after I set it to yes: "Notify the user upon replies by default:" I purged cache
urzh
Registered User
Posts: 239
Joined: Mon Aug 05, 2019 1:51 pm
Name: Robert

Re: [3.2][RC] New User Default Settings

Post by urzh »

Oh. I realized this is for NEW users. So anyone making new accounts will get the setting. Hmm ok.
User avatar
DavideBianchini
Registered User
Posts: 72
Joined: Thu Oct 17, 2019 3:47 am

Re: [3.2][RC] New User Default Settings

Post by DavideBianchini »

Subscribing, hoping for an official fix soon...
User avatar
dingus33
Registered User
Posts: 136
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][RC] New User Default Settings

Post by dingus33 »

i'm hoping for an update too 🙏
Miri4ever
Registered User
Posts: 494
Joined: Sat Mar 07, 2015 11:18 am
Contact:

Re: [3.2][RC] New User Default Settings

Post by Miri4ever »

It seems the last update brokes a lot of things inside the ext. I can not post everything here for security reasons but I think an important file is somewhere missing since last PHPBB 3.3 Compatible update inside the controller.

Code: Select all

Fehler: The file "ud_constants.yml" does not exist (in: /home/www/xxx/ext/david63/userdefaults/config) in ud_constants.yml (which is being imported from "/home/xxx/html/xxxx/ext/david63/userdefaults/config/services.yml").
Homepage: Terra Oceanica

Extension Developments:
My PHPBB Special SFX Codes / PHPBB Games: Solitaire, 2048, Breakout, Hextris, LINX
My PHPBB MChat Games: Dice Poker, Black Jack, Red or Black, Hi / Lo Game.
User avatar
DavideBianchini
Registered User
Posts: 72
Joined: Thu Oct 17, 2019 3:47 am

Re: [3.2][RC] New User Default Settings

Post by DavideBianchini »

david63 wrote: ↑
Thu Aug 15, 2019 8:46 pm
Sorry but I am on holiday at the moment - I will look at it when I get back in three weeks time
Any updates yet David?

anxiously awaiting a fix...

-Davide
Cubguy501
Registered User
Posts: 138
Joined: Mon Feb 07, 2011 8:39 pm

Re: [3.2][RC] New User Default Settings

Post by Cubguy501 »

Has a problem running on phpbb 3.3

when u change an option and hit submit

Code: Select all

Fatal error: Uncaught Error: Class 'david63\userdefaults\controller\constants' not found in /hotdog/ext/david63/userdefaults/controller/admin_controller.php:248 Stack trace: #0 hotdog/ext/david63/userdefaults/controller/admin_controller.php(112): david63\userdefaults\controller\admin_controller->set_options() #1 /htdocs/hotdog/ext/david63/userdefaults/acp/userdefaults_module.php(26): david63\userdefaults\controller\admin_controller->display_options() #2 /hotdog/includes/functions_module.php(676): david63\userdefaults\acp\userdefaults_module->main('\\david63\\userde...', 'manage') #3 //htdocs/hotdog/adm/index.php(81): p_master->load_active() #4 {main} thrown in //hotdog/ext/david63/userdefaults/controller/admin_controller.php on line 248
Cubguy501
Registered User
Posts: 138
Joined: Mon Feb 07, 2011 8:39 pm

Re: [3.2][RC] New User Default Settings

Post by Cubguy501 »

Also,

When changing the Notification settings the button just toggles from "notification" to "email" when u can actually set both to "yes" . Seems like you should be able to set both to "on" or have a "both" button.
User avatar
warmweer
Jr. Extension Validator
Posts: 6504
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [3.2][RC] New User Default Settings

Post by warmweer »

Cubguy501 wrote: ↑
Thu Apr 02, 2020 12:51 pm
Has a problem running on phpbb 3.3
Which is something not entirely unthinkable with an extension for 3.2 which has not been validated even (it does explicitly mention RC so that implies: only use on a live board after testing on a test board).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
Cubguy501
Registered User
Posts: 138
Joined: Mon Feb 07, 2011 8:39 pm

Re: [3.2][RC] New User Default Settings

Post by Cubguy501 »

warmweer wrote: ↑
Thu Apr 02, 2020 2:30 pm
Cubguy501 wrote: ↑
Thu Apr 02, 2020 12:51 pm
Has a problem running on phpbb 3.3
Which is something not entirely unthinkable with an extension for 3.2 which has not been validated even (it does explicitly mention RC so that implies: only use on a live board after testing on a test board).
AHH yes very much understood. however the author did implicate in another topic that the extension would work on 3.3

Anyhow it does have a problem running on 3.3
User avatar
david63
Registered User
Posts: 19040
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: [3.2][RC] New User Default Settings

Post by david63 »

Just for the record - I will look at it when I get time. There are times when life takes over and at the moment it has.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
Cubguy501
Registered User
Posts: 138
Joined: Mon Feb 07, 2011 8:39 pm

Re: [3.2][RC] New User Default Settings

Post by Cubguy501 »

Ok sir not a problem. thanks for all your hard work.

For us there isnt much to do... There isnt much "life" as were more or less stuck in our homes. :(
User avatar
warmweer
Jr. Extension Validator
Posts: 6504
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [3.2][RC] New User Default Settings

Post by warmweer »

Cubguy501 wrote: ↑
Fri Apr 03, 2020 2:12 pm
For us there isnt much to do... There isnt much "life" as were more or less stuck in our homes. :(
Being forced to stay home a lot more than usual, I've discovered that there's a lot more life at home than I ever knew or wanted. Funny thing I noticed today in the supermarket, apparently there's a shortage of mousetraps and pesticides. :P
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
User avatar
CREGOPHER
Registered User
Posts: 26
Joined: Wed Mar 25, 2020 2:54 pm

Re: [3.2][RC] New User Default Settings

Post by CREGOPHER »

This is a much needed feature. I am not sure why the base phpbb software doesn't provide a means of doing this but this does the job. I was able to install but after I have changed the settings to my preference and hit "submit" a the bottom, i just get a blank screen. If I navigate back to the extension's setting screen all of the settings revert back to the starter defaults of your extension (except date format). Is this because I have not done the donate at the bottom yet? I do not mind the donation as all but I want to be sure that is what my problem is.

Thanks,
Post Reply

Return to “Extensions in Development”