How to strip jrEmbed tags?

SteveX
SteveX
@ultrajam
11 years ago
2,589 posts
I have a textarea which allows jrEmbed

I can show that in a template like this:
{$proj_summary|jrCore_format_string:$item.profile_quota_id|jrEmbed_embed}

But how do I strip the tags out if I want to use that in a briefer list row template?
If I remove the jrEmbed_embed modifier or use |strip_tags I see the unmodified tag in the output:
jrEmbed module="jrAudio" id="30"
It prints the square brackets as well, but the forum won't display that

Thanks!


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 03/26/14 06:17:07AM
brian
@brian
11 years ago
10,149 posts
If you are using jrCore_format_string, you're running jrEmbed twice. jrCore_format_string will run all the modifiers that are active in the quota for the profile that created the item (you can turn on/off string formatters in the Core quota config).

To remove it, you can add the embed "name" to the jrCore_format_string blacklist - i.e.

{$proj_summary|jrCore_format_string:$item.profile_quota_id:null:"embed"|strip_tags}

This says "run all formatters EXCEPT the embed formatter.

So it is:

{jrCore_format_string:profile_id:whitelist:blacklist}

where whitelist and black list are comma separated strings of:

- whitelist - ONLY run these formatters
- blacklist - exclude these formatters

the "name" you use is shown in the help dropdown in the System Core -> Quota Config -> help for the text formatters section - it is called "template whitelist name".

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,589 posts
That's perfect. Thanks Brian!


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,589 posts
Ah, I'm still seeing the same problem.

If I blacklist "embed" the jrEmbed tags appear in the output.

I wanted to use the summary (which may contain embed tags) truncated in a list of items, so where the embedded media doesn't show, but where the jrEmbed tag doesn't show as well. Is that possible.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
11 years ago
7,821 posts
Its not built in by default. maybe an event/listener system that listens for the same stuff jrEmbed does.

Copy what jrEmbed is doing when it replaces it with the media, but replace it with nothing.
SteveX
SteveX
@ultrajam
11 years ago
2,589 posts
Thanks Michael, I had to go with two text areas instead, one with jrEmbed support and one without (for use int he list view).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags