1
TheFinni
adding custom javascript to <head> in news admin
  • 2004/10/9 23:47

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


How would I go about this? I need to add my own javascript source into the <head></head> section of the index.php of the news module in administrator mode. I need this javascript for a custom feature.

Basically I want to add a line such as:


<script type='text/javascript' src='<?php echo XOOPS_URL."/modules/news/myjavascript.js";?>'></script>

I can't find a <head> section in the admin/index.php or admin/storyform.inc.php file. The only place I find it is in XOOPS_URL."/include/cp_functions.php...BUT I wouldn't want to have this javascript load for every admin module.

Thanks!

2
studioC
Re:adding custom javascript to in news admin
  • 2004/10/10 7:15

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hello thefinni,
you won't find a <head></head> area within an normal modul, output is parsed with theme.html where document type and head tag etc. is defined.

if you want to load a script not for all modules perhaps use a script in theme.html to identify module and use <{if>}> .. the way to act i think is the same as described (see my posting there) here
another answer to act on different moduls ..

put that <{if>}> ...... then load your .js and it should do that trick for you


michael

Login

Who's Online

149 user(s) are online (98 user(s) are browsing Support Forums)


Members: 0


Guests: 149


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits