Forum:EVERYONE READ: Some infobox variables being upgraded to SMW links

From Tardis Wiki, the free Doctor Who reference
IndexTech notes → EVERYONE READ: Some infobox variables being upgraded to SMW links
Spoilers are strongly policed here.
If this thread's title doesn't specify it's spoilery, don't bring any up.

As of May 2012, there are now two ways of making a link to a page. Both of them provide a link to the page Matt Smith. And both of them provide exactly the same tooltip text when you roll over them with your mouse. To all the world, they look and behave the saem way.

Normal Semantic
[[Matt Smith]] [[main actor::Main Smith]]
Matt Smith Matt Smith

The difference is that the semantic link allows us to create an actual database.

It is not a mistake that some infobox variables are now unlinked. Please do not relink them. If your changes result in something that looks like [[main actor::Matt Smith]], then you have created an error, and you should undo your edit.

You can get an idea of the variables which are currently semantically linked by going to the template page for any of the infoboxes, like {{Infobox Individual}}. Then, check to see which variables have red links in the example infobox. These variables are all auto-linked, which means you should enter plain text in the infobox for those variables.

Things you can do with semantic markup[[edit source]]

If we look at the property called "main actor" — found at property:main actor — we can begin to see a little bit of the power. There you'll find a list of all the characters who have that property set for them. So if I wanted to quickly check who played the part of the Knight Commander, I don't have to go to his page. I can just type
{{#show: Knight Commander | ?main actor }}
When i do that, I immediately find that the actor who played the Knight Commander was

Of course that's a very simple trick. What if you wanted to know something more complex — like the name of every Ood character for whom we have a picture, and an actor was formally credited? Sound complicated? So, this isn't every Ood in our database, nor is it every Ood that's appeared on television. It's every Ood with values for property:main actor and property:has image. The code looks like this:

{{#ask: [[species::ood]]  [[main actor::+]] [[has image::+]]
|?main actor 
|?has image =Photo
|format=table
|headers=plain
|mainlabel =Ood
}}

And the results look like this:


Note that the first line in our code, the actual query, is really important. We could alter it a lot of ways:

#ask: [[species::ood]]  [[main actor::+]] OR [[has image::+]]
#ask: [[species::ood]]  [[has image::+]] [[main actor::+]]
#ask: [[species::ood]]  [[main actor::+]] 
#ask: [[species::ood]]  

Keeping the rest of the code the same, each of these has a very different meaning. But they all produce tables with pictures of Ood, character names, and actor names. Play around with it at the sandbox!

These are only two examples of th rich world of possibilities that semantic querying, SMW, offers us. But the whole thing depends on the automatic links that are being retrofitted to infoboxes.
czechout<staff />   03:05: Tue 15 May 2012