Today I released the first version of a brand new MediaWiki extension titled Semantic Watchlist. It extends Semantic MediaWiki by adding the capability to watch/follow sets of properties for groups of pages (that can be specified with categories and namespaces). You can view changes to these properties via Special:SemanticWatchlist, which works similar to the regular MediaWiki watchlist. And you can even request to be notified via email when a change is made!
Feature overview:
- A watchlist page listing changes to properties watched by the user.
- Per-user optional email notification per edit that changes properties.
- Integration with user preferences to allow users to specify which watchlist groups they want to follow, and if they want to receive emails on changes.
- Special:WatchListConditions as administration interface for watchlist groups.
- API module to query property changes grouped by edit for a single user.
- API modules to add, modify and delete the watchlist groups.
Let’s have a look at the different parts of the interface:
The watchlist
Each user can view changes to properties they watch on Special:SemanticWatchlist, which looks and works similar to the regular watchlist. Items that have not been viewed yet on the watchlist will be indicated as ‘NEW’.
Watchlist preferences
Each user can manage which watchlist groups they follow via their user preferences. They can also choose if they want to receive email notifications or not. These preferences can be found on Special:Preferences, which is linked at the right top of the page in most skins for logged in users.
Watchlist groups
The watchlist groups can be managed via the Special:WatchlistConditions page by people that have the ‘semanticwatchgroups’ right, by default only administrators. Each group has a name, which allows users to easily recognize the groups in their preferences, and a single category, namespace or concept it covers. Only changes to properties on pages in this category, namespace or concept will be shown to users watching this group. Each group also has a list of properties, which further restricts what property changes should be shown to the user.
Email notifications
When you choose to receive email notifications for changes to semantic properties covered by watchlist groups you watch, they will appear both in your watchlist and your inbox. The below screenshot is a simple example of a notification email.
Extending Semantic Watchlist
Semantic Watchlist is in part a workflow extension, which makes it important for other extensions and tools to interact with it. This is possible via the hooks and API modules Semantic Watchlist provides.
API modules:
- addswlgroup: API module to add semantic watchlist groups.
- deleteswlgroup: API module to delete semantic watchlist groups.
- editswlgroup: API module to modify semantic watchlist groups.
- semanticwatchlist: Returns a list of modified properties per page for a persons semantic watchlist.
Hooks:
- SWLBeforeEmailNotify: $group, $user, $changeSet, $describeChanges, &$title, &$emailText
- SWLBeforeEditInsert: &$this
- SWLAfterEditInsert: &$this
- SWLBeforeChangeSetInsert: &$this, &$groupsToAssociate, &$editId
- SWLAfterChangeSetInsert: &$this, $groupsToAssociate, $editId
Further plans
I think this extension opens up a lot of new possibilities for the SMW platform in the area of workflow. Due to it’s API modules and hooks, it’s very easy for other extensions to build on top of the watchlist functionality, so I’m curious as to what will happen there.
This first release comes with core functionality, but at places lacks polish. And since it’s the first release of a somewhat complex extension, I do expect issues to show up in use cases not tested for yet. Both these factors make it likely that a second release will be made relatively soonish.
Since I think this extension is such a great addition to the already awesome SMW environment, I’m going to give a talk about it at the upcoming SMWCon. That’s bound to yield some interesting feedback
Requirements
- MediaWiki 1.17 or above
- Semantic MediaWiki 1.6 or above
- PHP 5.2 or above
Download
- Semantic Watchlist 0.1 download [zip, 7z]
- List of release downloads
- SVN tag checkout: http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticWatchlist/REL_0_1/
- SVN trunk checkout: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticWatchlist/
Some background
I developed the Semantic Watchlist extension as WikiWorks consultant for the IEEE, with some help from Yaron Koren.