Practical Semantic Mediawiki: Difference between revisions

no edit summary
No edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 26: Line 26:
* Semantic Mediawiki adds structured information and views (Wikipedia [http://www.gossamer-threads.com/lists/wiki/foundation/216574#216574 considers their approach])
* Semantic Mediawiki adds structured information and views (Wikipedia [http://www.gossamer-threads.com/lists/wiki/foundation/216574#216574 considers their approach])
** '''We are going to learn markup encoding in order to have more control over content and appearance'''
** '''We are going to learn markup encoding in order to have more control over content and appearance'''
=== To add ===
* culture, content, technology
* distributing content
== The wiki model ==
pages, links, categories


== Access models ==
== Access models ==
Line 141: Line 149:
** Brainstorm using links
** Brainstorm using links


{{Practice|Create a new page that's a unique generally recognized placename, include a link to another page and another site.}}
{{Practice|Create a new page that's a unique generally recognized world [[:Category:Place|city]], include a link to another wiki page and another site.}}
 
===Categories===


* Categories <nowiki>[[Category:Places with rivers]]</nowiki>
* Categories <nowiki>[[Category:Places with rivers]]</nowiki>
Line 149: Line 159:


{{Practice|Put your page in a category, put that category in a sub-category}}
{{Practice|Put your page in a category, put that category in a sub-category}}
===Images and files ===


* Uploading images and files
* Uploading images and files
=== Page maintenance===


* Moving pages
* Moving pages
Line 160: Line 174:
* Deleting pages
* Deleting pages


* Templates - used for consistently reused content
=== Templates ===
 
* Templates - used for consistently reused content or formatting
 
* Like a page link, for the first instance just enter a template placeholder, using two curly brackets instead of square. <nowiki>{{My template}}</nowiki>
* Then follow the red link to fill in the template, and use it on other pages.
* Templates can accept parameters, separated by the pipe symbol. <nowiki>{{{Template|Parameter1|Parameter2|...}}</nowiki> Parameters are available in the template as <nowiki>{{{1}}}, {{{2}}}</nowiki>, etc.
 
* [[Template example]]


=== Making pages look good ===
=== Making pages look good ===
Line 173: Line 195:
* Possible to hide MW's menus and change the 'skin'
* Possible to hide MW's menus and change the 'skin'


{{Practice|Add <nowiki><div class="noticebox">...</div></nowiki> to some page content}}
{{Practice|Add <nowiki><div class="noticebox" style="float: right">...</div></nowiki> around some page content, add <nowiki><br class="cleared" /></nowiki> after}}


{{Bonus practice|Move your div to a reusable template}}
{{Bonus practice|Move your div to a reusable template}}
Line 214: Line 236:
</div>
</div>


{{Practice|Add a population annotation to your place.}}
{{Practice|Add a population annotation to your [[:Category:Place|place]].}}


* [http://semantic-mediawiki.org/wiki/Help:Properties_and_types#List_of_data_types Built-in types]
* [http://semantic-mediawiki.org/wiki/Help:Properties_and_types#List_of_data_types Built-in types]
Line 221: Line 243:
* Subtypes
* Subtypes
** A city is a place
** A city is a place
* '''With inline properties, you can annotate any page in a freeform way, and query those annotations on other pages, using views like maps and timelines, simple lists for todo items, sums for numbers, etc'''


== Queries ==
== Queries ==
Line 234: Line 258:


''Instead of using inline property assignments, semantic classes use templates with value assignments. This allows display formatting and further, consistent semantic interaction according to the template name (which is usually the category).''
''Instead of using inline property assignments, semantic classes use templates with value assignments. This allows display formatting and further, consistent semantic interaction according to the template name (which is usually the category).''
{{Practice|Change your page so it's a an Entity.}}
{{Practice|Change your page so it's a an Entity.}}


Line 245: Line 268:
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>
</div>
</div>
Classes are composed of:
* A '''template''', which both assigns properties and displays them. You can change it to have all the pages look the same.
* '''Properties''', which is the collection of distinct data about that class
* A '''form''', which makes it easier to enter new page in that class


* {{PSITE|Special:CreateClass}} (template, properties, forms)
* {{PSITE|Special:CreateClass}} (template, properties, forms)
Line 341: Line 371:
Forms and templates can support multiple properties per field.
Forms and templates can support multiple properties per field.


{{Practice|Create your own semantic class with template, properties, form. Add pages to it {{PSITE|Special:CreateClass}} }}
{{Practice|Create your own semantic class using {{PSITE|Special:CreateClass}} with template, properties, form. Add pages to it Include a Place field that has a type of Page }}
{{Bonus practice|Add a map to the template if the page has a location that can be geocoded}}


{{See|[http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms documentation].}}
{{See|[http://www.mediawiki.org/wiki/Extension:Semantic_Forms Semantic Forms documentation].}}
Line 372: Line 401:
''If the page's population is greater than 50000, then put it in the category of city.''
''If the page's population is greater than 50000, then put it in the category of city.''


* ''If it's within 500m of water...''
* ''If it's within 500m of a place...''
* ''If it has been visited in the last 4 months''
* ''If it has been visited in the last 4 months''
* ''If it has a picture...''
* ''If it has a picture...''
Line 410: Line 439:
= Hosting =
= Hosting =


* Export a site, modularize by category
* [[Special:Export]] a site, modularize by category
** Complete site export
** Complete site export
* [[Special:Version]]
* [[Special:Version]]
Line 423: Line 452:
* Mediawiki help sites and community
* Mediawiki help sites and community
* Semantic mediawiki help sites and community
* Semantic mediawiki help sites and community
* If it's for an open cause, ask me
* If it's for an open cause, ask me or other [semantic] wikiers
** User group
** User group


Line 431: Line 460:


[[Category:SemWeb]]
[[Category:SemWeb]]
 
[[Category:Practical Semantic Mediawiki]]


{{Blikied|Nov 25, 2010}}
{{Blikied|Nov 25, 2010}}