Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 12:35 pm EST
Geeklog Forums
how to add a javascript menu without editing themes
Dan Elkins
Anonymous
I have been banging my head against geeklog lately to try and make a "global" change so that I can have my own javascript menu added for our intranet links.
What is killing me is that I added the 'script' tag to the allowed tags for the html_admin in the cfg file and added a static page to be the home of the javascript. This may seem a bit strange but it's the only location that can be shown on almost every page at the top, and does not require individual theme editing.
Problem 1 -
Apparently there are filters in place to restrict any javascript at all, and I haven't been able to find anything on where to allow it. I am the Admin of the site (inherited from previous geeks).
Problem number 2 -
Some of the javascript that I use to create this menu obviously prefers to be in the header of the page, how can i add this javascript globally without editing every theme?
In conclusion... does anyone know where I can add javascript (both the header and inline html), and more importantly how can i adjust geeklog itself to allow the javascript to be run (only if added by an admin, i.e. by allowing tags in the cfg.)
thanks in advance
Dan
What is killing me is that I added the 'script' tag to the allowed tags for the html_admin in the cfg file and added a static page to be the home of the javascript. This may seem a bit strange but it's the only location that can be shown on almost every page at the top, and does not require individual theme editing.
Problem 1 -
Apparently there are filters in place to restrict any javascript at all, and I haven't been able to find anything on where to allow it. I am the Admin of the site (inherited from previous geeks).
Problem number 2 -
Some of the javascript that I use to create this menu obviously prefers to be in the header of the page, how can i add this javascript globally without editing every theme?
In conclusion... does anyone know where I can add javascript (both the header and inline html), and more importantly how can i adjust geeklog itself to allow the javascript to be run (only if added by an admin, i.e. by allowing tags in the cfg.)
thanks in advance
Dan
5
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Just an idea for #2: Plugins can add code to the header if the theme uses the {plg_headercode} variable in header.thtml.
I've actually used that in a plugin to add CSS definitions dynamically - the same could be done with JS code.
bye, Dirk
I've actually used that in a plugin to add CSS definitions dynamically - the same could be done with JS code.
bye, Dirk
4
5
Quote
All times are EST. The time is now 12:35 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