Jumi for 1.6 strips HTML SPAN tags from JavaScript code

A multipurpose module, plugin and component

Jumi for 1.6 strips HTML SPAN tags from JavaScript code

New postby Scotty the Menace » Sat Mar 12, 2011 11:16 am

I want to add code to my site to display some ShareThis buttons. I got the code from ShareThis and added their script tag to the HEAD section of my template.

Now I need to add this code to my page to display the buttons:
Code: Select all
<span class="st_twitter_large" displayText="Tweet"></span><span class="st_facebook_large" displayText="Facebook"></span><span class="st_ybuzz_large" displayText="Yahoo! Buzz"></span><span class="st_gbuzz_large" displayText="Google Buzz"></span><span class="st_email_large" displayText="Email"></span><span class="st_sharethis_large" displayText="ShareThis"></span>


I created a Jumi module (New Module > Jumi, named it "ShareThis") and added the above code in the Code Written field. When I save, Jumi (or Joomla or something) strips every character out of the Code Written field.

I then removed the code from the Code Written field and created a .js file with the following code:
Code: Select all
document.write("<span class='st_twitter_large' displayText='Tweet'></span><span class='st_facebook_large' displayText='Facebook'></span><span class='st_ybuzz_large' displayText='Yahoo! Buzz'></span><span class='st_gbuzz_large' displayText='Google Buzz'></span><span class='st_email_large' displayText='Email'></span><span class='st_sharethis_large' displayText='ShareThis'></span>");


I uploaded the .js file to my server and added the path
Code: Select all
scripts/sharethis.js
to my "ShareThis" Jumi module. Now all I see in the module position on the page is this:
Code: Select all
document.write("");


Finally, I tried adding this Jumi code to an article:
Code: Select all
{jumi ShareThis code - [scripts/sharethis.js]}


Now I see this at the bottom of the article:
Code: Select all
document.write("");


I'm not a developer so I'm probably doing something wrong, unless it's the constant() error I got during install that's breaking it. I piggybacked onto another thread for that error.

Any ideas?
Scotty the Menace
 
Posts: 2
Joined: Sat Mar 12, 2011 10:41 am

Re: Jumi for 1.6 strips HTML SPAN tags from JavaScript code

New postby djemmers » Thu May 05, 2011 10:43 am

I have somewhat the same problem
I try to put a script (google ads code) into the code written field
but it won't take...
Code: Select all
<script type="text/javascript"><!--
google_ad_client = "";
/* blablabla */
google_ad_slot = "number";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


but It is striped completely
djemmers
 
Posts: 11
Joined: Mon Nov 29, 2010 4:57 pm

Re: Jumi for 1.6 strips HTML SPAN tags from JavaScript code

New postby Edward » Thu May 12, 2011 3:58 pm

Yep, same problem here, I'm sorry to report. Joomla 1.6.3, Jumi 2.0.6.

I pasted this into the "Code Written" field:
Code: Select all
<!-- Begin MailChimp Signup Form -->
<script type="text/javascript">
// delete this script tag and use a "div.mce_inline_error{ XXX !important}" selector
// or fill this in and it will be inlined when errors are generated
var mc_custom_error_style = '';
</script>
<div id="mc_embed_signup">
<form action="http://daij.us1.list-manage.com/subscribe/post?u=d1a60c16a1cf733afe2357755&amp;id=a3e0b9b707" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
...

Press [Save] and Joomla reports a successful save, but the "Code Written" box now displays:
Code: Select all
// delete this script tag and use a "div.mce_inline_error{ XXX !important}" selector
// or fill this in and it will be inlined when errors are generated
var mc_custom_error_style = '';
&lt;/script&gt;
&lt;div id=&quot;mc_embed_signup&quot;&gt;
&lt;form action=&quot;http://daij.us1.list-manage.com/subscribe/post?u=d1a60c16a1cf733afe2357755&id=a3e0b9b707&quot; method=&quot;post&quot; id=&quot;mc-embedded-subscribe-form&quot; name=&quot;mc-embedded-subscribe-form&quot; class=&quot;validate&quot; target=&quot;_blank&quot;&gt;

Viewing the site, it's just all plain text.

I even tried just:
Code: Select all
<p>Hello, <b>this</b> is a <i>test.</i></p>

Saved and got:
Code: Select all
Hello, this is a test.

Once again, this displays as plain text on the site.

I thought I was doing something wrong, so I logged into another site I manage (Joomla 1.5.17, (although I can't see a Jumi plugin, oddly!) and Jumi is working fine there for many modules with scripts, iframes, etc.
Edward
 
Posts: 3
Joined: Thu May 12, 2011 3:49 pm

Re: Jumi for 1.6 strips HTML SPAN tags from JavaScript code

New postby djemmers » Thu May 12, 2011 4:21 pm

you can still use jumi with this problem

just use {jumi [locationoffile.php]} in the body of your article or type the location of the php (or other) file that you want to inlculde in the source of code field
djemmers
 
Posts: 11
Joined: Mon Nov 29, 2010 4:57 pm

Re: Jumi for 1.6 strips HTML SPAN tags from JavaScript code

New postby Edward » Thu May 12, 2011 4:36 pm

Okay, there's another forum about this problem, and it has a solution:

http://edo.webmaster.am/forum/jumi/joomla-jumi-module-problem-t107-10.html#p846

Follow those instructions to add
Code: Select all
filter="raw"

in the appropriate file and the Jumi module starts working fine.

Can't comment on embedding code into articles, as I've not done that... but now that I've read that it's doable, I might just start! :-)
Edward
 
Posts: 3
Joined: Thu May 12, 2011 3:49 pm


Return to Jumi

Who is online

Users browsing this forum: No registered users and 5 guests

cron