Difference between revisions of "Template:SMWUser"

From AIRWiki
Jump to: navigation, search
Line 1: Line 1:
 +
<noinclude>This template simplifies the creation of user boxes. It serves as a redirection page for different templates:
 +
 +
* if no category is specified or if "category=Student" appears in the template call, the [[Template:Student]] template is used
 +
* if the template contains the "category=PhD" line, then the [[Template:PhD]] template is used
 +
* if the template contains the "category=Prof" line, then the [[Template:Prof]] template is used
 +
 +
When inserted in a person's page, it creates a decorative table with much helpful information. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax &ndash; there are far easier ways of creating tables in MediaWiki.
 +
 +
To use this template, insert the following at the beginning of your user page. All fields are strictly '''optional''' and should be omitted if no data is given.
 +
 +
'''Please delete all lines that you do not give useful information for!'''
 +
<pre>{{SMWUser
 +
| category=Student or category=PhD or category=Prof
 +
*** COMMON TO ALL CATEGORIES:
 +
| firstname=Mario
 +
| lastname=Rossi
 +
| email=mario.rossi(at)elet(dot)polimi(dot)it
 +
| photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
 +
*** ONLY FOR STUDENTS:
 +
| projectpage=The name of your project page
 +
*** FOR STUDENTS AND PHD STUDENTS:
 +
| advisor=NomeCognome (the first name and the last name of your advisor, with no spaces in between)
 +
|        ***NOTE:*** you can specify a LIST of advisors, separating them with a semicolon (;)
 +
*** FOR PHD STUDENTS AND PROFS/RESEARCHERS:
 +
| resarea=The name of your research area
 +
|        ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
 +
}}</pre>
 +
The order of the fields is not relevant. The template should be given as the ''first'' thing on a page.
 +
 +
</noinclude><includeonly>
 
{{#ifeq:{{{category|}}}||
 
{{#ifeq:{{{category|}}}||
 
{{Student
 
{{Student
Line 18: Line 48:
 
|photo={{#ifeq:{{{photo|}}}|||{{{photo}}}}}
 
|photo={{#ifeq:{{{photo|}}}|||{{{photo}}}}}
 
}}
 
}}
}}
+
}}</includeonly>

Revision as of 17:08, 14 May 2009

This template simplifies the creation of user boxes. It serves as a redirection page for different templates:

  • if no category is specified or if "category=Student" appears in the template call, the Template:Student template is used
  • if the template contains the "category=PhD" line, then the Template:PhD template is used
  • if the template contains the "category=Prof" line, then the Template:Prof template is used

When inserted in a person's page, it creates a decorative table with much helpful information. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax – there are far easier ways of creating tables in MediaWiki.

To use this template, insert the following at the beginning of your user page. All fields are strictly optional and should be omitted if no data is given.

Please delete all lines that you do not give useful information for!

{{SMWUser
 | category=Student or category=PhD or category=Prof
*** COMMON TO ALL CATEGORIES:
 | firstname=Mario
 | lastname=Rossi
 | email=mario.rossi(at)elet(dot)polimi(dot)it
 | photo=name of picture (e.g. "Mario.jpg"), use "upload file" on the left
*** ONLY FOR STUDENTS:
 | projectpage=The name of your project page
*** FOR STUDENTS AND PHD STUDENTS:
 | advisor=NomeCognome (the first name and the last name of your advisor, with no spaces in between)
 |         ***NOTE:*** you can specify a LIST of advisors, separating them with a semicolon (;)
*** FOR PHD STUDENTS AND PROFS/RESEARCHERS:
 | resarea=The name of your research area
 |         ***NOTE:*** you can specify a LIST of research areas, separating them with a semicolon (;)
}}

The order of the fields is not relevant. The template should be given as the first thing on a page.