[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!
Scam Warning
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
tojag
Registered User
Posts: 400
Joined: Thu Aug 07, 2014 8:00 am
Location: Warsaw, Poland, EU
Name: Gregory

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

Post by tojag » Tue Jan 22, 2019 11:59 am

Tarantino wrote:
Tue Jan 22, 2019 11:47 am
I've already an extension for forcing new profile fields.
Can You write me where can I find it?
Sorry my english. I hope You understand what I mean.

User avatar
Toxyy
Registered User
Posts: 702
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

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

Post by Toxyy » Fri Jan 25, 2019 9:16 pm

Thanks for this david :D
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

My extensions:
[3.2][BETA] Anonymous Posts || [3.2][BETA] Sticky Ad || [3.2][RC] Show User Activity ||
[3.2][DEV] User Delete Topics

User avatar
orynider
Registered User
Posts: 250
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin Bodin
Contact:

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

Post by orynider » Mon Feb 18, 2019 12:28 am

I will take a look. Thank You! ;)

vstrecker
Registered User
Posts: 2
Joined: Thu Aug 15, 2019 2:35 pm

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

Post by vstrecker » Thu Aug 15, 2019 2:39 pm

Hi, love this extension and the main switch to auto notify can be set. others creates an error. PHP 7.2. Thank you for any help.

[Thu Aug 15 16:13:02.372082 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'david63\\userdefaults\\controller\\constants' not found in /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php:248, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372162 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: Stack trace:, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372173 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #0 /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php(112): david63\\userdefaults\\controller\\admin_controller->set_options(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372183 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #1 /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/acp/userdefaults_module.php(26): david63\\userdefaults\\controller\\admin_controller->display_options(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372193 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #2 /var/www/vhosts/forum.myforum.com/httpdocs/includes/functions_module.php(676): david63\\userdefaults\\acp\\userdefaults_module->main('\\\\david63\\\\userde...', 'manage'), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372203 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #3 /var/www/vhosts/forum.myforum.com/httpdocs/adm/index.php(82): p_master->load_active(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372214 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #4 {main}, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372224 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: thrown in /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php on line 248, referer: https://forum.myforum.com/adm/index.php ... ode=manage

User avatar
david63
Registered User
Posts: 16680
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » 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
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

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 » Tue Aug 27, 2019 1:34 pm

After install extension does not show up at ACP->CUSTOMISE?
unzip to sub-directory ext/userdefaults-3.2
also tried unzip to sub-directory ext/travis/userdefaults-3.2
also tried unzip to sub-directory ext/travis/userdefaults
PHP 7.2
phpbb 3.2.7

User avatar
david63
Registered User
Posts: 16680
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Tue Aug 27, 2019 1:40 pm

The correct directory structure is [root]/ext/david63/userdefaults
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

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 » Tue Aug 27, 2019 2:01 pm

Press submit
Goes to blank page?
the changes are made however.

User avatar
david63
Registered User
Posts: 16680
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

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

Post by david63 » Tue Aug 27, 2019 2:18 pm

davye wrote:
Tue Aug 27, 2019 2:01 pm
Press submit
Goes to blank page?
the changes are made however.
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
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

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 » Tue Aug 27, 2019 3:26 pm

I looked at it
could you desk check and spot anything obviously hosed?

the bug is in all the follow commented lines

echo "phpbb_optionset";
//$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']));
echo "poop";



the function is:
function phpbb_optionset($bit, $set, $data)
{
if ($set && !($data & 1 << $bit))
{
$data += 1 << $bit;
}
else if (!$set && ($data & 1 << $bit))
{
$data -= 1 << $bit;
}

return $data;
}

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 » Tue Aug 27, 2019 4:22 pm

fixed it but maybe not the way you would do it!

the constants:: are undefined

I set an array
$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);

replaced for example
constants::ATTACHSIG with array element $keyoptions['attachsig']

thanks for you help
david

enjoy the vacation

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 » Wed Aug 28, 2019 11:36 pm

There was another bug - code did build the bitfield
The correction is in admin_controller.php

$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 />";

vstrecker
Registered User
Posts: 2
Joined: Thu Aug 15, 2019 2:35 pm

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

Post by vstrecker » Wed Oct 02, 2019 7:02 am

vstrecker wrote:
Thu Aug 15, 2019 2:39 pm
Hi, love this extension and the main switch to auto notify can be set. others creates an error. PHP 7.2. Thank you for any help.

[Thu Aug 15 16:13:02.372082 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'david63\\userdefaults\\controller\\constants' not found in /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php:248, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372162 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: Stack trace:, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372173 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #0 /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php(112): david63\\userdefaults\\controller\\admin_controller->set_options(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372183 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #1 /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/acp/userdefaults_module.php(26): david63\\userdefaults\\controller\\admin_controller->display_options(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372193 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #2 /var/www/vhosts/forum.myforum.com/httpdocs/includes/functions_module.php(676): david63\\userdefaults\\acp\\userdefaults_module->main('\\\\david63\\\\userde...', 'manage'), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372203 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #3 /var/www/vhosts/forum.myforum.com/httpdocs/adm/index.php(82): p_master->load_active(), referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372214 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: #4 {main}, referer: https://forum.myforum.com/adm/index.php ... ode=manage
[Thu Aug 15 16:13:02.372224 2019] [fcgid:warn] [pid 10695] [client 216.233.116.18:51514] mod_fcgid: stderr: thrown in /var/www/vhosts/forum.myforum.com/httpdocs/ext/david63/userdefaults/controller/admin_controller.php on line 248, referer: https://forum.myforum.com/adm/index.php ... ode=manage
May I ask in regards to this one. I have the problem that I need t set email notification for being quoted by default. If anybody would have a sql query I could run with cron it would temporary help too. Thank you.

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

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

Post by urzh » Tue Oct 08, 2019 6:24 pm

Have the same issue where I make a change and hit submit, it throws a 500 HTTP blank page. When I go back, it shows it acepted my change but it's not taking effect. Example was for "Notify the user upon replies by default:"

No errors in Error log

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

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

Post by urzh » Tue Oct 08, 2019 6:29 pm

davye wrote:
Wed Aug 28, 2019 11:36 pm
There was another bug - code did build the bitfield
The correction is in admin_controller.php

$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 />";
I installed the latest master and the bug doesnt exist in it. But I have another issue. It looks like the setting isn't taking effect? Screenshots:
CapturFiles_1.png
CapturFiles_1.png (25.67 KiB) Viewed 201 times
CapturFiles.png

Post Reply

Return to “Extensions in Development”

cron