Hi
I am trying to increase the character limit in the shoutbox but no matter what value I put in the box, it doesn't increase and stays at 300
What am I doing wrong? :hmm: :doh:
Thanks for any help
Hi Kim. What version of SMF and TinyPortal are you running please?
I think 300 is the maximum allowed without modifying the code. There should I guess be a note added to that setting stating this to save confusion.
I'm running SMF 2.0.17 and TP 1.6.4
How do alter the code please?
Kim you should really upgrade because there was security issues with TinyPortal prior to versions older than 1.6.6
But in answer to your question, In sources find file TPShout.php
Around line 175 you should find,
$shout = $smcFunc['htmlspecialchars'](substr($_POST['tp_shout'], 0, 300));
Change the 300 on the end of that line to 500 and save
Thank you and I'll upgrade asap O0
The 300 characters max surprised me a little: we have a setting for it, never realized that there is also a maximum coded. I think it will update that to use the maxlength setting from the shoutbox
Well to be honest I wasn't sure if the hard coded limit was still supposed to be there since you can enter any number in the shout settings. But that limit has been in the code for a long time tbh.
Just checked it: you can use any number in the settings, but due to the hard-coded 300 it will always stop at 300, even if the setting is set higher...
Quote from: @rjen on March 07, 2021, 08:15:03 PM
Just checked it: you can use any number in the settings, but due to the hard-coded 300 it will always stop at 300, even if the setting is set higher...
Yep, that's why I mentioned the workaround edit to the line above. Pretty sure changing that line worked for me when I tried it.
Fixed it for 2.1.0