Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 12:37 pm EST
Geeklog Forums
Adding commented out html to stories
Status: offline
mrjeff
Forum User
Chatty
Registered: 01/28/04
Posts: 36
I am trying to add some javascript code to stories. I added the script and type attributes to config.php for admin, so I have javascript working in stories. The problem is I need to have it commented out for browsers or users that have javascipt disabled so they do not see a bunch of code. How can I make it so I can use html comments in stories, just for admin?
I did a search here and didn't find anything about this.
Thanks
Jeff
"friends don't help friends run windows"
I did a search here and didn't find anything about this.
Thanks
Jeff
"friends don't help friends run windows"
1
4
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
In the config.php, you have 2 settings to define the allowable HTML. One for admin and one of general users. Can you not use that to only allow your JS if admin ?
Geeklog components by PortalParts -- www.portalparts.com
Geeklog components by PortalParts -- www.portalparts.com
3
24
Quote
Status: offline
mrjeff
Forum User
Chatty
Registered: 01/28/04
Posts: 36
Yes, I have the script tag and type attribute added in the config.php and JS works fine, and only for admin. The problem for me is that some people have JS disabled, which a buch of JS code will appear in the story, to make it so this does not happen, you comment out the code. Geeklog does not allow you to use html comments in a story. Adding the comment to the config.php does not work becuase geeklog will close the tag/comment I would like to know where or in what direction I need to go to get this to work. Thanks for the reply Blaine
Anyone have any ideas? I have been looking at kses.class.php, but I am at a loss as how to make this allowable.
Thanks
Jeff
"friends don't help friends run windows"
Text Formatted Code
<!-- SGML Special Tag (comment) -->Anyone have any ideas? I have been looking at kses.class.php, but I am at a loss as how to make this allowable.
Thanks
Jeff
"friends don't help friends run windows"
2
5
Quote
All times are EST. The time is now 12:37 pm.
- 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