On 10/25/06, Simetrical Simetrical+wikitech@gmail.com wrote:
On 10/24/06, Liz Kim lizkim270@gmail.com wrote:
question overview: Where/How could I add new javascript files into wiki? I would like to add dynamic functions as a part of the header which will be static on all pages.
details: I have gone in and changed the content under skins/. "Sidebar" now exist as a horizontal navigation bar. What I would like to do is to include a set of javascript funcions and call it from Monobook.php (I have just edited the default Monobook.php file) when outputing the items.
I have tried it on a separte test php file where it echos: "<script type='text/javascript' src='menu.js'>" It works fine on this test run. When added to Monobook.php, it stops working.
I have also tried to delete all content form Monobook.php to nothing but just the javascript include and hard-code definition of the sidebar items & its dropdown menu (pretty much the same as the test run php file from above) but the javascript capability is still lost. I have checked paths of these files and am sure that it works outside of wiki...
Any inputs would be greatly appreciated!
Thank you _______________________________________________ Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Just modify the page MediaWiki:Monobook.js in-wiki.
Keep in mind that there is one Monobook.js per interface language. So if you have users using any language besides the default one they will not have access to your JS unless you put the same functions in every version of Monobook.js that is being used.
The other pages are accessed in this way (Spanish and German examples given):
MediaWiki:Monobook.js/es MediaWiki:Monobook.js/de
Andrew Dunbar (hippietrail)
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l