Template talk:OGL Bottom

From D&D Wiki
Jump to navigation Jump to search

Size[edit]

So, as I was browsing Wikipedia I came across an interesting extension. I am not sure of the name, however it enables the hiding and expanding of a certain template (for example this page on the very bottom this is present). So, to make the OGL Bottom template not as obstructive I was thinking we could try to use this... Thoughts? Anyone know what the extension is called? --Green Dragon 12:24, 15 January 2008 (MST)

It may not an extension. It's uses a bit o' javaScript hide/show the table. —Sledged (talk) 14:21, 22 February 2008 (MST)
Is it this http://en.wikipedia.org/wiki/Template:Navbox ? --Green Dragon 00:38, 24 February 2008 (MST)
Let's see if this works:
Any way to make it start hidden? --Green Dragon 12:28, 15 April 2008 (MDT)
I'll see what I can do. —Sledged (talk 10:29, 11 March 2009 (MDT)
There we go. Just add "hidden" or "collapsed" to the class names. Thanks to Ganteka for adding the majority of the logic. —Sledged (talk 15:14, 20 March 2009 (MDT)
For some reason, though, the "show"/"hide" text isn't showing up in the template. —Sledged (talk 15:16, 20 March 2009 (MDT)
It requires a caption, using |+ to show the [HIDE] / [SHOW]. --TK-Squared 16:20, 20 March 2009 (MDT)
Have to add a bit o' code to add a caption to the table when one isn't already given. —Sledged (talk 21:08, 20 March 2009 (MDT)
I also got Ganteka to do a bit of a change to Common.js, pretty much changing || to && and Collapsed != -1 to == -1. The || is an or statement, which means it'll run if either were true, so it was hiding all tables. --TK-Squared 16:38, 20 March 2009 (MDT)
Yes, that was the point: 'Just add "hidden" or "collapsed" to the class names.' Some examples:
  • class="collapsible"
Table: Caption
What
I feel happy!
  • class="collapsible collapsed"
  • class="collapsible hidden"
  • class="collapsible collapsed hidden"
See? I meant for "collapsed" and "hidden" to be synonyms, so all but the first should be initially hidden (i.e. collapsed). —Sledged (talk 21:08, 20 March 2009 (MDT)
Except collapsed should mean it's open. --TK-Squared 21:22, 20 March 2009 (MDT)
Why exactly? To have the table expanded runs contrary to what the word "collapsed" means. —Sledged (talk 11:45, 21 March 2009 (MDT)
Huh, always thought of collapsed as collapsing downwards. Nevermind, anyway; apparently, the Hide/Show doesn't work on Internet Explorer 6, most probably something to do with the Javascript interpreter on IE. --TK-Squared 01:50, 22 March 2009 (MDT)
For some reason, the hide/show thing doesn't seem to be working. Is that just my computer? --Sam Kay 03:14, 22 March 2009 (MDT)
Sigh... That's the problem with JavaScript. No two browsers implement it exactly the same. So unless you work with a JavaScript toolkit, you have to have five different browsers installed on your computer to verify that your code works the same in them all. —Sledged (talk 15:38, 22 March 2009 (MDT)
I can verify that it works on Chrome and Firefox, but it definetly does not work on Internet Explorer, which I believe is normally the biggest problem in Javascript interpretations anyway. --TK-Squared 15:52, 22 March 2009 (MDT)