Page 1 of 1

Scripts within a blog entry...

Posted: Mon Sep 01, 2008 12:21 am
by tassilyn
I am wanting to run a script within a blog entry and not just on the sidebar of my blog site. I have yet to find the plugin that allows this. Does someone else know how to do it so that I can stop looking.

Re: Scripts within a blog entry...

Posted: Mon Sep 01, 2008 10:41 am
by garvinhicking
Hi!

You can embed javascript inside a blog entry. I guess you are currently using the WYSIWYG editor -- this can mess with javascript inside an entry.

So disable the WYSIWYG editor before you want to edit/create a blog entry with such javascript inside, then it should work properly.

Regards,
Garvin

Re: Scripts within a blog entry...

Posted: Mon Sep 01, 2008 6:26 pm
by tassilyn
garvinhicking wrote:Hi!

You can embed javascript inside a blog entry. I guess you are currently using the WYSIWYG editor -- this can mess with javascript inside an entry.

So disable the WYSIWYG editor before you want to edit/create a blog entry with such javascript inside, then it should work properly.

Regards,
Garvin


I don't have the WYSIWYG on. What I'm wanting to do is incorporate adwords within my blog entries but it won't show the script for the adwords after saving the entry. It will show adwords in the sidebar but not within an entry itself.

Re: Scripts within a blog entry...

Posted: Tue Sep 02, 2008 10:44 am
by garvinhicking
Hi!

Can you show what exactly you insert into a blog entry, and give a URL to such a blog entry?

When not using WYSIWYG, the <script> should really carry through.

Regards,
Garvin

Adwords Script

Posted: Tue Sep 02, 2008 3:24 pm
by tassilyn
<script type="text/javascript"><!--
google_ad_client = "pub-7327528218451827";
/* 728x15, created 9/2/08 */
google_ad_slot = "6774299535";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


By the way, thanks for the help!

Re: Adwords Script

Posted: Tue Sep 02, 2008 3:54 pm
by garvinhicking
Hi!

This text contains some special markup bercause of the /* and */ -- if you have the s9y markup event plugin installed, this will transform your manual input to something like <em>...blabla</em>.

You can see that when you view the HTML source of your blog, and circumvent that by either not using this (unneeded) /* ... */ markup, or by removing the s9y markup event plugin.

Regards,
Garvin

Unfortunately...

Posted: Wed Sep 03, 2008 1:34 am
by tassilyn
...I tried removing the plugin and it didn't work. I also tried removing the characters and it still doesn't work either! :?

Posted: Wed Sep 03, 2008 4:22 am
by Don Chambers
Can you supply a URL to your site?

Posted: Wed Sep 03, 2008 2:43 pm
by tassilyn
http://www.thechatterbug.com/

It's the most recent post at the top with no topic/subject.

Posted: Wed Sep 03, 2008 2:51 pm
by garvinhicking
Hi!

If you look at the HTML source of your entry you will see:

Code: Select all

    <p><script type="text/javascript"><!-- <br />
google_ad_client = "pub-7327528218451827"; <br />
 728x15, created 9/2/08<br />
google_ad_slot = "6774299535"; <br />
google_ad_width = 728; <br />
google_ad_height = 15; <br />
//--> <br />
</script> <br />
<script type="text/javascript" <br />
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> <br />
</script> <br /></p>
This is invalid javascript. The "<br />"s there are not allowed.

You have several options to remedy this situation:

1. Remove all linebreaks in your blog entry, write everything on a single line.

-OR-

2. Remove the plugin "nl2br". Removing this will also remove any conversion of newlines you might have used in all your other blog postings, so this could be dangerous if you rely on this behaviour.

-OR-

3. Install the plugin "Extended properties for entries". Then edit your blog entry with javascript in it, browse to the bottom and there you should see a list of markup plugins that you can disable conditionally on your posting. Highlight the "nl2br" plugin in that combobox, save your entry, and then for this entry the markup transformation will not be applied.


Regards,
Garvin

crud

Posted: Wed Sep 03, 2008 3:13 pm
by tassilyn
Well, I should have just removed the line breaks within that specific entry. I removed that plug in and now almost all of my entries are jacked up.

whew...

Posted: Wed Sep 03, 2008 3:15 pm
by tassilyn
okay... i removed another plugin which corrected what I had messed up. I think we've fixed it!

Thanks for all your time and effort helping me with this. I really appreciate it.

Have a great day!