Help:$smwgPageSpecialProperties

From semantic-mediawiki.org
Jump to: navigation, search
Title $smwgPageSpecialProperties
Description Sets the page related special properties to be used.
Default setting array( '_MDAT' );
Software Semantic MediaWiki
Introduced with 1.7.0
Deprecated with still available
Configuration Installation
Keyword Page related special properties · Special property · Store
Referenced by N/A

$smwgPageSpecialProperties is a configuration parameter that is used to enable or disable page-related special properties. The setting was introduced in Semantic MediaWiki 1.7.0.

Default setting

$smwgPageSpecialProperties = array( '_MDAT' );

Thus special property "Modification date" is active from start.

Available special properties

The following page related special properties are available for this configurations setting:
Help pageNameAliasDescriptionAddedLabel
Special property Modification dateModification datehas no aliasIt has a fixed value that corresponds to the date of the last modification of each page1.4.0_MDAT
Special property Creation dateCreation datehas no aliasIt has a fixed value that corresponds to the date of the first revision of each page1.7.0_CDAT
Special property Is a new pageIs a new pagehas no aliasMarks a page as being new or not1.7.1_NEWP
Special property Last editor isLast editor ishas no aliasHolds the page name of the user who created the last page revision1.7.1_LEDT
Special property MIME typeMIME typehas no aliasHolds the MIME type of an uploaded file1.9.1_MIME
Special property Media typeMedia typehas no aliasHolds the Media type of an uploaded file1.9.1_MEDIA
Special property Allows patternAllows patternhas no aliasPattern to match a permissible value2.4.0SMW_DV_PVAP
Special property Has uniqueness constraintHas uniqueness constrainthas no aliasRestrict value annotation to be unique2.4.0SMW_DV_PVUC
Special property Display title ofDisplay title ofhas no aliasDisplay an specific denote title for an entity2.4.0_DTITLE
Special property Language codeLanguage codehas no aliasHandles BCP47 conform language codes specifying the language of the annotated text.2.4.0SMW_DV_MLTV_LCODE

Changing the default setting

Changes to the standard setting of this configuration parameter are done in the "LocalSettings.php" file after the inclusion of Semantic MediaWiki. Every time a change to this configuration setting is done, the SQL storage, if used, has to be updated (php maintenance/update.php), and Semantic MediaWiki's data has to be refreshed. See help page Repairing SMW's data for information on how to do this.

Disabling

To disable page-related special properties the following setting is used:

$smwgPageSpecialProperties = array( );

There are different possibilities to enable the available page related special properties. To do this the existing configuration has to be extended by the labels of the respective special properties.

Changing

Adding them with individual settings:

$smwgPageSpecialProperties[] = '_CDAT';

and/or

$smwgPageSpecialProperties[] = '_NEWP';

etc.


Adding them with one setting:

$smwgPageSpecialProperties = array_merge(
       $smwgPageSpecialProperties, array( '_CDAT' )
);

or

$smwgPageSpecialProperties = array_merge(
        $smwgPageSpecialProperties, array( '_CDAT', '_NEWP' )
);

etc.


The above mentioned settings add additional page related special properties to the special property "Modification date" which is automatically set by SMW itself. In case you do not need special property "Modification date" but other page related special properties the parameter setting has to be rewritten entirely:

$smwgPageSpecialProperties = array( '_CDAT' );

only special property "Creation date" is enabled

$smwgPageSpecialProperties = array( '_CDAT', '_NEWP' );

only special properties "Creation date" and "Is a new page" are enabled, etc.


Rewriting the parameter setting is also possible for just adding another page related special property, e.g.:

$smwgPageSpecialProperties = array( '_MDAT', '_CDAT' );

enables the special properties "Modification date" and "Creation date".



This documentation page applies to all SMW versions from 1.7.0 to the most current version.
      Other languages: frzh-hans

Help:$smwgPageSpecialProperties en 1.7.0