User:Badon/Extension:Semantic MediaWiki/Manual

Semantic MediaWiki is a system. An integrated approach is needed to make sense of how to use SMW, which itself aims to make the data in a wiki more useful. SMW documentation is scattered across several extension pages as well as many different websites, some of which are occasionally down for maintenance. This page is intended to provide supplemental information, and link all available information in one easily-accessible place.

Semantic MediaWiki
See also: Extension:Semantic MediaWiki.

Stay in the loop

 * Mailing lists
 * MWUsers forum
 * Bugzilla, All SMW-related bugs

TODO
If you want to do any of these things, contact badon. It might be possible to arrange some donated funding for you.


 * Add jqPlot and PHPlot to Semantic Result Formats for enhanced data visualization.
 * Create Extension:ImageAnnotator to ease installation of ImageAnnotator. Currently installation must be done manually, and all scripts, templates, messages, etc are tuned for only WikiMedia Foundation wikis. An extension can make it simple to install on any wiki. You may view changes done to make it work on a private MediaWiki installation here:
 * Create Extension:Semantic_ImageAnnotator to enable Semantic Forms in ImageAnnotator, so image annotations can be part of SMW's semantics.
 * Extension:Collection needs to support parser functions and work with SMW's property syntax

Shortcomings and limitations

 * Cannot traverse property "chains" easily with ordinary queries.
 * "Lite" version for Wikipedia will not be able to do queries at all.
 * Semantic forms cannot create file pages
 * SMW persistently shows deleted pages

Needed special properties

 * Page name
 * Page categories
 * Page templates
 * Page forms
 * Page number of edits
 * Page number of links outbound
 * Page number of links inbound
 * Page size
 * Page number of views
 * Page modification date - already implemented
 * Page creation date - in progress
 * Page creator
 * Page editors
 * Page last editor
 * User registration date
 * User number of edits

Of those in the above list, these are currently doable, mostly with workarounds, and should have lower priority:


 * Page name - store manually with magic word
 * Page categories - store manually, also queriable as ?Category
 * Page templates - store manually
 * Page forms - store manually
 * Page modification date - already implemented

These are available in Extension:SemanticExtraSpecialProperties:


 * Page creator
 * Page editor
 * Revision ID
 * Number of page views

This list of needed special properties is taken from these three sources:


 * http://smw.referata.com/wiki/Add_page_metadata_properties_to_a_page_(using_DPL)
 * https://bugzilla.wikimedia.org/show_bug.cgi?id=13151
 * https://bugzilla.wikimedia.org/show_bug.cgi?id=29988 (mentions they need need to show in SMW factbox)

And consolidated here:


 * https://bugzilla.wikimedia.org/show_bug.cgi?id=30610

Page creation date has turned out to be critical:


 * https://bugzilla.wikimedia.org/show_bug.cgi?id=30784

Additionally, special properties do not show up in the SMW factbox:

https://bugzilla.wikimedia.org/show_bug.cgi?id=30628

Future goals

 * Extension:Page_Schemas
 * SMW roadmap
 * To do list

How to

 * SMW tips
 * User:Badon/Extension:Semantic MediaWiki/Manual/Using templates to custom format a table query
 * User:Badon/Extension:Semantic MediaWiki/Manual/Using templates to custom format multiple queries in a single table
 * User:Badon/Extension:Semantic MediaWiki/Manual/Properties should point from child to parent
 * User:Badon/Extension:Semantic MediaWiki/Manual/Introduction to queries of interconnected properties
 * User:Badon/Extension:Semantic MediaWiki/Manual/Querying forward from child to parent through a property chain
 * User:Badon/Extension:Semantic MediaWiki/Manual/Querying backward from parent to child through a property chain
 * User:Badon/Extension:Semantic MediaWiki/Manual/Run a query only once
 * User:Badon/Extension:Semantic MediaWiki/Manual/Semantic naming best practices

Semantic Forms
See also: Extension:Semantic Forms and Extension:Semantic Forms/Manual.


 * Extension:Semantic Forms/Version history
 * Extension:Semantic Forms/Code structure
 * Extension:Semantic Forms/Example
 * Extension:Semantic Forms/MediaWiki red links code change
 * Extension:Semantic Forms/Defining new inputs


 * Extension:Semantic Forms/Manual/The forminput parser function
 * Extension:Semantic Forms/Manual/The formlink parser function
 * Extension:Semantic Forms/Manual/Special:AddData
 * Extension:Semantic Forms/Manual/Preloading data

How to

 * User:Badon/Extension:Semantic Forms/Manual/Using Semantic Forms for file pages and uploads
 * Extension:Semantic Forms/Manual/Display or hide fields depending on user selections
 * Extension:Semantic Forms/Manual/Hide the Edit with form tab for non logged-in users
 * User:Badon/Extension:Semantic Forms/Manual/Check for previous existence to ensure uniqueness of a submitted property
 * User:Badon/Extension:Semantic Forms/Manual/Conditional branching of forms
 * User:Badon/Extension:Semantic Forms/Manual/Multiple values for the same field

Shortcomings and limitations

 * Display_points fails in templatized queries with unnamed parameters because points are delimited by semicolons, but Semantic Maps cannot handle a semicolon on the last point. This can be worked-around with more complex conditional code to find the last point, and ensure it does not have a semicolon. See https://bugzilla.wikimedia.org/show_bug.cgi?id=30534
 * Maps do not work in most situations when a map is generated within a template. A workaround is available for 1.0.1. Version 1.0.4 of the Semantic Maps bundle cause a wiki to completely cease functioning, and 1.0.3 causes the workaround used in 1.0.1 to fail. 1.0.2 has not been tested. https://bugzilla.wikimedia.org/show_bug.cgi?id=32416#c10