Extension:Semantic Extra Special Properties

This extensions, when used with Semantic MediaWiki, adds some extra special properties to all content pages in the wiki. 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. If 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 deault, 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 $smwgPageSpecialProperties in LocalSettings to enable properties offered, like this:

$smwgPageSpecialProperties2[] = '_EUSER';// Add properties for contributing users $smwgPageSpecialProperties2[] = '_CUSER';// Add property for creating user $smwgPageSpecialProperties2[] = '_REVID';// Add property with current revision ID $smwgPageSpecialProperties2[] = '_VIEWS';// Add property with number of page views. Note that depending on local settings this value might not be very up to date. If wgDisableCounters is set to true this property will not be set $smwgPageSpecialProperties2[] = '_NREV'; // Add property showing an estimated number of total revisions $smwgPageSpecialProperties2[] = '_TNREV';// Same but for the talk page, i.e. showing how much discussion is going on around this page $smwgPageSpecialProperties2[] = '_SUBP'; // Add properties pointing to subpages

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
 * 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
 * Added SUBP, NREV and TNREV


 * 0.1 First version