Jump to content

Extension:Semantic Structured Discussions

From mediawiki.org
MediaWiki extensions manual
Semantic Structured Discussions
Release status: stable
Implementation Data extraction
Description Adds semantic annotations to Structured Discussions topics
Author(s) Marijn van Wezel (Wikibase Solutions)
Latest version 1.7.1 (2023-02-27)
MediaWiki 1.35+
PHP 7.4+
License GNU General Public License 2.0 or later
Download

The Semantic Structured Discussions extension adds semantic annotations to Structured Discussions topics that can be queried through Semantic MediaWiki.

Usage

[edit]

The annotations are processed in the background, whenever a new topic is created or an existing topic is updated. The following properties are available:

  • Topic creator: The creator of the topic;
  • Topic modification date: The date at which the topic was last modified;
  • Topic owner: The subject page to which this topic is belongs (for example "Main Page" for "Talk:Main Page");
  • Topic owner namespace: The namespace ID of the Topic owner page;
  • Topic title: The title of the topic;
  • Topic summary: The summary of the topic (only available if the topic is summarized);
  • Topic is locked: Whether the topic is locked.

Any replies to a topic are added as subobjects. These subobjects have the following properties:

  • Reply content: The content of the reply;
  • Reply creator: The creator of the reply;
  • Reply modification date: The date at which the reply was last modified.
  • Reply owner: The subject page to which the topic of this reply belongs (for example "Main Page" for a reply on "Talk:Main Page");
  • Reply owner namespace: The namespace ID of the Reply owner page.

Installation

[edit]
This extension requires Semantic MediaWiki and Structured Discussions to be installed and enabled.
  • Download and place the file(s) in a directory called SemanticStructuredDiscussions in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SemanticStructuredDiscussions' );
    // 2600 is the namespace ID of the 'Topic' namespace; using NS_TOPIC is not possible here, since it has not been declared yet
    $smwgNamespacesWithSemanticLinks[2600] = true;
    
  • Run the "rebuildData.php" maintenance script to initialize the properties for existing Structured Discussions topics.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.