Difference between revisions of "Template:Sw.slr"

From Second Life Wiki
Jump to navigation Jump to search
(Undo revision 57796 by SignpostMarv Martin (Talk))
(project is retired)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:name|{{{2|{{{name|{{PAGENAME}}}}}}}}|}}{{#vardefine:urlname|{{#urlencode:{{#var:name}}}}}}{{#switch:{{lc:{{{1|}}}}}
<includeonly></includeonly><noinclude>[http://blog.signpostmarv.name/2009/04/30/retiring-swslr-project/ Project is retired]</noinclude>
|region=[http://svc.sl.net.marvulous.co.uk/region/{{#var:urlname}} {{{3|{{#var:name}}}}}]
|place={{#ifeq:{{{3|}}}||[http://svc.sl.net.marvulous.co.uk/region/{{#var:urlname}} {{#var:name}}]|[http://svc.sl.net.marvulous.co.uk/place/{{#var:urlname}}/{{#urlencode:{{{3}}}}} {{{4|{{{3}}}, {{#var:name}}}}}]}}
|resident={{#switch:{{lc:{{{3|}}}}}
|mentioned=[http://svc.sl.net.marvulous.co.uk/resident/{{#var:urlname}}/mentioned/ {{{4|Picks mentioning {{#var:name}}}}}]
|land=[http://svc.sl.net.marvulous.co.uk/resident/{{#var:urlname}}/land/ {{{4|{{#var:name}}'s land}}}]
|[http://svc.sl.net.marvulous.co.uk/resident/{{#var:urlname}} {{{3|{{#var:name}}}}}]
}}
|<strong style="color:red;">No Input</strong>
}}</includeonly><noinclude>
== Usage ==
=== Basic ===
The basic usages are for those situations where zero configuration is a bonus!
 
Not so much for resident articles, but more for regions, the zero configuration mode means not having to alter the parameters of the wiki code if the region is renamed- just move the wiki article itself to reflect the region's name change :-P
 
* <nowiki>{{sw.slr|resident}}</nowiki> in an article on a Resident or in the Resident's wiki profile will give a direct link to that Resident's semantic web profile
* <nowiki>{{sw.slr|region}}</nowiki> in an article on a region will give a direct link to that region's semantic web profile
=== Advanced ===
<nowiki>{{sw.slr|</nowiki><strong style="color:red;">entity type</strong>|<strong style="color:red;">entity name</strong>|<strong style="color:red;">entity sub-name/url text</strong>|<strong style="color:red;">url text</strong><nowiki>}}</nowiki>
=== Parameters ===
# entity type can be:
#* resident
#* region
#* place
# entity name
#* the name of a Resident
#* the name of a region
# entity sub-name/url text
#* if the ''entity type'' is '''resident''' or '''region''', this parameter is optional. If supplied, is used as custom text for the link
#** if the ''entity type'' is '''place''' and no parameter is specified, the template defaults to a '''region''' ''entity type'' without custom text.
#** if the ''entity type'' is '''place''' and a parameter is specified, it specified the parcel name within the region specified ny ''entity name''
# url text
#* if the ''entity type'' is '''place''', this parameter is optional. If supplied, is used as custom text for the link
#* all other ''entity types'' ignore this parameter.
== Examples ==
*{{sw.slr|resident|SignpostMarv Martin}}
*{{sw.slr|resident|Codebastard Redgrave|land}}
*{{sw.slr|resident|Blue Linden|mentioned}}
*{{sw.slr|region|Hippotropolis}}
*{{sw.slr|place|Hippotropolis|Linden Open Source Project HQ}}
</noinclude>

Latest revision as of 08:00, 4 May 2009