variables length

Status
Not open for further replies.

cemotyz09

Member
Apr 23, 2020
83
7
8
I'm trying to make a global variable for conferences, the full command should be
Code:
video_logo_path={position=left-bot,text_x=center,center_offset=190,text=#000000:transparent:/usr/share/fonts/dejavu/DejaVuSansMono.ttf:50:'${toupper ${caller_id_name}}',alt_text_x=center,alt_center_offset=190,alt_text_y=88,alt_text=#ffffff:transparent:/usr/share/fonts/dejavu/DejaVuSansMono.ttf:'${caller_id_number}'}${images_dir}/signalwire.png
but putting that into the variables when I eval the variable it is cut off and only
Code:
{position=left-bot,text_x=center,center_offset=190,text=#000000:transparent:/usr/share/fonts/dejavu/DejaVuSansMono.ttf:50:'%{toupper %{caller_id_name}}',alt_text_x=center,alt_center_offset=190,alt_text_y=88,alt_text=#ffffff:transparent:/usr/share/fonts/de
shows. Is there a way to increase the amount of text allowed in the variables text?
 

whut

Member
Dec 23, 2022
164
15
18
Saving the edit of vars limits to 255 characters. You would need to increase the maximum size in /var/www/fusionpbx/app/vars/var_edit.php from 255 to more than 355 to accommodate the length of your variable.
from:
echo " <input class='formfld' type='text' name='var_value' maxlength='255' value=\"".escape($var_value)."\">\n";
to this or similar:
echo " <input class='formfld' type='text' name='var_value' maxlength='400' value=\"".escape($var_value)."\">\n";

After you test this as working you can submit a pull request to the fusionpbx project so you are not fighting revision control issues.

You may want to consider adding it to default settings, which would not require any code changes as above.
 
Last edited:

cemotyz09

Member
Apr 23, 2020
83
7
8
Thank you, are you saying default settings doesn't have this limitation? If not, that would be the better route.
 

whut

Member
Dec 23, 2022
164
15
18
Correct. Values in default settings are not limited to 255 characters. type=text would be advisable. You could make your own category or use the conferences or theme category. Perhaps theme would be best as it looks like what you are trying to do could be considered branding/rebranding/white-labeling. You can set this as the default (global) in default settings and you can also copy it into domains and have variations to the variable to provide variations per domain if desired.

It would be interesting to see your full implementation.
 

cemotyz09

Member
Apr 23, 2020
83
7
8
No I'm just testing out the verto communicator but maybe I will be able to make something interesting.
 
Status
Not open for further replies.