Welcome to Geeklog, Anonymous Tuesday, December 10 2024 @ 07:54 am EST

Geeklog Forums

FCKeditor strips script tags


Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Maybe someone already has experienced this.
The integrated FCKeditor strips SCRIPT tags.
Basically, when you disable the advanced editor, script (Google adsense) works like a charm. When you enable the editor all you get is this:
Text Formatted Code
<!--{PS..6}--> <!--{PS..7}-->
 

and this should look like
Text Formatted Code

<script type="text/javascript"><!--
google_ad_client = "pub-0698042900796858";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel ="4837792290";
google_color_border = "DFF2FD";
google_color_bg = "DFF2FD";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "000000";
//--></script>

<script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js</script>
 


Please give me some insight please praying it will work 'cause it drives me crazy and I've run out of ideas Wink
Using GL 1.4.0
FF 1.5
Many TIA
Geeklog Polish Support Team
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I've noticed that as well, and it should also effectthe PHP code in Static pages too I guess. Would it be possible to:
- Disable the advanced editor
- Make a separate block with the adsense code
- Enable the advanced editor
- Make any Static Page you want, but do NOT touch that Adsense block again!

I've tried several places for the Adsense banners, and found out it is best (at least at www.kampeerzaken.nl) to put the Adsense code in the templates: article.thtml, events.thtml, featuredstorytext.thtml (I'm rendering every first story as featured story).
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Thanks beewee for your reply.
The thing is that I would like to play with the ads and to put them into stories in different places.
FCK is a real blessing however in this case it's become a nightmare Wink
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Anybody knows how to enable script tags under FCK?

It has to be somewhere in FCK Rolling Eyes but where? That is the question Can someone help me
Geeklog Polish Support Team
 Quote

anon

Anonymous
Are you sure this isn't caused by the allowable HTML settings in config.php?
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Quote by anon: Are you sure this isn't caused by the allowable HTML settings in config.php?

That was my first suspicion. Then I added this
Text Formatted Code
    'script'  => array('type' => 1, 'src' => 1)

 

to $_CONF['admin_html']
Text Formatted Code
    $_CONF['admin_html']['script']    = array('type' => 1, 'src' => 1);

 

to $_CONF['advanced_editor']
And nothing
Then I turned off
$_CONF['skip_html_filter_for_root'] = 1;

and still nothing

Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Now I'm really confused :shock:
I'm not that sure now that this is FCK's fault that script tags don't work in regular stories, because at the same time they perfectly work in staticpages.
What I tested is making a static page with this piece of code

&lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;&lt;/script&gt;

and it worked excellent.
Then I copied the source of the static page and pasted it into a story. Saved it and it didn't work. The code above was changed into something like this

&lt;!--&amp;#123;PS..1&amp;#125;--&gt;


As I mentioned earlier I added the script tag to config.thtml. I even switched off the html filtering for the root group.

So let me repeat this cry for help :helpme:
Big Grin

PS
I had to post it in txt mode because html mode strips it strangely
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
It's me again Smile Patiently waiting for solving this issue praying it will work
Geeklog Polish Support Team
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
confused
I'm not sure we even want to be able to parse PHP in stories or comments.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
It's not about PHP but javascript Smile
E.g.
Text Formatted Code
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
 

Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Quote by Blaine: I'm not sure we even want to be able to parse PHP in stories or comments.

Further to this, you can parse this
Text Formatted Code
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
 

in regular stories once the script html tag is enabled in config.php (with FCK disabled).
Once you enable the advanced editor the above stops working in stories, however it still does work in staticpages.
Can someone help me
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
caffeinated
More and more people use Google Adsense. In order to display the ads you have to add a piece javascript code within
Text Formatted Code
<script> </script>
 
html tags.
After enabling, adding to the allowed html array, script tag, it is possible to include the code from google in stories. However this stops working, except for staticpages, once the advanced editor is enabled. So my question is whether this is:
FCKeditor related issue?
Geeklog related issue?
Can this be solved somehow?
Is it a bug?
Is it only me that experience this?

So many question and so little time Very Happy

Thank you for your patience Its a deal - shaking hands
Geeklog Polish Support Team
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
You will have to disable the kses filter in config.php.

// When set to 1, disables the HTML filter for all users in the 'Root' group.
// Obviously, you should only enable this if you know what you're doing and
// when you can trust all the users in the 'Root' group not to use this for
// Cross Site Scripting, defacements, etc. USE AT YOUR OWN RISK!
$_CONF['skip_html_filter_for_root'] = 1;

Byte
LinuxElectrons
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
Quote by ByteEnable: You will have to disable the kses filter in config.php.

Actually I did it several posts ago Wink
Thank you Byte. Does it work for you BTW?
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
This is so embarassing Embarassed but I have to write this Mr. Green

Anyone?

PS
This is the last post as this question seems to be very sensitive one Wink
Its a deal - shaking hands Thanks everyone for your input.
Geeklog Polish Support Team
 Quote

Status: offline

casper

Forum User
Full Member
Registered: 02/11/04
Posts: 142
Location:Skien, Norway
This also happens with php-code AND normal text!
I try to edit in &quot;source&quot; mode, but when saving FCK converts all specialchars... For example, the letter Å are saved as &amp;aring;
&lt;=&amp;lt; and so on...

Are there any way of fixing this, or do I have to remove the advanced-template for god and not be able to use on staticpages??
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
So far I don't need script on my stories yet, but I have upgraded to FCKeditor 2.2 and found it working much stabler.

Maybe you guys should consider upgrading it to 2.2 from the FCKeditor site. It works great for me, with the exception that they no longer use the previous file manager that shows image thumbnails, but only image file names. Good enough for me. The main benefit is that you get a much stabler program.

Sam
 Quote

All times are EST. The time is now 07:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content