The Sims Wiki talk:Development Portal: Difference between revisions

imported>LostInRiverview
No edit summary
imported>Nikel23
Line 318:
:Is this bug fixed in later versions of MediaWiki? Wikia uses an outdated version of MediaWiki (1.19.24) -- the current version is 1.25.1. Support for 1.19 ends this month ([[mw:MediaWiki 1.19|1]]) --I am [[User:K6ka|'''<span style="color:#0040FF">k6ka</span>''']] [[User talk:K6ka|<span style="color:#0080FF"><sup>Talk to me!</sup></span>]] [[Special:Contributions/K6ka|<span style="color:#0B4C5F"><sub>See what I have done</sub></span>]] 11:11, May 28, 2015 (UTC)
::From what I've seen, it's still there as of March 2015. The explanation I've read is that there is another MediaWiki feature that depends on the way that #ifexist functions now. It's a bug that's been around for years. '''[[User:LostInRiverview|<font color="navy">LostInRiverview</font>]]<sup> [[User_talk:LostInRiverview|<font color="green">talk</font>]] • [[User_blog:LostInRiverview|<font color="green">blog</font>]] • [[Special:Contributions/LostInRiverview|<font color="green">contribs</font>]]</sup>''' 14:55, May 28, 2015 (UTC)
:::We could make the Sim template in fanon namespace not to link to their neighborhood / world page altogether from the infobox to avoid this, but I don't think anyone really wants that. Eventually, authors will insert a <nowiki>[[link]]</nowiki> inside the <code>neighbor</code> parameter, which, in turn, ruins categorization.
 
:::I've been aware of this issue for a long time, but I never really brought it up to attention (plus I wrote the #ifexist function). I'm sorry. But we can't really do anything with the bug, so we might need an alternative approach with the #ifexist function in the Sim template. I might have an idea.
 
:::Currently, the #ifexist function checks if a fanon page exist, then it will link to the page; otherwise, it will just put the neighborhood name without linking. How about, instead of that, we use two #ifexist functions to append <nowiki>[[ and ]]</nowiki> separately, so it will not as if the template links anything?
 
<pre>
{{Checkfns| {{#ifexist: Fanon:{{{neighbor}}}|[[Fanon:{{{neighbor}}}]]|{{{neighbor}}} }} }}
</pre>
 
:::Into:
 
<pre>
{{Checkfns| {{#ifexist: Fanon:{{{neighbor}}}|[[Fanon:|{{{neighbor}}} }} {{#ifexist: Fanon:{{{neighbor}}}|]] }} }}
</pre>
 
:::Do you think it might work? [[User:Nikel23|'''<span style="color:#007FFF; text-shadow: #ACE5EE 0 4px 4px;">Nikel</span>''']] [[User talk:Nikel23|<span style="color: #30D5C8 ; text-shadow: #00FFEF 0 4px 4px;"><sub>''Talk''</sub></span>]] <sub>–</sub> [[The Sims Wiki:Featured Media/Voting|<span style="color:red ; text-shadow:#E97451 0 4px 4px;"><sub>''Vote!''</sub></span>]] 04:41, May 29, 2015 (UTC)
Anonymous user