How to limit length of update in Timeline Posts?
Ning To Jamroom
Hi Michael -
I found this in the template code for item_list.tpl in the templates for the timeline module:
{$item.action_text|jrCore_format_string:$item.profile_quota_id|jrCore_strip_html|truncate:160}
Should I leave that? or replace it with the code you gave me:
{$item.action_text|jrCore_format_string:$item.profile_quota_id|truncate:{$_conf.jrAction_max_length|intval}}
Or do something else with it?
Again, I want to limit the amount they type into the timeline update to 140 characters.
Thanks!
Deb
michael:
That "Max Update Length" will show in the textbox as they are typing counting down to the 0 for the number of characters they are allowed to use.
But its not enforced, so if they do go over it, it will still display by default. It just sets a config variable:
{$_conf.jrAction_max_length}
that can be used if desired. Most of the default skins don't use it.
If you want to enforce it, adjust the jrAction -> TEMPLATES -> item_list.tpl -> MODIFY
from this:
{$item.action_text|jrCore_format_string:$item.profile_quota_id}
to
{$item.action_text|jrCore_format_string:$item.profile_quota_id|truncate:{$_conf.jrAction_max_length|intval}}
That will force the sting to truncate at the set limit.
Docs: "Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/3183/using-the-template-editor