MediaWiki:Common.css: Difference between revisions

From Asian Canadian Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
Some tips and tricks for using Semantic Mediawiki.
/* @import "/css/basic.css"; */
@import "/css/galleriffic-3.css";


.tpllabel {
== Other tip sources ==
        float: left;
        width: 15%;
}


.tplvalue {
http://smwforum.ontoprise.com/smwforum/images/a/ad/Manual_SMW.pdf
        float: right;
        width: 83%;
}


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


h1.firstHeading {
http://smwforum.ontoprise.com/smwforum/index.php/Example:All_libraries
  display: none;
}


.cleared {
http://help.wikia.com/wiki/Help:Semantic_MediaWiki/Tips_and_tricks
  clear: both;
}


td.month_name {
(from mailing list)
  font-size: large;
}


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


.noticebox {
http://www.mediawiki.org/wiki/Extension:Semantic_Forms#Data_design_issues
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
  background: #eee;
  padding: 5px;
}


- 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.


.toc {
http://smwforum.ontoprise.com/smwforum/index.php/Example:How_to_realize_a_range_constraint_for_a_property
-moz-border-radius: 1em;
}


/* make a few corners round, only supported by moz/firefox/other gecko browsers for now */
== Discussion ==
#p-cactions ul li, #p-cactions ul li a {
 
        -moz-border-radius: .5em;
Categories can be hierarchical; properties can't (yet).
        -webkit-border-radius: .5em;
 
        border: none;
 
}
== MW tricks ==
#content {
 
        -moz-border-radius-bottomleft: 1em;
If you want to clear out old pages you can delete them and use
        -moz-border-radius-topleft: 1em;
deleteArchivedRevisions.php to erase the deleted revisions from the
        -webkit-border-bottom-left-radius: 1em;
database.
        -webkit-border-top-left-radius: 1em;
 
        border: none;
=== Variables ===
        min-height: 400px;
 
}
You can make use of the VariablesExtension [1] and store the query (or its
div.pBody {
result? I'd like to know which one, but in the end it doesn't really matter) in
        -moz-border-radius-bottomright: 1em;
a variable, which is helpful when you need the same query multiple times within
        -moz-border-radius-topright: 1em;
a page. It looks like this:
        -webkit-border-bottom-right-radius: 1em;
 
        -webkit-border-top-right-radius: 1em;
{{ #vardefine: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }}
        background: white;
(silent) or
        border: none;
{{ #vardefineecho: some_variable_name | {{#show:{{PAGENAME}}| ?propertyname}} }} (with output)
        padding-top: 4px;
 
        valign: top;
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>
 
=== 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 19:09, 17 June 2010

Some tips and tricks for using Semantic Mediawiki.

== 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

(from mailing list)

== 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

== 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>

=== 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]]