Citation option in your edit toolbar
Getting citation template and 'cite' option in the edit toolbar of a clean MediaWiki
Taking from the top:
Get a clean MediaWiki installed from Git, with the following extensions:
- Vector (Note: Now a part of core functionality)
Getting 'cite' option into the toolbar of MediaWiki's editing page
For the cite option, we need to get the WikiEditor's latest version installed first (presently it is 0.3.1). The WikiEditor is the basic toolbar that we get to see when we switch to the edit mode of any wiki article. When we initially install the WikiEditor, we will get the basic version of the toolbar. Well, this bar is required to be installed as the citation option will need to later added to the same bar after the help option.When we successfully install the Cite extension, it gives the flexibility to use the 'ref' and 'references' tags. These comes along with the Cite.php under the Cite extension folder. Cite allows the editor to create the footnotes.
Getting RefToolbar with the 'cite' option in place:
This article is outdated.
- MediaWiki:RefToolbarBase.js (Note: This has been replaced by MediaWiki:Gadget-refToolbarBase.js.)
Its advisable to install the js files in the same pattern as they are listed as they comes in the same hierarchy of use as listed.
Customizing the Citation template as per user requirements:
As already discussed above, there are a few java script files which are mainly responsible for the citation template. Among these files, the two most important files which are mainly responsible for what we can view on the template are:Media Wiki:RefToolbarMessages-en.js.
- The variable names and their values need to be same for both these files.
Adding the templates
The citation option is added to the EditToolbar by following the above steps, but the references will not work properly unless we add the Templates properly to our wiki. Eg:
- Template:Cite web
- Template:Cite news
- Template:Cite book
- Template:Cite journal
These template files are generally same in all Wikipedias (i.e. the standard one as used in English Wikipedia) and thus can be directly copied from the English Wikipedia. Though the files are so badly written, that being able to modify them in any manner requires some great skills (which I surely did lack). Note: If you have made changes in your RefToolbarLegacy.js file and have replaced the variable's values with the local version of the standard values like:
- var option1="ওেয়ব উদধৃত করুন ";
- var option2="খবর উদধৃত করুন";
- var option3="বই উদধৃত করুন";
- var option4="জানরাল উদধৃত করুন";
In that case, you will need to create the Templates with the same names. Like, instead of 'Template:Cite web', you will need to create 'Template: ওেয়ব উদধৃত করুন'. These values comes from the RefToolbarLegacy.js page and thus the Template requirements will be as per the variable values. We will only need to change the name of the template, the entire code can remain unchanged and the fucntionalities provided will be the same and perfect. My attempt to modify this code couldn't be a success but if someone else can get this job done, will probably be a great help.