Forum:Collapse Tables

Hi, guys. I used Collapsible Tables on my Wiki quite a few years ago, but now I can't remember what the code is. I added a couple of things to the Common.js and Common.css, but my table isn't showing yet as collapsible.

Here is the URL where I am trying to implement the table. Feel free to make necessary changes to the .css and .js pages (1999 Busch North Series Central). Thanks! --DaNASCAT 00:08, 18 February 2009 (UTC)


 * I don't understand your problem.. I see you have the collapsible table code in the wiki's MediaWiki:Common.js. (copied from Wikipedia's?) If you want to make a table collapsible, add the class 'collapsible':

{| class="collapsible" ... Example: -- ko  (talk)  04:17, 18 February 2009 (UTC)


 * That code still does not work. I copied your table onto the site, and it still will not show the table as collapsible. Perhaps it is because I am missing the buttons I thought I added (the code to allow the table to have the show/hide switch), but I think those are in the right place at Common.css.


 * On a related note, does anyone know how Wikipedia programs their pages during their fund drivers to allow a collapsible table at the front of every table. Although I'm not doing a fund drive, I'd like to do a similar design for an extremely exciting site project being unveiled next week. --DaNASCAT 05:02, 18 February 2009 (UTC)


 * The funds rising message at wikipedia is normally in MediaWiki:Sitenotice and/or Mediawiki:anonnotice for anonymous users. But that message can be dismissed by users so to make sure they see it, each time you change it, increment MediaWiki:Sitenotice id.


 * The table on your wiki page is already collapsible : Screen capture. You have to make the browser do an hard refresh of the page if you want the last version of CSS and JS files to be on your computer. Use Shift+F5 or Ctrl+F5 (it depend on the browser). — TulipVorlax 08:29, 18 February 2009 (UTC)


 * Hey, Tulip. Thanks for the tech help! You're always great with the tech end of things. However, a hard refresh still did not update the collapsible for me. Which might raise the question now if this is a browser issue. I can get the collapse hide/show button in IE, but I can not get it in Firefox 3 or Google Chrome. --DaNASCAT 15:27, 18 February 2009 (UTC)


 * I think the some other parts of the JS are interfering with it. It works when the collapsible tables are alone in the js file -- Sixorish 17:52, 18 February 2009 (UTC)


 * There's some JS errors on the MediaWiki:Common.js file. Open the error console to see what happens (in Firefox: it's in the tools menu, or pressing CTRL+SHIFT+J). There's a JS error that stops its execution. --Ciencia Al Poder (talk) -WikiDex 19:30, 18 February 2009 (UTC)
 * Yeah, didn't see that since i dont systematically tests things in Firefox (it's all the contrary when working on my own websites (wich doesn't include wikis)). — TulipVorlax 19:42, 18 February 2009 (UTC)


 * The Firefox error seems to be this line of code

--DaNASCAT 20:23, 18 February 2009 (UTC)


 * If you don't need the other pieces of JS code then consider removing them. -- ko isuru ( talk ) 17:16, 20 February 2009 (UTC)
 * First a note about the Fund Raiser from wikipedia, thats coded by the devs server side there is no mediawiki page where it can be found for modification or how they do it.
 * Second that wiki has basically a copy of wikipedia, many of the stuff i dont think its been use or its even needed
 * Internet Explorer bug fix
 * Interwiki links to featured articles
 * Main Page layout fixes
 * pageview counter
 * "Technical restrictions" title fix
 * Add dismiss button to watchlist-message (if you want to keep it but i dont recomend it unless you are or have core page watchers)
 * Numeric sorting (this if you want keep it)
 * Main Page deletion image
 * Change Special:Search to use a drop-down menu
 * Geo-targeted watchlist notice
 * Sysop Javascript
 * WikiMiniAtlas
 * function PngFix
 * Those where a list of all the ones you should delete you will not use it, and many have things store on other pages that you dont have or are simply not available at wikia
 * and for Monobook.js revert your edit back. since you are duplicating part of the common.js content and also serves nor purpose since they cant load properly
 * for collapse table you only need the following sections:
 * Test if an element has a certain class
 * Collapsible tables
 * Dynamic Navigation Bars (experimental)
 * --Cizagna (Talk) Central Dofus 02:00, 24 February 2009 (UTC)

I seem to have fixed the JavaScript issue that was hiding the show/hide buttons. However, the text, like it does on Wikipedia and other sites that use collapsible tables, does not fill in the empty space when the table is collapsed. --DaNASCAT 03:51, 24 February 2009 (UTC)


 * Edit: Found an end around. Thanks to everyone for their help! --DaNASCAT 04:13, 24 February 2009 (UTC)

Also, on the Site Notice, is there a way to turn "dismiss" off, instead perhaps making the message collapsible instead of dismissable? --DaNASCAT 04:54, 24 February 2009 (UTC)
 * You can make it collapsible simply by putting the message in a collapsible table. Though I don't know if you can turn its dismissable feature off, since it is enabled by mw:Extension:DismissableSiteNotice. -- ko isuru ( talk ) 08:49, 24 February 2009 (UTC)


 * Well, I ask because MediaWiki Commons has a Sitenotice up that is not dismissable. Though they probably have messed with their MediaWiki code to make that possible. --DaNASCAT 15:55, 24 February 2009 (UTC)


 * its more like Wikia has mess with its own MediaWiki by installing dismisable Site Notice Extension --Cizagna (Talk) Central Dofus 16:49, 24 February 2009 (UTC)
 * That's what I'm trying to tell you. MediaWikis have sitenotices that are not dismissable, and they make it dismissable by installing the DismissableSiteNotice extension. By the way, what Commons are you talking about? Wikimedia Commons has theirs installed. -- ko isuru ( talk ) 04:16, 25 February 2009 (UTC)


 * Hahaha, silly me, perhaps if I had logged in, I would have noticed the M. Commons message is also dismissable. So it is impossible to post a site notice on a Wikia wiki without it being dismissable? Like, there's not a separate file or a "tag" or anything that will prevent the message from being dismissable? --DaNASCAT 06:36, 26 February 2009 (UTC)