View Full Version : Editing in wiki?
SeasonalTNT
06-15-2009, 07:58 PM
Only post here if you fully understand wiki coding.
I need somebody to help me understand how to use {{#ifeq}}. I read online resources but I can't seem to get it.
What I'm trying to do is make a template with this template within it so that I can make a list of items however many items long, which depends on how many {{#ifeq}} templates I have.
ifeq is a parser function that on the first and second given parameters identify the 2 variables to be compared, returning the third value if the 2 are equal/identical, and the fourth if they are not. For example,
{{ifeq|86|86|"Yes, they're equal."|"No, they're not."}} should return "Yes, they're equal." However,
{{ifeq|wysiyg|WySiWyG|"Yes, they're identical."|"No, they're not."}} should return "No, they're not.", because ifeq considers capitalization a difference. ifeq also does not count spaces, but it does count underscores.
Hope this helps.
SeasonalTNT
06-15-2009, 10:46 PM
Wow, you just know everything, don't you.
You're looking at a code something like this:
{{#ifeq:{{{crafting|No}}} | No | None<br><br> | {{#ifeq: {{{item-1|No}}} | No || [[{{{item-1}}}]] — [[{{{craft-1}}}]] in [[{{{city-1}}}]]<br>}}
{{#ifeq: {{{item-2|No}}} | No || [[{{{item-2}}}]] — [[{{{craft-2}}}]] in [[{{{city-2}}}]]<br>}}
{{#ifeq: {{{item-3|No}}} | No || [[{{{item-3}}}]] — [[{{{craft-3}}}]] in [[{{{city-3}}}]]<br>}}
{{#ifeq: {{{item-4|No}}} | No || [[{{{item-4}}}]] — [[{{{craft-4}}}]] in [[{{{city-4}}}]]<br>}}
{{#ifeq: {{{item-5|No}}} | No || [[{{{item-5}}}]] — [[{{{craft-5}}}]] in [[{{{city-5}}}]]<br>}}}}
Are there any mistakes?
Wow, you just know everything, don't you.
You're looking at a code something like this:
{{#ifeq:{{{crafting|No}}} | No | None<br><br> | {{#ifeq: {{{item-1|No}}} | No || [[{{{item-1}}}]] — [[{{{craft-1}}}]] in [[{{{city-1}}}]]<br>}}
{{#ifeq: {{{item-2|No}}} | No || [[{{{item-2}}}]] — [[{{{craft-2}}}]] in [[{{{city-2}}}]]<br>}}
{{#ifeq: {{{item-3|No}}} | No || [[{{{item-3}}}]] — [[{{{craft-3}}}]] in [[{{{city-3}}}]]<br>}}
{{#ifeq: {{{item-4|No}}} | No || [[{{{item-4}}}]] — [[{{{craft-4}}}]] in [[{{{city-4}}}]]<br>}}
{{#ifeq: {{{item-5|No}}} | No || [[{{{item-5}}}]] — [[{{{craft-5}}}]] in [[{{{city-5}}}]]<br>}}}}Are there any mistakes?
pretty sure you can't use <br> or <nowiki> or other similar tags, because it hashes the tags before it parses, so it would return a false value. Not 100% sure if this applys to #ifeq though, considering how much i've used it, which is little.
By the way, couldn't tell if you were being sarcastic or not.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.