Extension:Semantic Watchlist

From MediaWiki.org
(Redirected from Semantic Watchlist)
Jump to: navigation, search
shortcut: SWL
MediaWiki extensions manual - list
Crystal Clear action run.png
Semantic Watchlist

Release status: beta

Implementation Special page, API, User interface, Ajax
Description Watchlist and notifier for changes to semantic properties
Author(s) Jeroen De Dauw, Nischay Nahata
Last version 0.2 (November 2012)
MediaWiki 1.17.0 or higher
PHP 5.2 or above
Database changes yes
License GNU GPL v3+
Download
README
Parameters
  • $wgDefaultUserOptions
    (swl_email, swl_watchlisttoplink)
  • $egSWLEnableEmailNotify
  • $egSWLMailPerChange
  • $egSWLMaxMails
  • $egSWLEnableTopLink
Added rights
  • semanticwatch
  • semanticwatchgroups
Hooks used
LoadExtensionSchemaUpdates

SMWStore::updateDataBefore
GetPreferences
UserSaveOptions
SWLGroupNotify
AdminLinks
PersonalUrls

Check usage and version matrix
Bugs: list open list all report

Semantic Watchlist enables users to watch semantic properties by adding a new watchlist page that lists changes to these properties. Users can choose to follow one or more watchlist groups, which are administrator defined, and cover a set of properties and a set of pages (category, namespace, or SMW concept). Notification of changes to watched properties is also possible via email.

Contents

Rationale [edit]

Users often want to keep track of the changes made on a wiki. On small wikis the RecentChanges special page often suffices for this. For bigger wikis, you might only be interested in changes to some of the articles, for example those which you are knowledgeable about, or those which contain sensitive data. The MediaWiki watchlist is a great tool for watching content on per-article basis.

In semantic wikis, you might be interested in only watching changes to semantic properties that you care about. For example, on an auction wiki, the price of an item might be the only thing you are truly concerned about, on the page for that item. The Semantic Watchlist extension allows for such fine-grained watching of changes.

Feature overview [edit]

Requirements [edit]

Semantic Watchlist requires:

Download [edit]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extensions tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extensions branches

Each extension has a master branch containing the latest code (might be unstable). Extensions can have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/SemanticWatchlist directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticWatchlist.git

Installation [edit]

  • Download and extract the files in a directory called "SemanticWatchlist" in your extensions/ folder.
  • Add the following code to your LocalSettings.php (at the bottom)
require_once( "$IP/extensions/SemanticWatchlist/SemanticWatchlist.php" );
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Configure as required (see below)
  • Yes check.svg Done – Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.

Updating from version 0.1 [edit]

If you're updating from version 0.1 to version 0.2 of Semantic Watchlist, you will need to add one more column to one of the SWL database tables. To do that, call the following SQL within the database:

ALTER TABLE /*$wgDBprefix*/swl_groups ADD COLUMN group_custom_texts BLOB NULL

Configuration [edit]

Configuration of Semantic Watchlist is done by setting various global variables in the LocalSettings.php file. These statements need to be placed AFTER the inclusion of Semantic Watchlist. The options, and their default values, are listed below.

Email notifications [edit]

  • $egSWLEnableEmailNotify - whether to email users on changes (default is true)
  • $egSWLMailPerChange - whether to send an email on every change, as opposed to a generic "something changed" email for the first $egSWLMaxMails changes (default is true)
  • $egSWLMaxMails - the maximum amount of generic emails to send about changes until the user actually checks their semantic watchlist (default is 1)
  • $wgDefaultUserOptions['swl_email'] - the value for the user preference to receive email notifications (default is true)

Top link [edit]

  • $wgDefaultUserOptions['swl_watchlisttoplink'] - the value for the user preference to view a top link to the semantic watchlist (default is true)
  • $egSWLEnableTopLink - whether to display a top link to the semantic watchlist (default is true)

Permissions [edit]

Semantic Watchlist adds 2 permissions to MediaWiki: one to use the semantic watchlist (i.e. Special:SemanticWatchlist) and one that allows configuring the watchlist groups (i.e .Special:WatchlistConditions).

Using the watchlist [edit]

Default:

# Users that can use the semantic watchlist.
$wgGroupPermissions['*'            ]['semanticwatch'] = false;
$wgGroupPermissions['user'         ]['semanticwatch'] = true;
$wgGroupPermissions['autoconfirmed']['semanticwatch'] = true;
$wgGroupPermissions['bot'          ]['semanticwatch'] = false;
$wgGroupPermissions['sysop'        ]['semanticwatch'] = true;

Configuring watchlist groups [edit]

Default:

# Users that can modify the watchlist groups via Special:WatchlistConditions
$wgGroupPermissions['*'            ]['semanticwatchgroups'] = false;
$wgGroupPermissions['user'         ]['semanticwatchgroups'] = false;
$wgGroupPermissions['autoconfirmed']['semanticwatchgroups'] = false;
$wgGroupPermissions['bot'          ]['semanticwatchgroups'] = false;
$wgGroupPermissions['sysop'        ]['semanticwatchgroups'] = true;
$wgGroupPermissions['swladmins'    ]['semanticwatchgroups'] = true;

Usage [edit]

The watchlist [edit]

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 [edit]

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 [edit]

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.

Version history [edit]

This is a copy of the release notes file on Git, which might be more up to date than this page.

Version 0.2 [edit]

2012-11-15

  • Special:WatchlistConditions UI improved.
  • Custom text can be sent in emails.
  • Custom text can be set using Special:WatchlistConditions.
  • No email sent to a page's own editor, by default.
  • Fixed deleting of groups, which was not working.

Version 0.1 [edit]

2011-07-30

Initial release with these features:

  • Special:SemanticWatchlist showing 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.

Extending Semantic Watchlist [edit]

Semantic Watchlist is in part a workflow extension, allowing other extensions and tools to interact with it. This is made possible via the hooks and API modules that 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

Internationalization [edit]

Semantic Watchlist is fully internationalized. Translation of Semantic Watchlist messages is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

Authors [edit]

Semantic Watchlist was originally written by Jeroen De Dauw, as WikiWorks consultant for the IEEE. It was then modified by Nischay Nahata, again for WikiWorks and the IEEE. Code and design contributions were also made by Yaron Koren.

Screenshots [edit]

External links [edit]

See also [edit]