Forum:Enabling Collapsible Tables

I'd like to add collapsible tables to my wiki. I read up on Wikipedia's collapsible tables, and tried it out. Obviously, they aren't default. I tried them here on Community Central, and they work in Monobook, but not Oasis:

That table will appear as a regular table in Oasis. But if you view this page in Monobook, it appears collaspsed and can be expanded. I checked through MediaWiki:Common.js, MediaWiki:Common.css, MediaWiki:Monobook.js, and MediaWiki:Monobook.css, but found nothing relating to collapsible tables. Are collapsible tables an extension I have to request to be enabled with Special:Contact?

(Return to Oasis)

  Monchoman45    Talk   Contribs  Skystone   14:33,1/8/2011
 * Yet another reason to use monobook, surely. No clue why this doesn't happen in Oasis, Special:Contact and see if you can get it enabled -- Random Time  14:48, January 8, 2011 (UTC)


 * You can go through MediaWiki:ShowHide2.js it seems to be holding the script for the tables. Sovq 19:24, January 8, 2011 (UTC)


 * I think there are several ways of doining them but Collapsible tables still work ok in Oasis on tractors wiki as far as i know. I think the MediaWiki:wikia.css may need updating to link it to the Mediawiki:common.css page, as when oasis first came i recall some thinks dident work at first till a link was added. (the versions linked above on central will be different to your wiki) Mine was originally created from wikipedia's code IRC and had code added to Common.css to define the class for the collapsible tables used on some pages with other js code used for the collapsible navboxes (but some wikis use code linked to the dev.wikia site to achieve that show/hide effect within navboxes). - 20:31, January 8, 2011 (UTC)


 * Show/Hide works on the Cannabis Wiki with Oasis. See:


 * http://dev.wikia.com/wiki/Talk:ShowHide#The_Oasis_problem_has_been_solved


 * Some developers commenting in that thread said that they were fed up with Wikia and Oasis, and that they haven't been updating things. The various related help pages are out-of-date, and some of the JS and CSS is screwy too. Multiple pages are involved. I managed to get it working again on the Cannabis Wiki.


 * I got the JS working in my wiki, and some CSS to work with it. You need both JS and CSS, I believe, for Show/Hide to work correctly. Here is the JS and CSS I use:
 * http://cannabis.wikia.com/wiki/MediaWiki:Common.js
 * http://cannabis.wikia.com/wiki/MediaWiki:Common.css


 * The relevant CSS is at the end and starts with


 *  /* Standard Navigationsleisten, aka box hiding thingy from .de. */ 


 * Feel free to copy it. You can see how I implement Show/Hide here:
 * http://cannabis.wikia.com/wiki/Category:Collapsible_box_templates


 * Look at the wikitext for one of the collapsible tables to see how it is implemented. --Timeshifter 22:00, January 8, 2011 (UTC)


 * I usually get my collapsible table code from here: mediawikiwiki:Manual:Collapsible tables
 * You need to put the relevant CSS in MediaWiki:Wikia.css for it to work on Oasis (the new skin) instead of MediaWiki:Common.css. -- Fandyllic (talk &middot; contr) 7:24 PM PST 9 Jan 2011


 * Oops. I had forgotten that I had added the collapsible table CSS also to Wikia.css back at the beginning of October 2010:
 * http://cannabis.wikia.com/wiki/MediaWiki:Wikia.css


 * It used to be sufficient to add CSS only to Common.css to effect all skins. Now Common.css effects all skins except the Oasis/Wikia skin.


 * Adding JS to Common.js still effects all skins including the Oasis/Wikia skin. --Timeshifter 06:51, January 10, 2011 (UTC)


 * See Forum:Common.css.


 * Thanks. It shows a way to import Common.css into Wikia.css. It works great. --Timeshifter 20:03, January 27, 2011 (UTC)

(unindent). Show-Hide how-to info is summarized here:
 * Forum:Need help with ShowHide script. --Timeshifter 20:03, January 27, 2011 (UTC)