v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User talk:Latias1290"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 14: Line 14:
  
 
You may be interested in the discussion [[DF talk:Versions#Revisiting Redirects|here]]. --[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 20:47, 8 January 2014 (UTC)
 
You may be interested in the discussion [[DF talk:Versions#Revisiting Redirects|here]]. --[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 20:47, 8 January 2014 (UTC)
 +
 +
== Re: [[User:Latias1290/construction2|Using templates with special characters in parameters]] ==
 +
 +
It ''is'' possible to use pipes (<code>|</code>) and equals signs, although it's tricky. Things like this usually work just fine, since Mediawiki parses the inner template before the outer one:
 +
<pre>{{template1|{{template2|param}}}}</pre>
 +
e.g. <code><nowiki>{{key|{{char|50}}}}</nowiki></code> gives {{key|{{char|50}}}}
 +
 +
Using things like tables is trickier, and usually requires the use of a separate template, {{tl|!}}, which produces a pipe character. (There is also {{tl|!-}}, which produces {{!-}}).
 +
 +
Also, if you use equals signs in a parameter, like this:
 +
<pre>{{template|1 + 1 = 2}}</pre>
 +
You need to either use {{tl|1==}} instead of the equals sign or specify the parameter (<code>{{{1}}}</code>) explicitly, i.e.:
 +
<pre>{{template|1=1 + 1 = 2}}</pre>
 +
(The reason the first one doesn't work is because Mediawiki interprets the content before the = sign as the parameter name, passing the template a parameter named "1 + 1" with "2" as the value. The second option forces it to use "1" as the parameter name and "1 + 1 = 2" as the value. [https://www.mediawiki.org/wiki/Help:Templates#Numbered_parameters This page] has more information about this, if you're interested.)
 +
 +
It's messy (and harder to read), but it does work. My personal recommendation in this situation to avoid having to escape a lot of pipes is to create ''two'' templates – one for a header, and one for a footer. (Usually just a header is necessary, since a footer is often just a &lt;/div> that doesn't really need a separate template).
 +
 +
&mdash;[[User:Lethosor|<span style="color:#074">Lethosor</span>]] ([[User talk:Lethosor|<span style="color:#092">talk</span>]]) 20:37, 5 February 2014 (UTC)

Revision as of 20:37, 5 February 2014

Talk page of Latias1290. Ya.

  • If you came here to point out that grammar, spelling and typos are different things then I point you to my user page. The term "grammar patrol" is just a shortcut to keep me from having to say the correct of "spelling patrol was here", "grammar patrol was here" or "typo patrol was here" for each case. See it as a categorization.
  • If you came here to point out that a contributor has more potentional than just fixing grammar etc. all the time then deal with it.

Latias1290 (talk) 21:09, 24 December 2013 (UTC)

Double redirects

I know there are a lot of double redirects on this wiki, but they're supposed to work (a couple don't for some reason, but most of them work fine). Basically, keeping HFS pointing to cv:HFS saves us trouble when we create the DF2014 namespace and set "cv" to point to it instead. (This is a better explanation, although outdated.)

However, I agree that we shouldn't need so many double redirects. I'm currently working on a way to make Mediawiki automatically jump to the cv: page without needing to create a redirect, so hopefully that'll solve this problem.

Also, thanks for your various fixes/corrections around the wiki :) --Lethosor (talk) 20:00, 8 January 2014 (UTC)

You may be interested in the discussion here. --Lethosor (talk) 20:47, 8 January 2014 (UTC)

Re: Using templates with special characters in parameters

It is possible to use pipes (|) and equals signs, although it's tricky. Things like this usually work just fine, since Mediawiki parses the inner template before the outer one:

{{template1|{{template2|param}}}}

e.g. {{key|{{char|50}}}} gives 2

Using things like tables is trickier, and usually requires the use of a separate template, {{!}}, which produces a pipe character. (There is also {{!-}}, which produces |-).

Also, if you use equals signs in a parameter, like this:

{{template|1 + 1 = 2}}

You need to either use {{=}} instead of the equals sign or specify the parameter ({{{1}}}) explicitly, i.e.:

{{template|1=1 + 1 = 2}}

(The reason the first one doesn't work is because Mediawiki interprets the content before the = sign as the parameter name, passing the template a parameter named "1 + 1" with "2" as the value. The second option forces it to use "1" as the parameter name and "1 + 1 = 2" as the value. This page has more information about this, if you're interested.)

It's messy (and harder to read), but it does work. My personal recommendation in this situation to avoid having to escape a lot of pipes is to create two templates – one for a header, and one for a footer. (Usually just a header is necessary, since a footer is often just a </div> that doesn't really need a separate template).

Lethosor (talk) 20:37, 5 February 2014 (UTC)