Overview[]
Semantic Mediawiki, a.k.a. SMW, is an enabled extension that is currently used to organize data about pins, items, etc.
Deprecation[]
Fandom (called Wikia at the time) stopped installing SMW on new wikis as of late 2012 due to server strain/performance issues, bugs, and limitations. For more information, please see this page, found via this user blog on this wiki.
Possible Replacement[]
Current wiki editors are unsure if there is a suitable replacement for SMW on the wiki, though ideas and input are appreciated. Please feel free to make a thread on the wiki forum to discuss SMW and possible replacements.
Links[]
- Help:Semantic MediaWiki
- general description
- User Manual
- Especially useful is How to format query output
- Similar project at GuildWiki
- Somewhat dissimilar project, part of Familypedia, the biggest Semantic Wikia
Properties[]
These are the properties currently defined for the pins. No need to do anything special, as you type information into the templates, these properties will be automatically updated. It does take some time, however; some changes don't update until the admin runs a special "update" script (which is about once a day or so).
Where Semantic Stuff is Used[]
- Pin
- Properties are defined in the template Template: Pin box, used in all pin pages (see Category: Pins)
- Queries are used in Template:Pins of psych, used in every individual psych page (see Category: Psychs)
- Items
- Properties are defined in the templates Template:Thread box, Template:Food box, Template:Swag box, used in all item pages (see Category: Items)
- Queries are used in Thread List, Food List New, Swag List New
Examples[]
Here's a few examples of what SMW can do. Note the top-of-column icons that let you sort by any column.
List all the pins with Piercing Pillar psych, showing their name, brand and element:
Name | Brand | Elm | |
---|---|---|---|
Black Uranus | Black Uranus | Gatito | Neg |
Blizzard Cool | Blizzard Cool | D+B | Neg |
Frozen Cool | Frozen Cool | D+B | Neg |
Great Physical Power | Great Physical Power | Unbranded | Neg |
Ice Blow | Ice Blow | D+B | Neg |
Ice Risers | Ice Risers | D+B | Neg |
Tigris (Pin) | Tigris | Unbranded | Neg |
Tin Pin Shiva | Tin Pin Shiva | Unbranded | Neg |
List the top 10 heaviest pins:
Name | Weight | |
---|---|---|
100,000 Yen | 100,000 Yen | 10 |
Anguis (Pin) | Anguis | 10 |
Lucky Star | Lucky Star | 10 |
Hip Snake (Pin) | Hip Snake | 10 |
Indestructo Man | Indestructo Man | 10 |
Wassup Voltage! | Wassup Voltage! | 10 |
Wassup Lightning! | Wassup Lightning! | 10 |
Wassup Thunder! | Wassup Thunder! | 10 |
Icy Stare | Icy Stare | 10 |
Cold Stare | Cold Stare | 10 |
... further results |
Outstanding Issues[]
User-Defined Types[]
- Can we define a number type that also can have "---" as a special valid value?
- Not now, and probably never
- Can we define which properties must be present for an item, so that if absent, it's flagged as missing data?
- Not now, and probably never; will continue to use templates for this
- Can we map string values into images, links, and display titles, so that when Pos is encountered in Element property, it's actually displayed as or as a link, or something like that?
- Not now, and probably never; will continue to use templates for this
- Can we tell numeric values to accept formats like 6,300, but display everything as 6300?
- Maybe, we would need a parser to delete the commas and stuff
- can we create a string-like type whose valid values are "001" through "304"
- Not now, maybe in the distant future?
- For the above type (001..304 range), can we define numerical operations?
- Not now, and probably never; but luckily we don't need it, since alphabetical sort works fine
- Can we say, in the property page, that certain values are equivalent? e.g., 'case doesn't matter'; or 'yes' is same 'y'? 'E' same as 'Easy', etc.?
- Not now, and probably never; but there's an argument that this shouldn't be needed, since data typed in should be consistent to begin with
- Also, "y" is actually equivalent to "yes" already, using type boolean
Data Validation[]
- can we enforce the use of correct units for numeric fields? or prohibit units altogether?
- Not now, and probably never
- can we say something in the Property page that prevents it from being displayed in the page at all?
- No; we just use space after the pipe: [[PropertyX::valueY| ]]
- how do we touch all relevant pages using pywikimedia (and which pages is it? just definitions and queries?)
- Use archive/touch.py script
- can we use regex to validate data fields?
- Not now, maybe in a distant future
Display[]
- can we display all values of a given property (e.g., Psych, for use in Psych)
- Maybe
- can we display all invalid data over the whole wiki?
- Maybe
- can we tell a string-type property to actually display a link, but according to *our* rules (like ignore ending +, etc.)?
- Not now, and probably never
Functions on Properties[]
- can we use any kind of functions inside property page? e.g., 'dropped by raw::No. 25 Easy/Normal' would automatically define properties 'dropped by::25E', 'dropped by::25N'
- Not now, and probably never
Data Organization[]
- how to deal with the + version of psychs, like Mobility Blight+? Create a separate page for them? Or just extend query to have +?
- Ideally, we'd say that one is a enhanced version of the other, and add enhanced version into the query; but that means creating lots of pages for no other reason than to satisfy SMW; so maybe we just use hacks instead