Difference between revisions of "Template:Plainlink"

From otp22 db
Jump to: navigation, search
m
m (this workaround sucks. sucks bad.)
Line 1: Line 1:
<includeonly><span class="plainlinks">{{#if:{{{2|}}}| [{{escape|{{{1}}}}} {{{2}}}] | {{{1}}} }}</span></includeonly><noinclude>
+
<includeonly><span class="plainlinks">{{#if:{{{2|}}}| [{{{1}}} {{{2}}}] | {{{1}}} }}</span></includeonly><noinclude>
  
 
{{Plainlink|http://google.com/}}
 
{{Plainlink|http://google.com/}}
Line 6: Line 6:
 
{{Plainlink|http://google.com/|Boogle}}
 
{{Plainlink|http://google.com/|Boogle}}
 
<pre>{{Plainlink|http://google.com/|Boogle}}</pre>
 
<pre>{{Plainlink|http://google.com/|Boogle}}</pre>
 +
 +
==Using equals signs==
 +
Because of the nature of templates, using an equals sign in an URL will produce an erroneous link:
  
 
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t=36166|Unfiction thread}}
 
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t=36166|Unfiction thread}}
 
<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}}
 +
<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}}
 +
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t & # 61 ; 36166|Unfiction thread}}</pre>
  
==Debug==
+
{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}
<span class="plainlinks">{{#if:SomethingAwful| x{{escape|http://foxrums.somxethingawxful.com/showthrexad.phxpthrxeadid=3509156}} {{escape|SomethingAwful thread}}y | {{escape|http://forums.somethingawful.com/showthread.php?threadid=3509156}} }}</span>
+
<pre>{{Plainlink|http://forums.unfiction.com/forums/viewtopic.php?t%3D36166|Unfiction thread}}</pre>

Revision as of 06:07, November 3, 2012


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.

Unfiction thread

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

Unfiction thread

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

Unfiction thread

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