Forum:Problem on HERO monsters page

From Yugipedia
Jump to: navigation, search

The Show/Hide boxes on the bottom of HERO page are broken, or rather the links are.

http://yugioh.wikia.com/wiki/Elemental_HERO#Trivia

--Dark Ace SP™ (Talk) 17:32, June 8, 2011 (UTC)

SMW and Negref are not working right now. That's causing problems all over the place. Nothing to do about it but wait for Wikia to fix it. Cheesedude (talkcontribs) 18:36, June 8, 2011 (UTC)

Would it be possible to put something similar to the SMW notice (so it only appears when SMW is turned off) in the Sitenotice, with a message and a link to a page which explains why stuff on the pages aren't working. It'll probably halve (more if people actually read it) the amount of questions being asked on the forum and talk pages about it. -Falzar FZ- (talk page|useful stuff) 06:25, June 9, 2011 (UTC)

If we're going to do that, I'd prefer a hand-spun message. Regardless, though, this isn't something we should decide on without consulting with the techs, since having such a notice in the sitenotice may have some pretty adverse effects on site performance. ダイノガイ千?!? · ☎ Dinoguy1000 05:49, June 10, 2011 (UTC)
The sitenotice isn't used in the default skin, so most people wouldn't see it. Instead it has MediaWiki:Community-corner, which is displayed in Special:WikiActivity and users get a notification bubble when it's been changed.
DaNASCAT is a member of the community team. I'm not sure that he's on the technical team too, but either way we should listen to him on these matters. Now that that edit has been re-reverted, he said he's going to ask about getting it switched back on in the morning, which should be within a few hours.
I see a few more switches mixed with SMW we can do without on that template.
  • The switches at effect2 - effect4 distinguish Quick and Condition from everything else, but then gives them the same treatment, so are unnecessary, unless I'm overlooking something.
  • The switch that assigns [[Type::{{{type}}}| ]] and the one that assigns [[Card Type::Egyptian God Cards| ]] could be merged into one if that makes a difference.
  • This isn't the first time archetypenavboxes have caused problems, so I think we really need to simplify them. There's a switch every time an archsupportX is used to create a box to check and see that it's not creating the same navbox that archetypeY has created. I see ways of simplyfing the code, but it doesn't stop the duplicates. What if we divided the navboxes into three sections one for archetypes, one for support and one fro related? Then it wouldn't matter if the same box appears twice and we won't have to use any switches in that section. -- Deltaneos (talk) 12:17, June 10, 2011 (UTC)
{{#if: {{{archetypes}}}{{{archetype1}}}
 |{{Navbox
    | title       = Archetypes
    | navbar      = plain
    | liststyle   = padding: 0px; font-size: 111%;
    | listpadding = 0px;

    | list1       = {{#arraymap: {{{archetypes}}}, {{{archetype1}}}, {{{archetype2}}}, {{{archetype3}}}, <!--
                    -->{{{archetype4}}}, {{{archetype5}}}, {{{archetype6}}} |,|z|{{ArchetypeNavbox|z}}|\n}}
  }}
}}<!--

-->{{#if: {{{archsupport}}}{{{archsupport1}}}
 |{{Navbox
    | title       = Supports
    | navbar      = plain
    | liststyle   = padding: 0px; font-size: 111%;
    | listpadding = 0px;

    | list1       = {{#arraymap: {{{archsupport}}}, {{{archsupport1}}}, {{{archsupport2}}}, {{{archsupport3}}}, <!--
                     -->{{{archsupport4}}}, {{{archsupport5}}}, {{{archsupport6}}} |,|z|{{ArchetypeNavbox|z}}|\n}}
  }}
}}<!--

-->{{#if: {{{archrelated}}}{{{archrelated1}}}
 |{{Navbox
    | title       = Related to
    | navbar      = plain
    | liststyle   = padding: 0px; font-size: 111%;
    | listpadding = 0px;

    | list1       = {{#arraymap: {{{archrelated}}}, {{{archrelated1}}}, {{{archrelated2}}}, {{{archrelated3}}}, <!--
                     -->{{{archrelated4}}}, {{{archrelated5}}}, {{{archrelated6}}} |,|z|{{ArchetypeNavbox|z}}|\n}}
  }}
}}
Should do it. It also lets us use |archetypes = HERO, Elemental HERO, Neos rather than a separate parameter for each. (But other parts of the template would need to be updated to add the properties too.) I think using that &#44; instead of a comma in archetypes with comma in their name would stop it splitting the archetype name in two. -- Deltaneos (talk) 13:03, June 10, 2011 (UTC)
Are we sure #arraymap isn't an expensive parserfunction itself? What it does is reasonably more complicated than what #switch does (though, on the other hand, #arraymap was written by the team that wrote the SMW extension it's a part of (I'd assume, at least), and so presumably has been designed so there wouldn't be any problems).
I have thought about using #arraymap on the archetypes before, but kept running into the problem of archetype names that included whatever splitting character we might reasonably use; any technique to work around it would be non-obvious (and, in all likelihood, nonsensical) to the majority of users.
We could alternatively switch that whole block to use #ifs, and add maintenance coding elsewhere that checks for duplicates via #switches, without interacting with SMW in any fashion (though I think we *want* to have duplicates sometimes, so maybe that wouldn't work?).
I'll have a look at the other #switches you mentioned and see if any can be replaced or removed without changing functionality. ダイノガイ千?!? · ☎ Dinoguy1000 16:01, June 10, 2011 (UTC)