Difference between revisions of "Template:Feed"

From Second Life Wiki
Jump to navigation Jump to search
(fixed closing <noinclude>)
(wiki-fu. making template more fool-proof)
Line 1: Line 1:
<includeonly>[[Image:{{{icon|Feed-icon-14x14.png}}}]] [{{{url}}} {{{text|subscribe to this feed}}}]</includeonly>
<includeonly>{{#replace:{{{3|{{{icon|[[Image:Feed-icon-14x14.png]]}}}}}}|<nowiki>
</nowiki>|}} [{{#replace:{{{1|{{{url|http://wiki.secondlife.com/Template:feed#Usage}}}}}}|<nowiki>
</nowiki>|}} {{#replace:{{#ifeq:{{{1|{{{url|}}}}}}||<strong style="color:red;">No URL has been specified.</strong>|{{{2|{{{text|subscribe to this feed}}}}}}}}|<nowiki>
</nowiki>|}}]</includeonly><noinclude>
This template provides a basic RSS feed link.


<noinclude>
This template provides a basic RSS feed link.
<br>
== Usage ==
== Usage ==
* <strong>url</strong> is required, all others are optional.
* Default <strong>text</strong> is "<em>subscribe to this feed</em>"
* Default icon is [[Image:Feed-icon-14x14.png]]


<div style="font-size:140%"><code><pre><nowiki>{{RSSfeed
=== Named-parameters ===
|url=
<code style="font-size:1.4em"><pre><nowiki>{{feed
|text=
|url=<!-- URL to RSS/Atom feed -->
|icon=
|text=<!-- text for link -->
}}</nowiki></pre></code></div>
|icon=<!-- Icon to use next to link -->
}}</nowiki></pre></code>


<font color=red>''<tt><big>url</big></tt>'' is required.</font><br>
=== Numeric-parameters ===
Default ''<tt><big>text</big></tt>'' is <font color=black><tt><big>subscribe to this feed</big></tt></font><br>
<code style="font-size:1.4em"><pre><nowiki>{{feed
Default icon is [[Image:Feed-icon-14x14.png]]
|1=<!-- URL to RSS/Atom feed -->
|2=<!-- text for link -->
|3=<!-- Icon to use next to link -->
}}</nowiki></pre></code>


==Examples==
==Examples==


<div style="font-size:140%"><code><pre><nowiki>{{RSSfeed
=== Missing URL ===
|text=subscribe to this feed
<code style="font-size:1.4em;"><pre><nowiki>{{feed
|url=http://www.nonbaryonic.net/sl/SLV/vsc/feed.xml
|text=This text will not be displayed because the URL is missing
|icon=Feed-icon-14x14.png
}}</nowiki></pre></code>
}}</nowiki></pre></code></div>
{{feed
{{RSSfeed
|text=This text will not be displayed because the URL is missing
|text=subscribe to this feed
}}
|url=http://www.nonbaryonic.net/sl/SLV/vsc/feed.xml
 
|icon=Feed-icon-14x14.png
 
=== URL Only ===
<code style="font-size:1.4em"><pre><nowiki>{{feed
|http://blog.secondlife.com/feed/
}}</nowiki></pre></code>
{{feed
|http://blog.secondlife.com/feed/
}}
 
=== URL + Text ===
<code style="font-size:1.4em"><pre><nowiki>{{feed
|http://blog.secondlife.com/feed/
|Subscribe to the Official Second Life Blog
}}</nowiki></pre></code>
{{feed
|http://blog.secondlife.com/feed/
|Subscribe to the Official Second Life Blog
}}
}}
=== URL + Text + Image ===
<code style="font-size:1.4em"><pre><nowiki>{{feed
|http://blog.secondlife.com/author/torleylinden/feed/
|Subscribe to Torley's posts on the Official Second Life Blog
|[[Image:Torley-favicon.png|14px]]
}}</nowiki></pre></code>
{{feed
|http://blog.secondlife.com/author/torleylinden/feed/
|Subscribe to Torley's posts on the Official Second Life Blog
|[[Image:Torley-favicon.png|14px]]
}}
</noinclude>
</noinclude>

Revision as of 18:58, 8 August 2008

This template provides a basic RSS feed link.

Usage

  • url is required, all others are optional.
  • Default text is "subscribe to this feed"
  • Default icon is Feed-icon-14x14.png

Named-parameters

{{feed
|url=<!-- URL to RSS/Atom feed -->
|text=<!-- text for link -->
|icon=<!-- Icon to use next to link -->
}}

Numeric-parameters

{{feed
|1=<!-- URL to RSS/Atom feed -->
|2=<!-- text for link -->
|3=<!-- Icon to use next to link -->
}}

Examples

Missing URL

{{feed
|text=This text will not be displayed because the URL is missing
}}

Feed-icon-14x14.png <strongstyle="color:red;">NoURLhasbeenspecified.


URL Only

{{feed
|http://blog.secondlife.com/feed/
}}

Feed-icon-14x14.png subscribetothisfeed

URL + Text

{{feed
|http://blog.secondlife.com/feed/
|Subscribe to the Official Second Life Blog
}}

Feed-icon-14x14.png SubscribetotheOfficialSecondLifeBlog

URL + Text + Image

{{feed
|http://blog.secondlife.com/author/torleylinden/feed/
|Subscribe to Torley's posts on the Official Second Life Blog
|[[Image:Torley-favicon.png|14px]]
}}

Torley-favicon.png SubscribetoTorley'spostsontheOfficialSecondLifeBlog