Help:Extensions/Semantic MediaWiki

The Dota 2 Wiki uses Semantic MediaWiki, a MediaWiki extension that lets you store and query data within the wiki's pages.

What do I have to know about Semantic MediaWiki?
Nothing. Semantic MediaWiki works in the background, so you don't need to worry about it unless you are adding, removing, or renaming parameters on a template that uses Semantic MediaWiki (like Template:Hero_infobox), or unless you are modifying a Semantic MediaWiki query (like the one in Hero Stats).

Why do we use Semantic MediaWiki?
We can change a value once, and it updates everywhere on the wiki, such as pages in other languages. It also enables us to build dynamic tables, such as a list of Heroes who have unusual sight ranges, or a list of the fastest Heroes, that are always up to date.

I want to start exploring on my own
Semantic-mediawiki.org is the main website. It has a good user manual.

To explore how Semantic MediaWiki is used on Dota 2 Wiki, check out Special:Properties. "Browse Properties" (on the sidebar) on any Hero. Use Special:Ask to help you create a query. Hero Stats is a simple query. Template:Hero infobox wrapper is a template that uses queries. Template:Hero infobox contains code that sets properties.

What are the guidelines for using Semantic MediaWiki on Dota 2 Wiki?
Semantic MediaWiki can become complex if it is not implemented deliberately. This can result in high resource use on the web server, and discourage new editors. Curse will uninstall Semantic MediaWiki if it takes too many resources.

Semantic MediaWiki should remain in the background, and should not intimidate new editors. Accordingly, we use Semantic MediaWiki exclusively through semantic templates and argument declaration in templates. See Template:Hero infobox for examples of how this is done. We do not use any Semantic MediaWiki extensions, such as Semantic Forms or Semantic Drilldown.


 * Currently, our only schema is a Hero schema; that is, Heroes are the only pages with semantic properties.
 * Do not create new properties or new schemata on your own. Seek consensus among other users that such properties and schemata are desirable.
 * Just because it is possible to create new properties does not necessarily mean it is a good idea.
 * When working with code that sets properties, try to do things correctly the first time. Semantic MediaWiki can take many minutes to propagate changes.
 * Use comments liberally to annotate Semantic MediaWiki code wherever it is used.
 * Complex queries (such as queries that depend on other queries) can drain resources quickly. Unfortunately, there is no straightforward way of measuring this.

Technical Details
You can check the version of Semantic MediaWiki and Validator (a prerequisite extension) at Special:Version. It was first installed May 10, 2012. All settings are default, except the required changes to $smwgNamespaceIndex.