JMediaWiki Package for Joomla Platform
Prasath Nadarajah
Short description: Mediawiki is a free and open source web based wiki software which runs Wikipedia and thousands of other wiki based sites. Mediawiki provides an API to access and modify wiki features, data and meta-data. The existing php clients for mediawiki is either incomplete or stopped development. The goal of this project is to integrate a client for accessing mediawiki API within the Joomla platform. The new JMediawiki package will allows applications based on Joomla Platfrom to access any mediwiki based sites seamlessly including Wikipedia.
The Project JMediawiki
1. Is this project mainly a project for the Joomla CMS or for the Joomla Platform?
This project is for the Joomla Platform
2. What is the goal of your project? What problem does it attempt to solve?
Mediawiki is a free and open source web based wiki software which runs Wikipedia and thousands of other wiki based sites. Mediawiki provides an API to access and modify wiki features, data and meta-data. The existing php clients for mediawiki is either incomplete or stopped development. The goal of this project is to integrate a client for accessing mediawiki API within the Joomla platform. The new JMediawiki package will allows applications based on Joomla Platfrom to access any mediwiki based sites seamlessly including Wikipedia.
3. Please describe the proposed project in detail.
Introduction
The main goal of this project is to integrate a mediawiki client to access any mediawiki sites. There are some existing php clients to acess mediawiki based websites. The existing php clients are either feature incomplete or stopped active development [1]. A fully featured client within the Joomla Platform will not only benefit the popular Joomla CMS but also attract other developers to the platform who want to create web applications in php that involves interacting with Wikipedia or any other mediawiki sites.
Project Scope
The scope of the project is to cover all the default APIs from mediawiki 1.18.1. See below for a full list of functions with descriptions. This may change with the mentors consent. For now the project does not cover APIs provided by popular extensions as it makes it very difficult to complete within the summer. I am looking forward to complete these functions after Google summer of code.
Grouping the functions
There about 70+ actions (See below) defined in the project scope. Similar to JGithub the functions are grouped into classes based on the entity the actions are performed. Following are the proposed classes in JMediawiki packages.
- JMediawikiObject - MediaWiki API object class for the Joomla Platform
- JMediawiki - Joomla Platform class for interacting with a GitHub server instance
- JMediawikiHttp - HTTP client class for connecting to a MediaWiki instance
- JMediawikiPages – actions related to a pages in the site
- JMediawikiLinks – actions related to links in the site
- JMediawikiSites – generic actions to the site
- JMediawikiFiles – actions related to files in the site
- JMediawikiImages – actions related to images in the site
- JMediawikiCategories – actions related to categorizing objects in the site
- JMediawikiUsers – actions related to users in the site
- JMediawikiSearch – search functionalities in the site
All functions can be experimented using Mediawiki API sandbox [2].
Class Diagram

Output Format
Mediawiki supports a number of outputformats including xml,json,wddx. We chose xml as json callback has some restrictions [3].
Prototype
I have implemented a prototype [1] with one working function getSiteInfo() [2] which returns general information about the site. I am looking forward to implement some more functions before the deadline.
[1] https://github.com/nprasath002/joomla-platform/tree/JMediaWiki/libraries/joomla/mediawiki
[2] https://github.com/nprasath002/joomla-platform/blob/JMediaWiki/libraries/joomla/mediawiki/sites.php
Functions
This is a rough list of new functions. These may change with the mentor’s consent. The name, location may change. Some functions may be dropped, merged or added. Additional helper functions maybe introduced during the project.
|
Class |
Function |
Description |
|
JMediawikiSites |
getEvents |
Get events from logs |
|
getRecentChanges |
Enumerate recent changes
|
|
|
getProtectedTitles |
List all titles protected from creation
|
|
|
getSiteInfo |
Return general information about the site
|
|
|
getMessages |
Return messages from this site
|
|
|
getFeedWatchList |
Returns a watchlist feed
|
|
|
getHelp |
Display this help screen. Or the help screen for the specified module
|
|
|
getParamInfo |
Obtain information about certain API parameters and errors
|
|
|
getRSD |
Export an RSD (Really Simple Discovery) schema
|
|
|
JMediawikiPages |
getPageInfo |
Get basic page information such as namespace, title, last touched date, ...
|
|
getPageTemplates |
Returns all templates from the given page(s)
|
|
|
getPageProperties |
Get various properties defined in the page content
|
|
|
enumeratePages |
Enumerate all pages sequentially in a given namespace
|
|
|
getBackLinks |
Find all pages that link to the given page
|
|
|
getPagebyCategory |
List all pages in a given category
|
|
|
getEmbedin |
Find all pages that embed (transclude) the given title
|
|
|
getImageUsage |
Find all pages that use the given image title
|
|
|
getIWBackLinks |
Find all pages that link to the given interwiki link.
|
|
|
getLangBackLinks |
Find all pages that link to the given language link.
|
|
|
getWatchList |
Get all recent changes to pages in the logged in user's watchlist
|
|
|
getRawWatchList |
Get all pages on the logged in user's watchlist
|
|
|
enumerateByUrl |
Enumerate pages that contain a given URL
|
|
|
getRandomPages |
Get a set of random pages
|
|
|
getQueryPages |
Get a list provided by a QueryPage-based special page
|
|
|
expandTemplates |
Expands all templates in wikitext
|
|
|
parseText |
Parses wikitext and returns parser output
|
|
|
comparePages |
Get the difference between 2 pages
|
|
|
purge |
Purge the cache for the given titles.
|
|
|
rollback |
Undo the last edit to the page
|
|
|
deletePage |
Delete a page
|
|
|
undeletePage |
Restore certain revisions of a deleted page
|
|
|
changeProtection |
Change the protection level of a page
|
|
|
movePage |
Move a page
|
|
|
editPage |
Create and edit pages
|
|
|
patrolPage |
Patrol a page or revision
|
|
|
importPage |
Import a page from another wiki, or an XML file
|
|
|
getRevisions |
Get revision information |
|
|
getDeletedRevisions |
List deleted revisions |
|
|
JMediawikiLinks |
getLinks |
Returns all links from the given page(s) |
|
getiwLinks |
Returns all interwiki links from the given page(s) |
|
|
getLangLinks |
Returns all interlanguage links from the given page(s) |
|
|
getExtLinks |
Returns all external urls (not interwikies) from the given page(s) |
|
|
enumerateLinks |
Enumerate all links that point to a given namespace |
|
|
JMediawikiImages |
getImages |
Returns all images contained on the given page(s) |
|
getImageInfo |
Returns image information and upload history |
|
|
getStashInfo |
Returns image information for stashed images |
|
|
enumerateImages |
Enumerate all images sequentially |
|
|
JMediawikiFiles |
getDuplicateFiles |
List all files that are duplicates of the given file(s) |
|
enumerateFileArchive |
Enumerate all deleted files sequentially |
|
|
uploadFile |
Upload a file, or get the status of pending uploads |
|
|
revertFile |
Revert a file to an old version |
|
|
JMediawikiCategories |
getCategories |
List all categories the page(s) belong to |
|
getCategoryInfo |
Returns information about the given categories |
|
|
enumerateCategories |
Enumerate all categories |
|
|
getChangeTags |
List change tags |
|
|
JMediawikiUsers |
login |
Log in and get the authentication tokens |
|
logout |
Log out and clear session data |
|
|
enumerateUsers |
Enumerate all registered users |
|
|
getBlockedUsers |
List all blocked users and IP addresses |
|
|
getUserContribs |
Get all edits by a user |
|
|
getUserInfo |
Get information about a list of users |
|
|
getCurrentUserInfo |
Get information about the current user |
|
|
getUserContribFeed |
Returns a user contributions feed |
|
|
blockUser |
Block a user |
|
|
unBlockUser |
Unblock a user |
|
|
emailUser |
Email a user |
|
|
watchlistPage |
Add or remove a page from/to the current user's watchlist |
|
|
assignGroup |
Add/remove a user to/from groups |
|
|
JMediawikiSearch |
openSearch |
Search the wiki using opensearch protocol |
|
search |
Perform a full text search |
References
[1] http://en.wikipedia.org/wiki/Wikipedia:PHP_bot_framework_table
[2] http://en.wikipedia.org/wiki/Special:ApiSandbox
[3] http://www.mediawiki.org/wiki/API:Data_formats
4. What will be the end product of your project at the close of the program?
The end product of this project is JMediawiki package complete with tests and documentation and some examples on how to use it.
5. What is your plan for completing the project on time? For example, what are key milestones and what is your rough schedule for achieving them?
|
Timeline |
Milestone |
|
April 23 – May 21 |
Community Bonding Period |
|
May 21 – May 27 |
JMediawiki, JMediawikiObject, JMediawikiHttp |
|
May 28 – June 3 |
JMediawikiUsers |
|
June 4 – June 10 |
JMediawikiPages |
|
June 11 – June 17 |
JMediawikiPages |
|
June 18 – June 24 |
JmediawikiSites |
|
June 25 – July 1 |
JMediawikiLInks,JMediawikiFiles |
|
July 2 – July 8 |
JMediawikiImages, JMediawikiCategories,JMediawikiSearch |
|
Midterm Evaluations |
|
|
July 9 – July 15 |
Test cases, bug fixing, , moving around functions |
|
July 16 – July 22 |
Test cases, bug fixing, , moving around functions |
|
July 23 – July 29 |
Testing, bug fixing and documentation |
|
July 30 – August 5 |
Documentation |
|
August 6 – August 12 |
Documentation, Examples and tutorials |
|
Suggested Pencils Down |
|
|
August 13 – August 20 |
Any other incomplete work |
|
Firm Pencils Down & Final Evaluation |
|
6. What skills would a good mentor for your project have?
Knowledge in Joomla platform.
Familiarity with Joomla
1. Please describe your experience as a Joomla developer or if you have not worked with Joomla before, describe your plans for learning Joomla development.
I am relatively new to Joomla. I am getting familiar with Joomla Plaform by going through books and tutorials about Joomla. I’m interested in working with the Joomla Platform. I,m looking forward to fix more bugs and implement new features to the Joomla Platform.
I have reported a bug with a fix.
https://github.com/joomla/joomla-platform/pull/1024.
I have also worked on a prototype for the proposed project with one working function getSiteMatrix() which returns all the sites in the domain. I am hoping to add more functions
https://github.com/nprasath002/joomla-platform/tree/JMediaWiki/libraries/joomla/mediawiki
Added label management features to JGithub package
https://github.com/joomla/joomla-platform/pull/1124
2. Please attach or provide links to the repositories for one or more examples of your work with Joomla. This can be existing code or code you write as part of this application. If you are new to Joomla please consult with the people on the mailing list, in the skype chats, and in IRC about possibilities for this.
[1] https://github.com/nprasath002/joomla-platform/tree/JMediaWiki/libraries/joomla/mediawiki
[2] https://github.com/joomla/joomla-platform/pull/1024.
[3] https://github.com/joomla/joomla-platform/pull/1124
3. Please describe your familiarity with the development infrastructure used by Joomla, including PHPUnit, Selenium, PHPCS and Git. If these are new to you what are your plans for learning to work with them? We hope you will use the application period to increase your familiarity with these.
I am familiar with PHPUnit and GIt. Here is my Github profile
https://github.com/nprasath002
I will go through with selenium and PHPCS and in the coming days
4. Optional: Attach or provide links to an example of non-Joomla code that reflects your development skill.
|
Project |
Decscrption |
Keywords |
Links |
|
Extending WordPress Webservies |
Successfully Completed Google Summer of Code 2011 with WordPres |
WordPress, web services, XMLRPC, php |
http://gsoc.svn.wordpress.org/2011/nprasath002/ http://gsoc2011.wordpress.com/extending-wp-webservices/ The project is merged with the trunk and will be available from WordPress 3.4 http://core.svn.wordpress.org/trunk/wp-includes/class-wp-xmlrpc-server.php |
|
WordPress |
Active Contributor. Contributed over 30+ patches to the core. |
WordPress, php, sql |
|
|
RemoteBlogger |
Blogging Client for WordPress for publishing blogs |
WordPress, Java, Netbeans Platform, XMLRPC |
|
|
Apache Synpase |
Implemented a new load balancing algorithm |
Java, ESB, web services mediation engine |
In addition to that i have completed a 6 month internship at WSO2, a pioneer in webservices, middleware and SOA. I worked on WSO2 Stratos cloud platform where my role was to fix some bugs in two modules
Autoscalar - automatically scales in Amazon public cloud where the module will create/kill EC2 instances on demand
Load balancer - Keeps track of Amazon EC2 nodes created and distribute the load among live EC2 instances.
involvement with the Joomla community
1. How have you been involved in the Joomla! Community? For example, have you participated in the Joomla Bug Squad, development mailing lists, the joomla.org family of websites, Joomla events or in other ways?
I was able to report a bug in the Joomla Platform with a fix.
https://github.com/joomla/joomla-platform/pull/1024
Added label management features to JGithub package
https://github.com/joomla/joomla-platform/pull/1124
I am also following all the mailing lists and have been involved in some threads
2. Have you released any extensions or provided support or services (volunteer or commercial) to Joomla users outside of the official Joomla project?
I have experience in setting up Joomla websites
3. If you have not been involved with the Joomla community before how do you plan to become involved?
I’m getting familiar with the Joomla Platform now. I’m planning to concentrate more by fixing some more bugs, writing platform examples and a few blog posts.
4. Besides working on your project, what are your plans for involvement with Joomla? Do you expect to remain involved with Joomla after the completion of your project? If so, how?
Yes. I am hoping to contribute to the Joomla Platform in the areas of web service integration. I am also looking forward to get actively involved in the community by helping in the mailing lists, fixing bugs and helping to maintain web service and related packages in the Joomla Platform
participation in the Google Summer of Code project with the Joomla! Project
1. A requirement for successful completion of the project is that students publish a minimum of three blog posts or articles on the joomla.org family of sites. Do you agree to complete this requirement?
Yes. I will publish weekly blog posts on my project status.
2. A requirement for successful completion of the project is that you be in contact with your mentor or project administrator at least once a week. Do you agree to complete this requirement?
Yes.
3. During the summer there will be meetings, webinars and other possible online events for students and mentors. Do you agree to make a commitment to attend as many of these as possible given your time zone?
Yes
4. The Joomla project has a code of conduct (lhttp://www.joomla.org/about-joomla/the-project/code-of-conduct.html). Do you agree to comply with the code of conduct?
Yes
5. The Joomla project requires code contributors to complete the Joomla Contributor Agreement http://developer.joomla.org/contributor-agreements.html. Have you completed this agreement or do you commit to completing it prior to the commencement of the program?
I have already signed for the contributor agreement.