solved jrCore_format_string :: issues

PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
I am trying to put some final touches on my timeline template, but I am running into issues with the format_string options creating conflicts. I am testing all of these on Timeline>item_list.tpl>line 88 (I have a grid format so output size is a factor).

Here is a list of combinations and the associated problems in the timeline list:

jrCore_format_string:$item.profile_quota_id|jrAction_convert_hash_tags|jrCore_string_to_url|jrCore_strip_html|truncate:170}

Truncates properly, but no @ or # tag links and will show long url addresses instead of item title in action description, when url address is pasted into share action (when sharing a link).

jrCore_format_string:$item.profile_quota_id|jrAction_convert_hash_tags|jrCore_strip_html|truncate:170}

Truncates properly, but no individual hyper-links, but entire description links to action detail.

jrCore_format_string:$item.profile_quota_id|jrAction_convert_hash_tags|truncate:170}

Does not work... Breaks page

jrCore_format_string:$item.profile_quota_id|jrAction_convert_hash_tags|jrCore_clickable_urls|truncate:170}

Does not work... Breaks page

jrCore_format_string:$item.profile_quota_id|jrAction_convert_hash_tags|jrCore_string_to_url|truncate:170}

Does not work... Breaks page

I think the issue is with the truncate, but I am not sure.

Ultimately, I would like to modify a version of jrCore_clickable_urls to make the links pop-out into a lightbox viewer/player... but I need to get the truncate issue fixed first. So that individual links, like the @ and # tags, are working properly.

Thanks any help on this. :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 09/25/16 02:56:19AM
michael
@michael
8 years ago
7,715 posts
yep the issue is probably truncate. Truncate just cuts the string off at 170 characters no matter what.

<a href="https://www.jamroom.net/the-jamroom-network/forum/new_posts/41144/jrcore-format-string-issues">The link to this page</a>

If you're thinking that the 170 characters is just the text inside the href, better think again, its everything. So cutting it off is always a bad idea in my mind.

As for the jrCore_format_string issue

Docs: "{jrCore_format_string}"
https://www.jamroom.net/the-jamroom-network/documentation/development/1437/jrcore-format-string

The jrCore_format_string is just one of the piped converters you are applying to the variable
{$some_var|first_converter|second_converter|third_converter}

They run in order, so if the first_converter turns all @tags into html links, then the second_converter strips all html, then the second one is stripping the work the first one did.

Try truncate as the first converter then run all your stuff after that.

Tags