Forums › English Language Forums › General › Wiki Editors

Search

How to hide a chart?

3 replies [Last post]
Fri, 05/26/2017 - 11:51
Jenovasforumchar's picture
Jenovasforumchar

Hello, I need help in hiding a chart at fallowing wiki page where I am working on.
http://wiki.spiralknights.com/index.php?title=User:JenovaSPIRIT/Shield_D...

Since these are large tables that someone is not really interested in, it would be best to hide it anyhow, so I found that showhide function that should work like this:

{{Showhide|Tooltip Animation Creation Guide|content=

content

}}

But when I try to hide my chart there, it will only show a { when unhiding that showhide button.

Probably that showhide does not like a { inside and therefore messes up, so how can I hide a chart?

Fri, 05/26/2017 - 12:13
#1
Bopp's picture
Bopp
hmm

I tried the same thing on that table and got the same result. Then I tried a show/hide on some of your non-table content, and everything worked perfectly. Then I tried a show/hide on a small part of your table, and got the bad result again. (I was wondering whether the table was too big. MediaWiki is legendarily cantankerous.) Then I tried mimicking the show/hides used in the Heat article. Same problem. Sorry, but I don't know.

Fri, 05/26/2017 - 16:34
#2
Nitronicx
No "|" allowed

I was quite curious and of course I wanted to test if I would get the same problem. And yes, only the first bracket was visible. Then I was playing with it a bit. Skipping unnecessary details, it seems that those "|" signs are the problem. As far as I know, when calling templates, arguments are separated by that sign. So, when the wiki stumbles upon that sign, it stops adding to that "content" argument, and simply don't show anything else, since the "content" argument is finished. Curiously, linking other templates seems to work without problems (such as putting in content "{{PrizeBox|Dangerous}}" ).

How to solve this:

  • You can try copying your chart to a new page and link that page to the show/hide box as {{:That_New_Page}}.
  • Replace every "|" with "{{!}}". Easily done when you copy whole source to a simple text editor and then use function "Replace". Some of "|" don't have to be replaced in order to work properly (such as links) and the first 2 "|" in the show/hide template must NOT be replaced.
  • Insert content as "...|content= {{ actual content }} }}". This I think fools the wiki into thinking you want to call a template, but those additional brackets are actually displayed at the beggining and the end of your chart. Obviously the fastest, easiest and not ideal fix you can do.
  • Maybe there is a template or some tags that can prevent this behaviour, but I don't know about any.

This is what I was able to find when I was playing with it. As I said, I can't code wiki, so I'm usually using things from other pages + experiment. Some more experienced wiki editor could probably come up with something else or better. On the other hand, I'm sure I've learned some new things from this, so thank you for making me curious enough to dive into this bug hunting. :)

Fri, 05/26/2017 - 22:41
#3
Jenovasforumchar's picture
Jenovasforumchar
Thanx!

Thank you for the help!

I Used the 'quick' solution first, but adding these {{actual content}} did result in having the first {{ beeing shown and seen by a viwer, which I definitelly don't want.

So I solved it with the replacing method via text editor and it works now. So I could restructure this page and could also remove unnecessary headings :)

Powered by Drupal, an open source content management system