[ABD] New User Default Settings

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
tojag
Registered User
Posts: 422
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 »

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?
User avatar
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

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

Post by Toxyy »

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!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
orynider
Translator
Posts: 271
Joined: Wed Nov 16, 2005 12:48 pm
Location: Arad, România
Name: Florin-Ciprian Bodin
Contact:

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

Post by orynider »

I will take a look. Thank You! ;)
vstrecker
Registered User
Posts: 3
Joined: Thu Aug 15, 2019 2:35 pm

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

Post by vstrecker »

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: 20646
Joined: Thu Dec 19, 2002 8:08 am

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

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
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 »

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: 20646
Joined: Thu Dec 19, 2002 8:08 am

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

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
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 »

Press submit
Goes to blank page?
the changes are made however.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

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

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
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 »

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 »

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 »

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: 3
Joined: Thu Aug 15, 2019 2:35 pm

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

Post by vstrecker »

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: 395
Joined: Mon Aug 05, 2019 1:51 pm
Name: Robert

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

Post by urzh »

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: 395
Joined: Mon Aug 05, 2019 1:51 pm
Name: Robert

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

Post by urzh »

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 1805 times
CapturFiles.png
Locked

Return to “Abandoned Extensions”