Page 2 of 3

PostPosted: Sun Aug 20, 2006 8:54 am
Author: Pggar
I was checking the code and there seems to be no bug. The problem lies in the fact that the code is not checking any of those limits.

Here's the code from profilcp_profil_signature.php:

Code: Select all
     if ( $signature != '' )     {         if ( strlen($signature) > $board_config['max_sig_chars'] )         {             $error = true;             $error_msg .= ( ( isset($error_msg) ) ? '<br>' ];         }         if ( !isset($signature_bbcode_uid) || $signature_bbcode_uid == '' )         {             $signature_bbcode_uid = ( $view_userdata['user_allowbbcode'] ) ? make_bbcode_uid() : '';         }         $signature = prepare_message($signature, $view_userdata['user_allowhtml'], $view_userdata['user_allowbbcode'], $view_userdata['user_allowsmile'], $signature_bbcode_uid);           $view_userdata['user_sig'] = $signature;         $view_userdata['user_sig_bbcode_uid'] = $signature_bbcode_uid;     }  


If I understood that correctly, it is only checking the "max_sig_chars". At least that's the only time it sets an error message. The funcion prepare_message only checks if HTML is enabled or not.


After that we have the following code:

Code: Select all
     if ( $error )     {         message_die(GENERAL_ERROR, $error_msg);     }     if (!$error && !$preview)     {         $sql = "UPDATE " . USERS_TABLE . "                 SET                     user_sig = '" . $signature . "',                     user_sig_bbcode_uid = '" . $signature_bbcode_uid . "'                 WHERE                     user_id = " . $view_userdata['user_id'];         if ( !$result = $db->sql_query($sql) )         {             message_die(GENERAL_ERROR, 'Could not update user table', '', __LINE__, __FILE__, $sql);         }     }  


If there was no error with the "max_sig_chars" checking and you're not trying to preview your sig, the board procedes to save the signature to your database.

If I had a bit more knowledge of php I would procede and mod that file so it checks everything it was supposed to check. Since I do not have it, I'll wait for you guys to do it. Meanwhile, I'll check if that code is not lost somewhere else in the code, cause I remenber that when the signature didn't have a separate page the limits worked fine.


Edit 1]Edit 2[/color]: I analysed the mod code. There is a lot of code that was not added to IM. The only part that seems to have been added was the editing of values on the ACP. All the code for checking the values was not included. I'll do some tests with the code once I finish some other adjustments on my board. I'll let you know what happens.

Re: Signature settings in ACP are not applied

PostPosted: Sun Aug 20, 2006 10:59 am
Author: Angelus
Thanks Pggar. But it is really surprising, that the interest of this topic is so small. I think the signature settings are rather important.

I'm very interested in fixing this problem

Greetings
Thorsten

PostPosted: Sun Aug 20, 2006 12:26 pm
Author: Pggar
It looks like all we have to do is complete the mod installation.
However, we should install it on profilcp_profil_signature.php.

I didn't have the time to analyse the code from that file to see if it is very different from the original signature code. I believe they are quite similar. In that case, the mod installation should be straightforward.

The bad news is, if you're counting on me, I should be able to check the mod only next week. So, you'll have to wait a bit.

Re: Signature settings in ACP are not applied

PostPosted: Sat Aug 26, 2006 12:51 am
Author: Angelus
Ok thanks I have time. This problem lasts long time yet <img>

Just let me/us know if you solved the problem.

Greetings
Thorsten

Re: Signature settings in ACP are not applied

PostPosted: Sat Aug 26, 2006 11:52 am
Author: Teelk
This has been fixed in the latest beta revision. I'll backport the changes for you when I get the chance. If I don't post the fix within the next couple of days, feel free to bump this post so I don't forget.

Re: Signature settings in ACP are not applied

PostPosted: Sat Aug 26, 2006 12:49 pm
Author: Angelus
Great thank you!!!

Greetings
Thorsten

Re: Signature settings in ACP are not applied

PostPosted: Thu Sep 07, 2006 7:16 am
Author: Angelus
@ Teelk: What's about the changes to fix that problem?

Greetings
Thorsten

PostPosted: Fri Sep 08, 2006 4:46 pm
Author: lordtopcat
I don't know if this applies too, but my Signature settings stay the same, but don't take effect.

I have a maximum of 3 signautre lines set in the config, and yet I can create more lines than that.

PostPosted: Fri Sep 08, 2006 6:51 pm
Author: Master Dwarf
"lordtopcat";p="15129" wrote:I don't know if this applies too, but my Signature settings stay the same, but don't take effect.

I have a maximum of 3 signautre lines set in the config, and yet I can create more lines than that.


I have run into restrictions on the signature length limit, but I wouldn't doubt that something is amuck.

PostPosted: Sat Sep 09, 2006 2:53 pm
Author: IntegraMOD
I am not sure but I think that changing sig settings will not change current signatures but just enforce anything new.

Re: Signature settings in ACP are not applied

PostPosted: Sun Sep 10, 2006 1:28 am
Author: Angelus
That's correct. If you change the settings and want to apply them to all users you have to RESET the signatures.

Greetings
Thorsten

Re: Signature settings in ACP are not applied

PostPosted: Sat Sep 23, 2006 6:56 pm
Author: Teelk
Sorry everyone, I was without an internet connection for a while. But, I'm back now and I'll try and have these changes as soon as possible. May take me some time though, since it's been a few weeks since I made the changes to the beta, I've kinda forgotten what those changes were. I can look them up though...

Re: Signature settings in ACP are not applied

PostPosted: Sat Sep 23, 2006 8:40 pm
Author: Helter
you are correct that these qurries were missed by the phpbb_to_140_update

Code: Select all
INSERT INTO `phpbb_config` VALUES ('sig_max_lines', '5');INSERT INTO `phpbb_config` VALUES ('sig_wordwrap', '100');INSERT INTO `phpbb_config` VALUES ('sig_allow_font_sizes', '1');INSERT INTO `phpbb_config` VALUES ('sig_min_font_size', '7');INSERT INTO `phpbb_config` VALUES ('sig_max_font_size', '12');INSERT INTO `phpbb_config` VALUES ('sig_allow_bold', '1');INSERT INTO `phpbb_config` VALUES ('sig_allow_italic', '1');INSERT INTO `phpbb_config` VALUES ('sig_allow_underline', '1');INSERT INTO `phpbb_config` VALUES ('sig_allow_colors', '1');INSERT INTO `phpbb_config` VALUES ('sig_allow_quote', '0');INSERT INTO `phpbb_config` VALUES ('sig_allow_code', '0');INSERT INTO `phpbb_config` VALUES ('sig_allow_list', '0');INSERT INTO `phpbb_config` VALUES ('sig_allow_url', '1');INSERT INTO `phpbb_config` VALUES ('sig_allow_images', '1');INSERT INTO `phpbb_config` VALUES ('sig_max_images', '0');INSERT INTO `phpbb_config` VALUES ('sig_max_img_height', '75');INSERT INTO `phpbb_config` VALUES ('sig_max_img_width', '500');INSERT INTO `phpbb_config` VALUES ('sig_allow_on_max_img_size_fail', '0');INSERT INTO `phpbb_config` VALUES ('sig_max_img_files_size', '10');INSERT INTO `phpbb_config` VALUES ('sig_max_img_av_files_size', '0');INSERT INTO `phpbb_config` VALUES ('sig_exotic_bbcodes_disallowed', '');INSERT INTO `phpbb_config` VALUES ('sig_allow_smilies', '1');



you can run these through phpmyadmin for now.

PostPosted: Sun Oct 15, 2006 12:51 pm
Author: Merrillizer
I did those insertions, but still no sig. The settings are now taking in the ACP, but still nothing on the board.

Re: Signature settings in ACP are not applied

PostPosted: Fri Jan 05, 2007 10:20 am
Author: Whisky
Just find this thread now, applied the fix and that solved my problem.

I am unconsciously replying to pull the subject out of infinite spirals of forgotten to be sure the fix will be applied for 1.4.1 <img>