User:Silverfish/SMW Guide
This is a basic Guide to Semantic Mediawiki. The basic idea behind Semantic Mediawiki is that wikipages have properties, that are given values that describe themselves. For example, an Episode page on this wiki could have a Location property, and the value is simply the location that episode was filmed at. Properties have types, that describe the type data they contain. Location would probably be Page, as the location would have a page.
Release Date Example
I have set up an example, that I think will be useful. ReleaseDate is a property that gives the date when an episode was released. User:Silverfish/Test Feed Dump Page is a test page that I have setup with the ReleaseDate property set to May 25, 2011. Notice that the date looks normal in the article, but if you click browse properties, you can see the property ReleaseDate, with the air date of 25 May 2011. This was done using a template, which is the recommended way of including properties. In the article, you can see the template {{ReleaseDate|May 25, 2011}}, ReleaseDate is the template name, and the date is the only parameter.
The template is here: Template:ReleaseDate. If you look at the details it is '''Date:''' [[ReleaseDate::{{{1}}}]] [[ReleaseDay::{{#time: d|{{{1}}} }}|]][[ReleaseMonth::{{#time: m|{{{1}}} }}|]][[ReleaseYear::{{#time: Y|{{{1}}} }}|]]. The release date is passed as a parameter, and will be processed as '''Date:''' [[ReleaseDate::May 25, 2011]] [[ReleaseDay::{{#time: d|May 25, 2011 }}|]][[ReleaseMonth::{{#time: m|May 25, 2011 }}|]][[ReleaseYear::{{#time: Y|May 25, 2011 }}|]]. That is in the syntax for Semantic Mediawiki. It says [[ReleaseDate::May 25, 2011]]</nowki> means that the page it is inserted into (in this case using a template) has the property ReleaseDate, and value May 25 2011. It is generally recommended to only use this markup inside the template, and use the template to include the property on a page. It also adds the heading, and derives a ReleaseDay, ReleaseMonth, and ReleaseYear properties from the date. Finally, if you click on the ReleaseDate Property, or click here [[Property:ReleaseDate]], you can see Date is listed. This is the type of the property, and indicates that the ReleaseDate is a date, so the system knows how to interpret it. You can edit the page to see the only markup is <nowiki>[[Has type::Date]]. That indicates that the property has the Date type, and you can replace Date with another type as appropriate. See [1] for more details. In fact, this means the Property page has property "Has type", with value "Date", as Property pages can have properties too.
Location Example
I have now set up Location as a property, that gives the filming location for an episode. The Property can be includes multiple times if an episode has multiple locations. It is used in User:Silverfish/Test Feed Dump Page, which uses Template:LocationPlain, which includes similar semantic mediawiki markup to the one for ReleaseDate. The markup is [[Location::{{{1}}}]].If you look at Property:Location, you can see the type is Page, as the Location will link to the article for the relevant location. Strongbadia is includes as a test, to see if it will accept Pages without articles, which it does.
There's Also Template:Location as used on User:Silverfish/Test_Feed_Dump_Page_2. Both templates only work for one location currently.
Appearance By Example
I have now set up AppearanceBy as a property, to indicate that someone appeared in a video or podcast. The Property will usually be includes multiple times when there are multiple people in the episode. It is used in User:Silverfish/Test Feed Dump Page, which uses Template:AppearanceByPlain. If you look at Property:AppearanceBy, you can see the type is Page, as there will be a link to the person making an appearance.
There's Also Template:AppearanceBy as used on User:Silverfish/Test_Feed_Dump_Page_2. That template will currently work with up to 4 cast members, but it will need testing.
Edited By Example
EditedBy has the same setup as AppearanceBy, but the template with formatting is currently setup for only one editor.
So that's the basic idea, and I will probably be adding to this later. I recommend looking at the Introduction to Semantic MediaWiki for more information [2]
Summary
Below is a list of the main properties, the main template that applies them with the heading, the plain version, and the number of entries the main template supports. The plain version only supports 1 entry.
There's also the Template:VitalStatisticsFeedDump, which is for feed dump episodes, and adds the appropriate headings, and adds the values to the appropriate headings.
| Heading | Property | Parameters |
|---|---|---|
| Date | Property:ReleaseDate | Date |
| Host | Property:HostedBy | Host |
| Cohosts | Property:CohostedBy | Cohosts1-4 |
| Editing | Property:EditedBy | EditedBy |
| Supervising Editor | Property:EditedBy | SupervisingEditor |
There is also Template:VitalStatisticsMTGDraft, for MTG drafts, with the following properties and parameters.
| Heading | Property | Parameters |
|---|---|---|
| Date | Property:ReleaseDate | Date |
| Drafters | Property:DraftedBy | Drafter1-4 |
| Category | Property:EpisodeCategory | N/A - Always Magic the Gathering |