Size of the footer

Hi guys,

I do not understand a lot PHP so I will need your help.
I would like to know where i can set up the limit size of the sms’s footer.
I have search in the graphical interface and i think we can’t set this value through it.
So where i can found this value in the PHP code ?

I would be very grateful if you could help me on this problem.

Thank’s a lot for the answer and for this software !

AG

maybe the DB is the limiting factor here:

CREATE TABLE playsms_tblSMSOutgoing (

p_footer varchar(30) NOT NULL DEFAULT ‘’,

i guess it is limitied there. there are other tables as well limiting this value to 30 caharacters.

1 Like

Thank you for your answer. It’s gave me motivation to find a solution.
So what I did : in the database I’ve change three table :

  • playsms_tblSMSOutgoing_queue
  • playsms_tblUser
  • playsms_tblSMSOutgoing
    Changing the size of the footer from 30 char to 100.

But it still didn’t work.

And I have found in the source code what I was looking for in /web/lib/fn_core.php (if you modify this before using the install script, I’m guessing it will work)
On my computer (after the installation) the entire path was /var/www/html/playsms/lib/fn_core.php .

At line 591 (not sure of the accuracy of this number) there is a function call “core_sanitize_footer” :

/**
 * Sanitize SMS footer
 */
function core_sanitize_footer($text) {
	$text = str_replace('"', "'", $text);
	if (strlen($text) > 30) {
		$text = substr($text, 0, 30);
	}
	
	return $text;
}

So I just change the number 30 to 100. In order to be synchronize with the database. (I guess it’s important but don’t know why).

AND it’s working !!! :smile:
The remaining problem is even with this modification, in the user setting we can’t write more than 30 char.
But if you put the long footer directly in the field of the user in the database it will work and appear everywhere on the website, thus all this modification will affect the menu “Compose message” and you can modify the footer with a maximum of 100 char.

I don’t know if everything is clear due to my not so good english.

Thanks Andre !

you are awelcome.
i just had a look in the repo on github and think you should change the following files:

web/plugin/core/user/templates/user_config.html line 22+23:

{{ HINT_MAX_ALPHANUMERIC }}

web/plugin/core/user/user_mgmnt.php line 246
s. above, comparable content.

regards,
andre