SMW notes: Difference between revisions

From zooid Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
http://smwforum.ontoprise.com/smwforum/images/a/ad/Manual_SMW.pdf
/* CSS placed here will be applied to all skins */
/* @import "/css/basic.css"; */
@import "/css/galleriffic-3.css";


http://smw.referata.com/wiki/Special:BrowseData/Tips
.tpllabel {
        float: left;
        width: 15%;
}


(from mailing list)
.tplvalue {
        float: right;
        width: 83%;
}


== Data design ==


- Create a top category for Semantic Classes. I called mine 'Categories'.
h1.firstHeading {
It holds only categories used to define a 'Is-a' relationship. Doing so has
  display: none;
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
.cleared {
  clear: both;
}


== Discussion ==
td.month_name {
  font-size: large;
}


Categories can be hierarchical; properties can't (yet).
#p-logo a { background: url(/images/smacw1.png) 35% 50% no-repeat !important; }


.noticebox {
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
  background: #eee;
  padding: 5px;
}


== MW tricks ==


If you want to clear out old pages you can delete them and use
.toc {
deleteArchivedRevisions.php to erase the deleted revisions from the
-moz-border-radius: 1em;
database.
}


=== Variables ===
/* make a few corners round, only supported by moz/firefox/other gecko browsers for now */
 
#p-cactions ul li, #p-cactions ul li a {
You can make use of the VariablesExtension [1] and store the query (or its
        -moz-border-radius: .5em;
result? I'd like to know which one, but in the end it doesn't really matter) in
        -webkit-border-radius: .5em;
a variable, which is helpful when you need the same query multiple times within
        border: none;
a page. It looks like this:
}
 
#content {
{{ #vardefine: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }}
        -moz-border-radius-bottomleft: 1em;
(silent) or
        -moz-border-radius-topleft: 1em;
{{ #vardefineecho: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }} (with output)
        -webkit-border-bottom-left-radius: 1em;
 
        -webkit-border-top-left-radius: 1em;
Further down in the page you can write
        border: none;
 
        min-height: 400px;
{{ #var: some_variable_name }}
}
 
div.pBody {
=== Specific searches ===
        -moz-border-radius-bottomright: 1em;
 
        -moz-border-radius-topright: 1em;
  <nowiki>
        -webkit-border-bottom-right-radius: 1em;
  <inputbox>
        -webkit-border-top-right-radius: 1em;
  type=search
        background: white;
  width=30
        border: none;
  namespaces=Help**,Wikipedia**,Template**
        padding-top: 4px;
  searchbuttonlabel=Search help pages
        valign: top;
  bgcolor=#cee0f2
}
  break=no
  </inputbox>
  </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
 
[[Semantics]]

Revision as of 21:15, 26 August 2009

/* CSS placed here will be applied to all skins */ /* @import "/css/basic.css"; */ @import "/css/galleriffic-3.css";

.tpllabel {

       float: left;
       width: 15%;

}

.tplvalue {

       float: right;
       width: 83%;

}


h1.firstHeading {

 display: none;

}

.cleared {

 clear: both;

}

td.month_name {

 font-size: large;

}

  1. p-logo a { background: url(/images/smacw1.png) 35% 50% no-repeat !important; }

.noticebox {

-moz-border-radius: 1em;
-webkit-border-radius: 1em;
 background: #eee;
 padding: 5px;

}


.toc {

-moz-border-radius: 1em;

}

/* make a few corners round, only supported by moz/firefox/other gecko browsers for now */

  1. p-cactions ul li, #p-cactions ul li a {
       -moz-border-radius: .5em;
       -webkit-border-radius: .5em;
       border: none;

}

  1. content {
       -moz-border-radius-bottomleft: 1em;
       -moz-border-radius-topleft: 1em;
       -webkit-border-bottom-left-radius: 1em;
       -webkit-border-top-left-radius: 1em;
       border: none;
       min-height: 400px;

} div.pBody {

       -moz-border-radius-bottomright: 1em;
       -moz-border-radius-topright: 1em;
       -webkit-border-bottom-right-radius: 1em;
       -webkit-border-top-right-radius: 1em;
       background: white;
       border: none;
       padding-top: 4px;
       valign: top;

}