Difference between revisions of "Wikispooks:Semantic Objects"

From Wikispooks
Jump to navigation Jump to search
(tidy)
(tidy)
Line 3: Line 3:
  
 
==Objects On WikiSpooks==
 
==Objects On WikiSpooks==
'''All new pages in the {{NS|main}} ''must'' have exactly one object template.'''<br/>
+
'''All new pages ''must'' have exactly one object template.''' Some namespaces, such as {{t|document:}} mandate use of a particular template (e.g. [[Template:Document]], but a choice of templates is available for pages in the {{NS|main}}. In case of doubt, use [[Template:Concept]] to make the page a [[concept]] object.
 
See [[SMWObject]] for an up to date list of objects.<!--
 
See [[SMWObject]] for an up to date list of objects.<!--
 
{| class="sortable wikitable" style="text-align: center; width: 95%"
 
{| class="sortable wikitable" style="text-align: center; width: 95%"
Line 80: Line 80:
  
 
==Object Templates==
 
==Object Templates==
The semantic object templates are deliberately similar. Custom Wikispooks template code silently sets the [[Wikispooks:Semantic Properties|Semantic Properties]] (eventually, almost all parameters will have a corresponding property) and then calls a standrd [[Template:infobox|infobox]] template from [[Wikipedia]] to display the information. These are lightly customised, e.g. with a few extra parameters, such as {{t|{{!}}wikipedia}}.
+
The semantic object templates are deliberately similar. Custom Wikispooks template code silently sets the [[Wikispooks:Semantic Properties|Semantic Properties]] (eventually, almost all parameters will have a corresponding property) and then calls a standard [[Template:infobox|infobox]] template from [[Wikipedia]] to display the information. These are lightly customised, e.g. with a few extra parameters, such as {{t|{{!}}wikipedia}}.
  
 
===Parameters===
 
===Parameters===

Revision as of 12:37, 3 September 2015

SMW.png

Underpinning WikiSpooks' use of Semantic Mediawiki is a set of objects. None of these are complete as yet. The plan is to create templates first, then forms.

Objects On WikiSpooks

All new pages must have exactly one object template. Some namespaces, such as document: mandate use of a particular template (e.g. Template:Document, but a choice of templates is available for pages in the main: namespace. In case of doubt, use Template:Concept to make the page a concept object. See SMWObject for an up to date list of objects.

Object Templates

The semantic object templates are deliberately similar. Custom Wikispooks template code silently sets the Semantic Properties (eventually, almost all parameters will have a corresponding property) and then calls a standard infobox template from Wikipedia to display the information. These are lightly customised, e.g. with a few extra parameters, such as |wikipedia.

Parameters

All the semantic object templates share a common color coding scheme, summarised below:

Blue parameters are for a single Wikispooks page name (If no suitable page exists, then pick a title for a future page)
Brown parameters are for numbers
Green parameters are for comma-separated lists of page names (Or planned page names).
Navy parameters are for dates
Orange parameters are for booleans. (Usually, either "Yes" or just leave blank).
Purple parameters are URLs.
Violet parameters are slash-separated lists.
Pink parameters are for coordinates.
Crossed out parameters were formerly available, but have been upgraded. Some may still work, but do not use these.

Lists

The templates have a lot of Green parameters. These are for comma-separated lists of pagenames. This means that the "," character is a reserved character and so should not be used in ordinary page titles (though it may be used in redirects). If you wish to indicate that a list is known to be incomplete, use the special word "...", which must be at the end of the list. To indicate that it is unknown whether or not the list is incoimplete, end it with the special word "...?"

Subobjects

In the longer term, a wider choice of objects might be beneficial. To do this, rather than code objects from scratch, most new objects will probably be derived as 'sub-objects' from another object types according to the 'type' parameter. These could then have 'type' parameters of their own, allowing sub-sub-objects etc. where needed. For this reason, use of the |type parameter is strongly recommended.

See Also

Wikispooks logo.png Policy.png Wikispooks to do.png Tools2.png SMW.png
Semantic
Mediawiki
Help.png