Skip to main content

Adding the 'Cite' option to your WikiEditor

Taking from the top:

I got a clean MediaWiki installed from Git on January 14 2013, with the following extensions:
• Cite
• ParserFunctions
• Gadgets
• Vector
• WikiEditor
• SyntaxHighlight

What are Extensions on MediaWiki?
Ans: Extensions are powerful tools on Media Wiki which lets one customize the way their wiki looks and works.

How to install these extensions on a clean Wiki?
Downloading these extensions https://www.mediawiki.or/wiki/Manual:Extensions documents how different extensions are to be downloaded and installed on a Wiki. The Wikimedia SVN repositories hosts all extensions. This repository is located at svn:trunk/extensions. After being downloaded, these extensions make home in their own own subdirectory of $IP/extensions/.(*IP means the full path to the installation directory. It stands for Install Path.)
Installing the downloaded extensions This process is generally simple. We just need to add one line at the end of the LocalSettings.php file (but above the PHP end-of-code delimiter, "?>", if present): require_once( "$IP/extensions/extension_name/extension_name.php" ); 


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 which looks like:
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/>. These comes along with the Cite.php under the Cite extension folder. Cite allows the editor to create the footnotes.
 
Example:
References
1. ^ Miller, The Sun, Oxford, 2005, p. 23.
2. ^ Brown, The Moon, 2006, Penguin, p. 46.
3. ^ Smith, The Universe, Random House, 2005, p. 334.

Getting RefToolbar in place:
RefToolbar refers to a series of MediaWiki extensions which are written in JavaScript to add functionality to the editing toolbar. The biggest of its example is the instance to help with citation templates which we will discuss more in details here.
To add the RefToolbar in our Wiki, we will need to get the MediaWiki:RefToolbar.js file in our own wiki. Along with this .js file, we will need a few more JavaScript files placed properly in our Wiki before we can get the citation template to get working. These files are:
• MediaWiki:Common.js
• MediaWiki:Common.js/edit.js
• MediaWiki:RefToolbarBase.js
• MediaWiki:RefToolbar.js 

  MediaWiki:RefToolbarMessages-en.js• MediaWiki:RefToolbarConfig.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.
# Common.js: Common.js is the only JavaScript which is for all users. Otherwise most .js files are user specific.
After the RefToolbar is properly configured i.e. after we have added the script from RefToolbarConfig.js into our own Wiki, we can go to the edit option of any page and if all rest scripts are properly in place, the citation template should now be available.
Well, one important key note while working with the JavaScripts in MediaWiki is- whenever we add a new JavaScript file in our own wiki, we need to clear the browser's cache or bypass the browser's cache and then check if its implemented properly.
This can be done in the following ways:
• Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R
on a Mac)
• Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
• Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
• Opera: Clear the cache in Tools → Preferences

Comments

  1. I was getting bore since morning but as soon as I got this link & reached at this blog, I turned into fresh and also joyful too.www.bestcitation.com

    ReplyDelete

Post a Comment

Popular posts from this blog

Quarantining Alone - A Once in a Lifetime Opportunity

This Covid-19 virus has turned the entire world upside down. It has broken a lot of older habits and set a lot of new normals. Towards the early days of this lockdown, I had written a blog - An Extrovert in Isolation . The early lockdown days were extremely difficult for me. That was the phase of breaking old habits. An extrovert by nature, couldn't accept the sudden change of being locked alone inside my house. I am writing this blog again after being locked at home for more than 100 days now. Most of the older habits are broken by now. A few new habits have become a part of my new normal. What seemed to have been painful 100 days back has now turned to be blissful. Here, I am sharing my story of how quarantining alone has ended up being the greatest opportunity and a huge transformation in my life.  I have been struggling for years to fix my sleep patterns. Going to bed late and waking up late had been a habit for a really long time. My struggles to change this habit had

RASCI model - the responsibility assignment matrix

In the last few days, both at my workplace as well as while dealing with a few activities around me, I have realized the importance of implementing a better responsibility assignment matrix, to get things done in a less messed up way. A few months back, during some random conversation, a friend of mine had introduced me to the RASCI model, one of the responsibility assignment matrices. Wikipedia says that the responsibility assignment matrix 'describes the participation by various roles in completing tasks or deliverables for a project or business process.'  In simple words, for any project, if we can divide each person's role and responsibility, it not only ensures a better end product, but also saves the time, otherwise lost in discussions (which organizations like to call as meetings). A RASCI implementation ensures that each person is responsible for only and only the task assigned to him (or her) and will not need to interfere with another person's task, un

The stranger in Pain

I have just returned from Malaysia today. After a 3 months stay in Singapore, I could finally make it to Malaysia, Kuala Lampur. Just a small 3 days trip with my friends. On the second day of our trip, we had decided to visit the Genting Highlands. Early morning we started off for the adventurous trip, only three of us- Sree Lakshmi(my room mate in Singapore), Nishita(my co-scholar from SCMS-UG) and me. We boarded our bus to Genting. Sree and Nishi sat together and I sat alone, taking a window seat. After a while, an elderly uncle, Indian looking, of about the age of 60+, occupied the vacant seat next to mine.  He initiated the conversation by asking me which country I am from. After I answered that I was from India, he said he was from Sri Lanka. My thinking of him being an Indian was proven wrong. He was a very friendly man. After the initial ice breaking, we started speaking about ourselves and our lives. He told that he had finished conquering the entire globe with just some 4 co