Difference between revisions of "Wikispooks:Semantic Objects"

From Wikispooks
Jump to navigation Jump to search
(Expand hardcode)
(Update about template usage)
Line 16: Line 16:
 
| ''None ''
 
| ''None ''
 
| [[Form:Concept]]
 
| [[Form:Concept]]
| The least complete object so far. '''This is a catch all, so if no other template seems to fit, use this one.'''
+
| '''This is the catch all, so if no other template seems to fit, use this one.'''
 
|-
 
|-
 
! [[Document]]
 
! [[Document]]
Line 22: Line 22:
 
| ''None''
 
| ''None''
 
| [[Form:Document]]
 
| [[Form:Document]]
| The most complete object so far, although the template has evolved and still contains some legacy code.
+
| Like website, this has non-standard presentation (No infobox).
 
|-
 
|-
 
! [[Event]]
 
! [[Event]]
Line 40: Line 40:
 
| [[Template:Infobox person]]
 
| [[Template:Infobox person]]
 
| [[Form:Person]]
 
| [[Form:Person]]
| Types= { ? }
+
| ''The most used object.''
 
|-
 
|-
 
! [[Place]]
 
! [[Place]]
Line 58: Line 58:
 
| ''None''
 
| ''None''
 
| [[Form:Timeline]]
 
| [[Form:Timeline]]
| ''None''
+
| ''Currently only used for sub-pages named "Timeline".''
 
|-
 
|-
 
! [[Video]]
 
! [[Video]]
Line 70: Line 70:
 
| ''None''
 
| ''None''
 
| [[Form:Website]]
 
| [[Form:Website]]
| Types= { ? }
+
| Non-standard presentation (No infobox) which might be updated.
 
|-
 
|-
 
! [[Year]]
 
! [[Year]]
Line 76: Line 76:
 
| ''None''
 
| ''None''
 
| ''None''
 
| ''None''
| ''None''
+
| ''Only for calendar years, e.g. [[1984]]''
 
|}
 
|}
  

Revision as of 16:52, 4 July 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 in the main: namespace must have exactly one object template.
The table below lists the possible templates:

Object SMW Template Infobox Template Form Notes
Concept Template:Concept None Form:Concept This is the catch all, so if no other template seems to fit, use this one.
Document Template:Document None Form:Document Like website, this has non-standard presentation (No infobox).
Event Template:Event Template:Infobox event Form:Event Type= { War, Bombing, Meeting, Scandal, Death }
Group Template:Group Template:Infobox organization Form:Group Types= { Nation State, Secret Society, Think Tank, Foundations, Lobby, Corporation, NGO }
Person Template:Person Template:Infobox person Form:Person The most used object.
Place Template:Place Template:Infobox settlement Form:Place Buildings up to provinces
Property Template:Property None Form:Property Types= { Special, Display, Data }
Timeline Template:Timeline None Form:Timeline Currently only used for sub-pages named "Timeline".
Video Template:Video None Form:Website None
Website Template:Website None Form:Website Non-standard presentation (No infobox) which might be updated.
Year Template:Year None None Only for calendar years, e.g. 1984

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 standrd 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.

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