K
K
kuzubov2012-10-03 12:24:53
JavaScript
kuzubov, 2012-10-03 12:24:53

How to add custom jquery plugin to mediawiki?

Installed mediawiki 1.19. It already has a set of jQuery scripts. And so I decided to use custom plugins jquery.treeview and jquery.jstree in my plate. Throwing the plugin into the folder with jquery just like that did not give any result - I thought about the fact that I probably need to prescribe this plugin somewhere - but I have no idea where.

The standard use is to simply indicate in the HEAD block of the page that one more js script needs to be loaded. But the wiki does not allow you to enter something there, but it somehow generates a header and includes what it considers necessary ...

in general, the question is how to add the jquery.treewiew plugin, for example, to mediawiki and make it see the plugin and work with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lakewake, 2012-10-03
@vedmaka

you can go the simplest way and write on the Mediawiki:Common.js page :
mw.loader.load('http://path/to/sript/jquery.treewiew.js');
mw.loader.load('http://path/to/script/jquery.jstree');
this way these plugins will be loaded on all mediawiki pages

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question