1

Mozilla South Asia Inter-Community Meet-up 2013

The first Mozilla South Asia Inter-Community meet-up took place in Kathmandu, Nepal, on 23-24 February 2013, with the coordination from Mozilla Nepal Regional community.
It brought together community leaders from the South Asia, including paid staff from across the SAARC countries, to meet for 3 days of presentations, breakout sessions and discussions to plan the implementation of the Mozilla South Asia community road map for 2013 and ensure that the regional community is fully aligned with greater engagement efforts across the Mozilla organization. The Wiki Link against this event is here.


Well, after the initial introduction (the above content is copied directly from the Wiki page), I will share my experience of this event though this blog.
Why not start from the top! I reached Nepal on the 22nd of February, 2013 by around 3pm. Well, to be honest, the Kathmandu airport is kind of messed up. It took me some time to even find the right Immigration form before actually queueing up for the immigration process. The blessing is, Indians do not need a visa for entering Nepal but those who needed it, did complain about how time consuming and messy that process was. The disaster but ended at the airport only. After coming out from the terminal, Kathmandu's beauty as well as the volunteer's warmth changed the entire mood and made me look forward to some great time in Kathmandu.

I met the rest of the team, the ones who were to tolerate me for the next 2 days, only for coffee at 6pm (from here on, we are in Nepal time zone i.e. 15mins ahead of IST). We began with a round of introduction, more like an ice-breaking session (though we all knew each other...but virtually).
I will definitely regret not being able to explore Nepal in this trip, but the dinner party that night was definitely a glimpse into the culture of Nepal in terms of food as well as the local dances during the dinner.

The next morning, post breakfast, was the official start to the event. This time we had a more formal introduction series than the ones we had the night before. There were three questions which were to be answered while introducing ourselves like:
  • Who am I?
  • What do I do in Mozilla?
  • What am I planning to do in 2013 for Mozilla? 
The introduction session was followed by intra-community discussions as to what are the things working for each community and what are not. Post lunch, we went out to the Open Data Day event where we addressed the crowed on different Mozilla projects. Well, my presence in the Open Data Day was that of a Mozilla Representative's, but somehow, I ended up being caught  by the Nepal Wikipedia team and having a conversation with them regarding several issues being faced by the Nepali team there.
Post Open Data Day, we continued with our brainstorming session and discussions but this time, instead of it being intra-community, it was inter-community.

Sunday morning didn't bring holiday mood along with it, rather it brought a sense of responsibility and a willingness to work. The problems discussed last day needed solutions and that was the agenda for the day. To make things work best, we decided to assign task and responsibilities to each volunteer present in the room so that each one there has some goal to work towards and some target to achieve.
Once tasks were assigned, each task force team had their part of the independent discussion and chalked  out some road map for the coming few months. The event did assign each member with a whole new set of responsibilities. If the year began with so much enthusiasm and planning and commitment from all the contributors, the year 2013 will undoubtedly be a great year for Mozilla!

1

Learning to build Gadgets in Wikipedia

Posted by Priyanka Nag on 9:42 PM in , , ,
Building gadgets in MediaWiki is awesomely simple and real fun. Well, I wasn't actually aware of it, until I attended the Gadget building workshop in GNUnify last week, taken by Yuvi, Sucheta and Harsh. Initial step didn't sound much interesting to me, as they were mostly talking stuff which I was already aware of and tried hands on, but Yuvi probably understood my disappointment, and soon came to my rescue with some really cool and interesting stuff. Writing JavaScript files in my own MediaWiki was a regular job which I had tried a few times already, but blending some cool Ajax codes in those JavaScript files was a real fun thing to learn. It was like mixing some cream in my rich coffee :P
Learning to make use of Special:ApiSandbox made life so much easier for me. Coding made so much easy using the multiple options here.
Sitting right there, did manage to put some Ajax codes into a js file and make it work fine. 
The learning didn't stop there. The fun continued as Yuvi went ahead to teach, how to package our codes and make it available for anyone across Wikipedia platform. So much work done in such simple ways and made so easily available for others too.

Here I will go ahead and give you a small example for a small task that can be done so easily using the perfect blend of Ajax and JavaScript:

$.get("/w/api.php?action=query&meta=userinfo&format=json&uiprop=editcount") 
.done(function(data){alert(data.query.userinfo.editcount);});

#I had added this small code in a JavaScript file that I had created. This code will basically give an alert of the user's edit count every time.

I had simply called this JavaScript page from my common.js file. If any other user wants to use my code, all he needs to do is import the required JavaScript file like:
importScript("User:Priyanka Nag/EditPage.js");
 
This is how simple making and packaging a Gadget is in Wikipedia. Well, I am calling it simple cause I did a very simple job here. Now, depending on your codes and purpose of your gadget, your gadget can be simple or complicated.


1

Adding the 'Cite' option to your WikiEditor

Posted by Priyanka Nag on 9:22 PM in , , , , ,
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

0

Customizing your 'Citation template' for your WikiEditor

Posted by Priyanka Nag on 9:18 PM in , , , , ,

Anyone who has worked on the MediaWiki CMS, will probably know how difficult it is to handle this CMS at times. If you have ever edited Wikipedia pages (here I am referring mainly to the English Wikipedia i.e. http://en.wikipedia.org/), you will be aware of the 'Cite' option that you get at the right hand top corner of your editor. The 'citation' option is used for adding references in your document. You must be aware that when you create a new Wikipage on any Wikipedia, you need to add some relevant references against it. This is made very easy using the 'Cite' option. It gives the user, a template where the user can simply fill in some details to get the reference going, no need to worry about the tags (they are auto-generated).
This 'Cite' option which is present in the English Wikipedia is actually missing from most other Wikipedia(s). It is not at all an easy task to get the Citation option in place and working. You can read on how to get the 'Cite' option on the editor here.

Once you have the 'Cite' option in place, you might want to customize the template. If I want to get the 'Cite' option for my own language's Wikipedia, I will definitely want to have the template in my own language. To make such modifications, we have to work on a few JavaScript files like:
  • RefToolbarConfig.js
  • RefToolbarLegacy.js
  • RefToolbarMessages-en.js
The RefToolbar Messages-en.js file is responsible for the messages that are displayed in the template for the end user. If we want to customize our template in our own way, we need to first change the messages here. All messages here are hard coded, so we need to go into the code and simply change the strings. If we translate the strings to some other language, we will get the template ready for that language's Wikipedia or your own MediaWiki in that language.
Here I have given an example of how it can be done in Bengali.

Once we get the template customized, next we can go on to make a few changes in the remaining two files.
What I had done was a simple task. I had simply replaced the hard coded values in these files with variable names and assigned the variables some value. So, from next time, if some change needs to be done, we do not need to struggle through the entire piece of JavaScript, we can simply go ahead and make the changes in the variable's value. 


This way the citation template can be customized in our own required way.

0

Mozilla's participation in GNUnify'13

Posted by Priyanka Nag on 12:32 PM
The Mozillians of Pune did meet at Barista today to discuss about Mozilla's participation in GNUnify'13. I don't wanna spoil the surprises of D-day, but just wanted to give a small glimpse to all the attendees of GNUnify'13 as to what they can expect here this time.
Well, if you are attending GNUnify'13, here is a list of things you can expect from Mozilla:
  • At the Mozilla booth,  you can go and grab several Mozilla goodies, get to see the new Firefox OS phone and much more.
  • Get to learn about Webmaker and start contributing to Mozilla in minutes.
  • Web is for all....young or old. Learn about Mozilla's most recent project - GenOpen (Generation Open).
  • Learn more about how you can be a part of Mozilla community and help Mozilla grow.
  • If you are developer, its your chance to learn more about Mozilla development projects and how to get involved with them.
  • If you are a Woman and a FOSS enthusiast, but confused about where to begin from, get guided here through our talk on WoMoz (Women in Mozilla).
  • Here, you will get an awesome chance to learn about Firefox OS app development and an entire day's time to develop some cool apps. If your app is really cool, you might just get a chance to win yourself some prizes.
  • Most important, get all your doubts cleared from the Mozilla contributors during BOF sessions.
So, if you are not at GNUnify this year....well you are not at GNUnify!

0

The making of GNUnify....version 1

Posted by Priyanka Nag on 10:27 PM
From developers to event organizers...thats what has happened to the MscCA students of SICSR at present. 
GNUnify, one of Asia's most renowned Open Source Tech fest is round the corner. As the dates get closer the work load as well as enthusiasm keeps getting higher on head.

From poster design to website building...from script writing to publicity work...all coordinated from one single room, SDRC. From morning 8am till late 11pm...no complaints, no demands...only dedicated work.

A whole lot of jobs and a series of struggles...a whole lot of learning all happening here. You need to be here to believe in it.
Sometimes, the not so important issues are the ones which needs most attention like getting the T-shirts printed, getting the posters done, sending down invitation mails and so on and so forth.

In the past few days, did a lot of stupid manual jobs which under normal circumstances, I would have never ever done like getting letters drafted, sending down mails, taking email followups and so on. I can assure, the experiences are similar for most other people here. Learning new things (for me, most important learning is that of patience :p ) is seemingly the most important and interesting part of event management at any point of time.


0

Having fun with MediaWiki...

Posted by Priyanka Nag on 10:39 AM

I have handled a lot of CMS for different works in everyday life like Drupal, Wordpress, Red Mine etc but one of the most difficult CMS that I have come across till date is MediaWiki. 

Sometimes, the tougher a job is, the more interesting it turns out to be. MediaWiki installation on my local machine was not a touch job, rather was not a part of my job at all, the real challenge began when I started playing around with all the extensions. Unlike other CMS, Media Wiki is not that easy to deal with...mainly when it comes to properly implementing a few extensions. There are a whole lot of JavaScript files which needs to be handled and handled really well. 

My initial task was to document how to get the 'Citation' template on my own wiki editor's toolbar. After small struggle through a few complicated and messy JavaScript files, that work finally got done. 
The next challenge was or rather still is to customize the options of the Citation template (which generally is hard coded).

Well, sometimes struggling with very basic stuffs, I have learnt a lot about MediaWiki in general. The IRC channels and mailing lists are fabulous sources of information regarding all the development in the same domain. Have not only installed MediaWiki some 10+ times on my local host in several ways just to try new things out; but also have actually taken a session in my own class (in college) on Media Wiki as a CMS (its installation process and more).

My work with Media Wiki can be tracked from here. All the links to all documentations done against my work are on this user page.


If you like the blog, you may also want to checkout Priyanka's website