Difference between revisions of "Template:Plainlink"

From otp22 db
Jump to: navigation, search
m (this workaround sucks. sucks bad.)
m (Using equals signs)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="plainlinks">{{#if:{{{2|}}}| [{{{1}}} {{{2}}}] | {{{1}}} }}</span></includeonly><noinclude>
+
<includeonly><span class="plainlinks" style="{{{style|}}}">{{#if:{{{2|}}}| [{{{1}}} {{{2}}}] | {{{1}}} }}</span></includeonly><noinclude>
 +
 
 +
This template produces links to external websites with reduced styling (eg: no arrow icon); making it useful in spacing-sensitive layouts.
 +
 
 +
==Examples==
  
 
{{Plainlink|http://google.com/}}
 
{{Plainlink|http://google.com/}}
Line 13: Line 17:
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t=36166|Unfiction thread}}</pre>
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t=36166|Unfiction thread}}</pre>
  
You can however Encode the equals-sign to pass it appropriately.
 
  
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{#urldecode:%3D}}36166|Unfiction thread}}
+
You can however Encode the equals-sign to pass it appropriately, or use a template to transclude the raw equals-sign.
 +
See the following examples in order of reliability:
 +
 
 +
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{eq}}36166|Unfiction thread}} ("=" intact by transclusion)
 +
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{eq}}36166|Unfiction thread}}</pre>
 +
 
 +
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{#urldecode:%3D}}36166|Unfiction thread}} ("=" intact from ParserFunction)
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{#urldecode:%3D}}36166|Unfiction thread}}</pre>
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{#urldecode:%3D}}36166|Unfiction thread}}</pre>
  
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t&#61;36166|Unfiction thread}}
+
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t&#61;36166|Unfiction thread}} ("=" interpreted by browser by way of '''HTML''')
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t & # 61 ; 36166|Unfiction thread}}</pre>
+
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t&amp;#61;36166|Unfiction thread}}</pre>
  
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}
+
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}} ("=" decoded by browser <span style="color:red">'''behavior'''</span>)
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}</pre>
 
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}</pre>

Latest revision as of 23:46, July 13, 2013


This template produces links to external websites with reduced styling (eg: no arrow icon); making it useful in spacing-sensitive layouts.

Examples

http://google.com/

{{Plainlink|http://google.com/}}

Boogle

{{Plainlink|http://google.com/|Boogle}}

Using equals signs

Because of the nature of templates, using an equals sign in an URL will produce an erroneous link:

Unfiction thread

{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t=36166|Unfiction thread}}


You can however Encode the equals-sign to pass it appropriately, or use a template to transclude the raw equals-sign. See the following examples in order of reliability:

Unfiction thread ("=" intact by transclusion)

{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{eq}}36166|Unfiction thread}}

Unfiction thread ("=" intact from ParserFunction)

{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t{{#urldecode:%3D}}36166|Unfiction thread}}

Unfiction thread ("=" interpreted by browser by way of HTML)

{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t&#61;36166|Unfiction thread}}

Unfiction thread ("=" decoded by browser behavior)

{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}