User:Erangamapa/mygsoc
This is my GSoC project proposal to participate in Google Summer of Code 2012 with Wikimedia Foundation. I am particularly interested in integrating "Who's been awesome?" to MediaWiki suggested by User:Jalexander.
Identity
editName: Eranga Mapa
Email: erangamapa gmail.com
Project title: Editor Rewards.
Contact/working info
editTimezone: UTC/GMT +5:30 hours
Typical working hours: 9am to 11pm
IRC or IM networks/handle(s): Both my Skype name and Freenode IRC nickname is mapahere. For gtalk erangamapa@gmail.com
Project summary
editThis project is based on the idea proposed by User:Jalexander who offers to mentor.
MediaWiki is adopted for many wikis where number of users involved in writing and editing articles. But there is no proper way to allow those users to appreciate each others work such as good article writing. But, by integrating "Who's been awesome?" functionality to MediaWiki, wiki users will get a chance to reward other wiki users who helped them in their work. After a particular user makes 100 edits to a wiki, once a three months, a link will be provided in the top navigation bar. User can follow this link to praise other users based on their commitments towards that wiki. Those praises will be stored and available publicly via an API for merchandise purposes. Apart from that they will be fed into Moodbar Dashbord.
For this purpose I am introducing an Extension called Editor Rewards for MediaWiki.
This extension will work based on the user data such as user names and user edits on MediaWiki. In this extension, a function Hook will be created for ArticleSaveComplete event. An evaluation function attached to that hook will check for two things. First it will check whether the user who is saving the article has done 100 or more edits. Then It will check whether time since last praise by that user exceeds three months. If so, a link mentioning "Know an editor who deserves a reward?" will appear in top navigation bar.
When user clicks on "Know an editor who deserves a reward?", popup box with a form will appear. From there onwards, user can submit a praise for another user or take a different action as preferred. A database table will be created for this extension in MediaWiki database. Submitted praises will be saved in that table. Those praises will be shown in a Special Page created for the extension. Data collected from this extension will be available through MediaWiki web service API. It can be used to access data related to this extension and use for merchandise purposes. Praises collected by this extension will be published to MoodBar Dashboard using API calls internally.
Deliverables
editRequired deliverables
edit- Adding a JQuery module to load the link "Know an editor who deserves a reward?" to top navigation bar. When user moves the mouse pointer on to the link, a tool tip will appear mentioning "Click here to praise a Wikiuser who helped you". This will help to guide the user.
- Adding a JQuery module to view required UIs. Set of popup boxes will be created in this module using JQuery Overlay. After a user clicks on the above mentioned link, following popup boxes will appear one by one according to user's actions.
- When a user clicks on the link, a popup box with a label, text box and a text area will appear. Label will contain a description about this MerchTool. Text box is to name users who deserve a praise. This text box will have the AutoCompletion by using Ajax asynchronous queries. When user types first few letters of a Wiki username, suggestion list will be provide. Then user can easily select a name of a user for praising. Text area is to write the praise. Apart from those, there will be a submit button and "No thanks" link. By clicking the submit button, values in text box and text area will be validated. Then they will be saved to the database table using an Ajax call. Errors occurred during saving or validating data will be shown appropriately.
- After clicking the submit button, circular progress indicator will appear until data get saved in the database table. Then thanks box will appear. In that box, there will be a label containing an appreciation message for the user who praised. There will be a button mentioning "Back to what I was doing". It will direct that user to the Wiki page which he was working.
- If user clicks on "No thanks" link from first, another popup box will appear. It will have four buttons with following labels.
- Please let me know next time - By clicking on this button, user can avoid praising this time. Then link will disappear. After three months, link will appear again for that user by editing an article.
- I just need a bit more time. Keep the banner up now - By clicking on this button, popup box will be hidden. But, link will exist until user ends his session.
- No thanks, Please don't ask me again - When user clicks this button, link will not be appearing again for that user.
- Back - By clicking on this, user can go back to UI with praising form.
- Special page to view praises done by users. This page will have a table implementation using MediaWiki table markup.
- It will contain following columns.
- User - Name of the user who got praised.
- Praised by - Name of the user who did the praise.
- Praise - Praise done by the user in Praised by column.
- Date of Praise
- There will be inappropriate comments added by users. If those get published in this special page for all users, it will be unpleasant. Therefore to prevent that, a User Right will be added to view this special page. By using this user right, we can allow access to this special page only for specific user groups(Admins).
- An API module to make available data collected by this extension as a web service. API right will be added to control access to this API. Access will be permitted for API users upon submitting a login query. By using this API, a developer can read praises towards a particular user and praises from a particular user in XML format.
- Praises from this extension will be published in MoodBar Dashboard.This will be achived using API calls from MoodBar to Editor Rewards(this extension). A checkbox option will appear under types in MoodBar dashboard to filter praises.
- Required Documentation for this extension which includes how to setup and how to use it.
If time permits
edit- Sending merchandise to users.
- This can be done using one of the following two approaches.
- An email will be sent periodically(or after collecting certain number of praises) to users including praises. This will be done using MediaWiki UserMailer class. This email will include praises and names of users who praised for them.
- A JQuery notification module will be created to notify users when there are new praises for them. When a user logs in, a link to that module will be shown in top navigation bar.
Extension Editor Rewards will be the final deliverable.
Project schedule
editSince I am having exams from 24th April to 3rd May, I will not be able to involve in this project during this period. But after 3rd May, I will be resuming my work and spending more time to cover up things.
Community bonding period
edit- Going through MediaWiki documentation(Already happening).
- Getting familiar with MediaWiki code base(Already happening).
- Communicating with my mentor. Discuss about needed changes and clearing any doubts(Already happening).
- There is a significant involvement in JQuery with this project. Therefore learning further about JQuery.
- Getting used to MediaWiki testing environment(Selenium).
Starting from 21th May, 2012
editWeek 1
Writing an event handling function to handle the event ArticleSaveComplete inside the extension.
Week 2-3
Developing the JQuery module to load the link "Know an editor who deserves a reward?".
- -Writing the CSS file.
- -Writing the JQuery script.
Week 4-6
Developing the JQuery module to show required UIs.
- -Writing required CSS classes for each UI.
- -Developing a JQuery script to view praise submission form, submission progress indicator, thanks form and no thanks form.
- -Creating the database table and writing a database accesse layer.
- -Mapping praise form with database table.
Week 7
Creating a SpecialPage and a table in it to view praises.
- -Creating the special page.
- -Setting up a user right to control access.
- -Creating a table inside the special page.
- -Mapping the table with database table.
Week 8 (July 09 to 15)
- -Testing, fixing bugs and merging code.
- -Getting community feedback.
- -Submitting for mid term evaluations.
Week 9
Implementing the API module
- -Going through MediaWiki API documentation.
- -Deciding on XML formats
- -Setting up user rights to control access to this API
- -Writing the code for MediaWiki API module.
Week 10-11
Integrating this extension with MoodBar Dashboard
- -Going through the documentation and code of MoodBar dashboard.
- -Altering the Moodbar Dashboard Interface.
- -Writing the code to publish praise from database table to MoodBar Dashboard.
Week 12-13
Now, I should be with the schedule. So, I will start to integrate one or both features which I have suggested to send merchandise to users. If I'm behind the schedule, I will be using this time to complete pending tasks.
Week 14 (Aug 20 to 26)
- -Testing, fixing bugs and merging code.
- -Getting community feedback.
- -Submitting for final evaluations.
- -This extension will be documented and added to MediaWiki extension matrix.
At the end of each week, project status will be updated in a subpage. More functions will be added to database access layer in each stage of development.
Aftermath
editAfter the GSoC programe, I will be maintaining this extension. If I haven't done the extra features which I suggested, I will be adding them.
About you
editI'm a 24 year old Computer Science and Engineering undergraduate at University of Moratuwa Sri Lanka. I am passionate about open source software development. So far I have been referring Wikipedia for many purposes and was wondering about how Wikipedia works. Then I came to know about MediaWiki, a nice open source software package which energize many wikis including Wikipedia. I looked into MediaWiki architecture and explored how things happening inside it. I was impressed with its maturity. It's documented well. So I had my first open source contribution by developing Extension:ELearnware to MediaWiki.
Mainly I'm interested in the area of Web Application Development. My appearance to web application development by developing few web sites. Then I learned to prepare web sites using WordPress and Joomla CMSs. Lately, I went more deep into this area by developing some web applications as my university projects. Thereafter I got familiar with many web technologies such as PHP, MySQL and Javascript. Eager to leverage my classroom learning into real world experience, I joined with Monvia Sri Lankan branch, as an outsourced software developer in 2011. In there, I involved in developing a web application with Symfony PHP framework to measure production line performance of a group of garment factories. Now I am working as a Software Engineer at GlomeTec. Apart from web application development I'm interested and experienced in many other areas such as Mobile Application Development, Game Design and Artificial Intelligence.
When talking about my personality, I am a quiet and reserved person. But when get interested, I would like to share my ideas with others and listen to their opinions. During my spare time, I would like listen to music, travel and hang out with my friends. I have a higher motivation to learn and try which drives me ahead.
Participation
editI prefer to work from 7.00 AM to 1.00 PM according to PDT. Most of the time, I will be hanging out in gtalk and willing to go with IRC if needed. I like to use mail threads for important discussions. I prefer to share my source code using Git. Therefore I would like to merge my code with MediaWiki Git repository. MediWiki Subpage will be used to publish my project progress.
Past open source experience
editI have developed many web applications and have used many opensource libraries in them. I am well familiar with technologies used in MediaWiki such as PHP, JavaScript, JQuery and MYSQL. I developed Extension:ELearnware for MediaWiki which can be used to synchronize HTML5 video with content such as rich text and images. Main purpose can be to create rich video lectures synchronized with slides. It introduces two special pages. One is an editor page to chop HTML5 videos and align content with the video. Other special page is to view edited videos synchronized with content.
Any other info
editDatabase table
editDatabase table with the name editor_rewards will be created in MediaWiki database. It will have following major columns.
- ID - An identifier to identify each praise entry.
- got_praised - Person who got praised.
- praiser - Person who did the praise.
- praise_text - text of the praise.
- praise_timestamp - date and time of praise.
Apart from these, there will be a column to save a flag value. When user goes to "No Thanks" link, user will take a different action. Results from those actions will be saved in the flag column. If needed, more columns may be added during development. Dummy data will be added to the database for testing purposes.
UI Mockups
edit-
This is how link will appear in top navigation bar
-
This is praising form
-
This is Thanks UI after praising
-
This is No Thanks UI
-
After clicking on "Going Back to what I was doing". in Thanks UI.
-
After integrating with MoodBar Dashboard.
-
UI for the module to view praises for each user