Welcome to Geeklog, Anonymous Saturday, November 23 2024 @ 12:04 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:
and this should look like
<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 'cause it drives me crazy and I've run out of ideas
Using GL 1.4.0
FF 1.5
Many TIA
Geeklog Polish Support Team
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 'cause it drives me crazy and I've run out of ideas
Using GL 1.4.0
FF 1.5
Many TIA
Geeklog Polish Support Team
17
23
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
- 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
23
17
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
Geeklog Polish Support Team
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
Geeklog Polish Support Team
17
16
Quote
anon
Anonymous
Are you sure this isn't caused by the allowable HTML settings in config.php?
21
18
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
15
17
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
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
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
<!--&#123;PS..1&#125;-->
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:
PS
I had to post it in txt mode because html mode strips it strangely
Geeklog Polish Support Team
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
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
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
<!--&#123;PS..1&#125;-->
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:
PS
I had to post it in txt mode because html mode strips it strangely
Geeklog Polish Support Team
20
17
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.
Geeklog Polish Support Team
18
22
Quote
More and more people use Google Adsense. In order to display the ads you have to add a piece javascript code within
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
Thank you for your patience
Geeklog Polish Support Team
Text Formatted Code
<script> </script>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
Thank you for your patience
Geeklog Polish Support Team
19
26
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
// 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
15
23
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 "source" mode, but when saving FCK converts all specialchars... For example, the letter Å are saved as &aring;
<=&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??
I try to edit in "source" mode, but when saving FCK converts all specialchars... For example, the letter Å are saved as &aring;
<=&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??
22
24
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
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
21
18
Quote
All times are EST. The time is now 12:04 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