SMW notes: Difference between revisions

From zooid Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Person
Some tips and tricks for using Semantic Mediawiki from SMW mailing list, various web sites, etc.
|Home page=http://vmacch.ca
|Location=Toronto
|Tags=Group, Toronto
}}
Started in 2008, the Virtual Museum of Asian Canadian Cultural Heritage (VMACCH), showcases the cultural experiences and expressions of Asian Canadians in a variety of capacities from across Canada. It strives to provide insight into how this demographic experiences life in Canada, how Asian Canadians choose to express their traditional culture and heritage, and what these expressions and experiences mean to Asian Canadian communities. The project is funded by Canadian Heritage's 'Gateway' Fund.


The Objectives of the Virtual Museum of Asian Canadian Cultural Heritage (VMACCH) are:
== Other tip sources ==


* To provide opportunities for Asian Canadians to share their heritage and to promote a better understanding of Asian heritage by focusing annually on the month of May, designated as Asian Heritage Month.
http://smwforum.ontoprise.com/smwforum/images/a/ad/Manual_SMW.pdf
* To enrich Canadian culture by building on the achievement of Asian Canadians
* To achieve full participation by Asian Canadians in the cultural life of Canada
* To build cultural bridges between Asian countries and regions.
* To encourage education of Asian heritage and culture within the broader public
* To establish a relationship and to co-operate with other persons, parties or Corporations with similar or parallel purposes.  


In showcasing Asian Canadian heritage, VMACCH enables Asian Canadians to share their heritage among themselves and with the rest of Canada. It exhibits the achievements and contributions of Asian Canadians to Canada. Featuring works by Asian Canadian artists, it encourages participation in the cultural life of Canada. The website is meant to connect Asian culture to other cultures, and show that it is part of the overarching Canadian culture. It is also a valuable teaching resource on Asian heritage and culture to schools, and the preparation of the website involves collaborations with various parties including other voluntary organizations like Social Service Network, and the Chinese Canadian Photographic Society of Toronto, and mainstream museums such as the Gardiner Museum and the Bata Shoe Museum in Toronto.
http://smw.referata.com/wiki/Special:BrowseData/Tips
 
http://smwforum.ontoprise.com/smwforum/index.php/Example:All_libraries
 
http://help.wikia.com/wiki/Help:Semantic_MediaWiki/Tips_and_tricks
 
http://semantic-mediawiki.org/wiki/Image:SMW_quick_reference.pdf
 
== Data design ==
 
http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Data_design_issues
 
- Create a top category for Semantic Classes. I called mine 'Categories'.
It holds only categories used to define a 'Is-a' relationship. Doing so has
at least two benefits : 1- You can do a query on your core content by
restricting it to the 'Categories' level. 2- You can define other
categories outside of that structure for whatever your system needs.
 
http://smwforum.ontoprise.com/smwforum/index.php/Example:How_to_realize_a_range_constraint_for_a_property
 
Redirects can be used to create property synonyms.
 
== Discussion ==
 
Categories can be hierarchical; properties can't (yet).
 
 
== MW tricks ==
 
If you want to clear out old pages you can delete them and use
deleteArchivedRevisions.php to erase the deleted revisions from the
database.
 
=== Variables ===
 
You can make use of the VariablesExtension [1] and store the query (or its
result? I'd like to know which one, but in the end it doesn't really matter) in
a variable, which is helpful when you need the same query multiple times within
a page. It looks like this:
 
{{ #vardefine: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }}
(silent) or
{{ #vardefineecho: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }} (with output)
 
Further down in the page you can write
 
{{ #var: some_variable_name }}
 
=== Specific searches ===
 
  <nowiki>
  <inputbox>
  type=search
  width=30
  namespaces=Help**,Wikipedia**,Template**
  searchbuttonlabel=Search help pages
  bgcolor=#cee0f2
  break=no
  </inputbox>
  </nowiki>
 
(requires the Input Box extension)
 
=== Profiling mediawiki ===
 
http://www.mediawiki.org/wiki/How_to_debug#Profiling
 
=== Mediawiki performance tuning ===
 
http://www.mediawiki.org/wiki/Manual:Performance_tuning
 
* APC can be used with SMW without problems
 
== SMW tricks ==
 
<nowiki>[[Went past deadline::{{#expr:{{{End date|}}}>{{{Deadline|}}} }}]]</nowiki>
 
=== Hiding set data ===
 
  <nowiki>[[propertyA::{{{propertyA|}}}|]]</nowiki>
 
By adding the | after the enclosing }}}, the property value will not show.
 
For multi value properties:
 
  <nowiki>{{#arraymap:{{{Eating disorders behaviors|}}}|,|x|[[Eating disorders behaviors::x|]]}}</nowiki>
 
== Misc ==
 
=== Enable links in property values ===
 
$smwgLinksInValues = true;
 
=== Must add namespaces to config ===
 
Otherwise they won't have semantic properties.
 
$smwgNamespacesWithSemanticLinks array
 
== Media ==
 
Neat talk on MW, with refs to SMW: http://www.youtube.com/watch?v=Ukytqe9pwDM
 
[[Category:SemWeb]]

Revision as of 15:38, 24 September 2009

Some tips and tricks for using Semantic Mediawiki from SMW mailing list, various web sites, etc.

Other tip sources

http://smwforum.ontoprise.com/smwforum/images/a/ad/Manual_SMW.pdf

http://smw.referata.com/wiki/Special:BrowseData/Tips

http://smwforum.ontoprise.com/smwforum/index.php/Example:All_libraries

http://help.wikia.com/wiki/Help:Semantic_MediaWiki/Tips_and_tricks

http://semantic-mediawiki.org/wiki/Image:SMW_quick_reference.pdf

Data design

http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Data_design_issues

- Create a top category for Semantic Classes. I called mine 'Categories'. It holds only categories used to define a 'Is-a' relationship. Doing so has at least two benefits : 1- You can do a query on your core content by restricting it to the 'Categories' level. 2- You can define other categories outside of that structure for whatever your system needs.

http://smwforum.ontoprise.com/smwforum/index.php/Example:How_to_realize_a_range_constraint_for_a_property

Redirects can be used to create property synonyms.

Discussion

Categories can be hierarchical; properties can't (yet).


MW tricks

If you want to clear out old pages you can delete them and use deleteArchivedRevisions.php to erase the deleted revisions from the database.

Variables

You can make use of the VariablesExtension [1] and store the query (or its result? I'd like to know which one, but in the end it doesn't really matter) in a variable, which is helpful when you need the same query multiple times within a page. It looks like this:


(silent) or

 (with output)

Further down in the page you can write


Specific searches

 
  <inputbox>
  type=search
  width=30
  namespaces=Help**,Wikipedia**,Template** 
  searchbuttonlabel=Search help pages
  bgcolor=#cee0f2
  break=no
  </inputbox>
  

(requires the Input Box extension)

Profiling mediawiki

http://www.mediawiki.org/wiki/How_to_debug#Profiling

Mediawiki performance tuning

http://www.mediawiki.org/wiki/Manual:Performance_tuning

  • APC can be used with SMW without problems

SMW tricks

[[Went past deadline::{{#expr:{{{End date|}}}>{{{Deadline|}}} }}]]

Hiding set data

 [[propertyA::{{{propertyA|}}}|]]

By adding the | after the enclosing }}}, the property value will not show.

For multi value properties:

 {{#arraymap:{{{Eating disorders behaviors|}}}|,|x|[[Eating disorders behaviors::x|]]}}

Misc

Enable links in property values

$smwgLinksInValues = true;

Must add namespaces to config

Otherwise they won't have semantic properties.

$smwgNamespacesWithSemanticLinks array

Media

Neat talk on MW, with refs to SMW: http://www.youtube.com/watch?v=Ukytqe9pwDM