Why Don't Codes Render?

Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
On a new module created with Aparna, if one adds an editor to the form, what must one do to get embed codes to render?

For example
[jrEmbed module="jrAudio" id="1063"]
should produce a player but instead only the code for the player displays.


--

Ken Rich
indiegospel.net

updated by @ken-rich: 06/26/16 09:21:48PM
brian
@brian
8 years ago
10,148 posts
Ken Rich:
On a new module created with Aparna, if one adds an editor to the form, what must one do to get embed codes to render?
For example should produce a player but instead only the code for the player displays.

Make sure that the "Convert Embed Tags" option is enabled in your quotas.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 03/24/16 01:09:17PM
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Yes "Convert Embed Tags" is enabled in all my quotas and works in other installations of the editor, just not in the new module I created.

Here is a "live" example of the combined sales module. I am ready to roll with it except for this one issue.

http://kenrich.me/sales


--

Ken Rich
indiegospel.net

updated by @ken-rich: 03/25/16 10:35:03AM
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
I've looked at that thread. There is a lot going on there, I'm not sure what applies to my situation or how to implement.

Are you saying I need to modify my module's include.php file and add a listener for jrEmbed's "output_html" event - i.e. in your init:

Then create myModule/templates/embed.tpl

That task seems "daunting" and the instructions would need to be dumbed down a little more for me to follow.


--

Ken Rich
indiegospel.net
michael
@michael
8 years ago
7,717 posts
What is the output code your using in your .tpl file to display the text that contains the embeded
[jrEmbed module="jrAudio" id="1063"]
Ken Rich
Ken Rich
@ken-rich
8 years ago
926 posts
Hi Michael,

Actually, I did find a clue in that other thread you pointed me too - thanks.

My problem was that in the detail and list templates I apparently did not have the full code.

I was using
{$item.sales_editor}

Instead of
{$item.sales_editor|jrCore_format_string:$item.profile_quota_id}

I didn't know I needed the second part of that since Paul gave me a code which worked for adding lyrics with an editor in the audio form and it is working fine without the second part.

It was the "model" I followed.

{if strlen($item.audio_lyrics) > 0}
     {$item.audio_lyrics}
{/if}

So it's working now but I'm still confused as to why that second part
|jrCore_format_string:$item.profile_quota_id
is necessary in my new "Combined Sales" module but isn't necessary in the "Audio" module where I added an editor for lyrics to the form.

Hmmmm....?????


--

Ken Rich
indiegospel.net
michael
@michael
8 years ago
7,717 posts
|jrCore_format_string
will be firing off of the settings allowed for that profile as defined at:
ACP -> CORE -> SYSTEM CORE -> QUOTA CONFIG -> ACTIVE TEXT FORMATTERS -> Convert Embed Tags