Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:10 am EST
Geeklog Forums
Stop allow html comments
Status: offline
NeoNecro
Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Hello,
How can I allow html comments in stories? I tried adding !-- to the list of allowed html, but it keeps removing it. Does anybody tried this before or has an idea on how to do this?
I wan't to do this because I want to add google ads into some stories. So, when somebody reads a story by using the "read more" link they will see an ad-block in the story. It also allows me to position the block were ever I want it into the story.
Grtz
dimis-site.be
How can I allow html comments in stories? I tried adding !-- to the list of allowed html, but it keeps removing it. Does anybody tried this before or has an idea on how to do this?
I wan't to do this because I want to add google ads into some stories. So, when somebody reads a story by using the "read more" link they will see an ad-block in the story. It also allows me to position the block were ever I want it into the story.
Grtz
dimis-site.be
7
9
Quote
Status: offline
NeoNecro
Forum User
Regular Poster
Registered: 02/07/04
Posts: 90
Thanks Dirk,
So, I searched the internet for a way solve it. On php.net on the strip_tags page I found a solution posted by Isaac Schlueter.
So, I replaced to code on line 3308 of lib-common (latest version 1.3.11sr1) with this code:
Then I went down a little bit until the point where it returns the data on line 3336, there I replaced:
with:
return str_replace(array('<!--', '-->'), array('<!--', '-->'), $str);
And now it works
I don't think this would create a new problem. Unless your trying to post the thml equivelant of the comment like this:
Then you would end up with real comments.
Maybe this is something to include into the future versions of Geeklog?
Grtz
dimis-site.be
So, I searched the internet for a way solve it. On php.net on the strip_tags page I found a solution posted by Isaac Schlueter.
So, I replaced to code on line 3308 of lib-common (latest version 1.3.11sr1) with this code:
Text Formatted Code
$str = str_replace(array('<!--', '-->'), array('<!--', '-->'), $str);Then I went down a little bit until the point where it returns the data on line 3336, there I replaced:
Text Formatted Code
return $filter->Parse( $str );with:
Text Formatted Code
$str = $filter->Parse( $str );return str_replace(array('<!--', '-->'), array('<!--', '-->'), $str);
And now it works
I don't think this would create a new problem. Unless your trying to post the thml equivelant of the comment like this:
Text Formatted Code
<!-- ->Then you would end up with real comments.
Maybe this is something to include into the future versions of Geeklog?
Grtz
dimis-site.be
6
7
Quote
All times are EST. The time is now 01:10 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