Extension:Semantic Extra Special Properties

This extensions, when used with Semantic MediaWiki, adds some extra special properties to all content pages in the wiki. Having Semantic MediaWiki installed is a precondition for the SemanticExtraSpecialProperties extension; the code will not work without it. It was tested and is working with MW 1.18 and SMW 1.7.

You will have to state explicitly in LocalSettings.php which properties you want to include, using the array $smwgPageSpecialProperties2. (Just like with $smwgPageSpecialProperties in recent versions of SMW.)

Please note that this might reveal users that are otherwise hidden to some usergroup, as the article author property will list all authors for everyone.

Properties
This is a list of extra special properties that can be enabled. If enabled, they will be applied to all pages
 * EUSER: Contributing users
 * CUSER: User that first created a page
 * REVID: Current revision ID
 * VIEWS: Number of page views. Note that depending on local settings this value might not be very up to date. In case $wgDisableCounters is set to true this property will not be set
 * NREV: Estimated number of total revisions
 * TNREV: Estimated number of total revisions for the talk page, i.e. showing how much discussion is going on around this page
 * SUBP: subpages

Installation
Download the extension as tar.gz or zip and unpack it to your extensions folder (normally ). You can also cut and paste the code from SemanticExtraSpecialProperties.php and SemanticExtraSpecialProperties.i18n.php, and put the files in a directory named SemanticExtraSpecialProperties in your extensions directory.

To install this extension, add the following to LocalSettings.php:

Enable whatever properties you want to use in you wiki (see below). By default, they are all turned off. Then run the database upgrade script on Special:SMWAdmin to apply new properties, without having to wait for all pages to be edited by someone.

Configuration parameters
Use  in LocalSettings.php to enable properties offered, like this:

...or to enable them all in one line:

Add  to LocalSettings.php to ignore all users with bot flag when creating the article author properties. This does not affect the article creator property.

Change log

 * 0.2.1
 * German translation by Kghbln
 * Better method to fetch list of EUSER (getContributors and getUser, instead of getLastNAuthors. Anonymous users will never be listed)


 * 0.2
 * Only tested with SMW 1.7 and MW 1.18.
 * Changed name for EUSER and and CUSER props in both English and Swedish, article -> page for clarity.
 * Using $smwgPageSpecialProperties2 to chose which properties to set, the same way as $smwgPageSpecialProperties is used for built in special properties
 * Ignoring _VIEWS if statistics are disables in LocalSettings.php
 * Added SUBP, NREV and TNREV


 * 0.1 First version