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

Equality and Equity: A Journey That Starts at Home, Beyond the Workplace!

In 2023, during the celebration of International Women's Day, I encountered the notion of " Equity " for the first time. Initially, its significance in a woman's daily life didn't strike me profoundly. However, over the past year, I've been continually reminded of its relevance on numerous occasions. Discussions around workplace Diversity and the concerted effort to elevate the presence of women in organizations, especially in leadership roles, have gained traction globally. While commendable, there's a touch of irony in this commendable endeavor. The very men who wield decision-making power in organizations, shaping policies to foster inclusivity and gender balance, often seem to leave the concept of equality at their home doorstep. As they enter their domestic realm, they discard the notion of equality as if shedding a coat, anticipating their wives to effortlessly shift from their professional roles into the responsibilities of a homemaker. It's imp...

A lot can happen over coffee....only if you are allowed to sit at a CCD outlet!

Cafe Coffee Day is no more a new name for the youngsters in India. For a warm cup of coffee at an affordable price, thats where we generally go to! But more than the cup of coffee, its the atmosphere of Café Coffee Days which attracts all of us. An informal setup...good beverage and snacks...soothing music (most of the time)...complimentary wi-fi (at many outlets)...well, CCD always had a lot to offer its customers. Photo source - https://www.zomato.com/pune/cafe-coffee-day-2-koregaon-park For Siddhartha, coffee always used to be an experience to be offered...not just beans to be grown. I have had my job interview conducted at a CCD outlet. I have hosted and attended several community meetups at different CCD outlets across the country. I have even had my coffee dates at CCDs. Well, truely, a lot has happened in my life over coffee...at different CCD outlets. Once, Siddhartha himself had spent his new year's eve, serving customers at a Café Coffee Day (CCD) outlet near C...

Afterall its Paris...

My after event blog posts are generally a report of the event...if you are looking for a report of the MDN Work-week, this is not the right post. This post is a complete non-technical and non-work oriented story of how I fell in love in and with Paris. A glance of Paris...  Paris had been a dream of mine for quite a long time, and the first time I got the invitation for MDN Workweek, I kind of knew this one was going to be awesome! Paris is beautiful...way more beautiful than my words can ever express. Every moment of this one weekend feels like a long, beautiful dream. Everything is too perfect here. This city has a weird kind of "intoxication" in its air. The more you breadth in the cool air, the more you fall in love with this city. The weather here couldn't probably be any better...its perfectly cool....not too hot, not too cold. Refreshing cool breeze just washes away all your worries and stress. Someone couldn't probably be upset in this city...its aw...