FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Support Requests Collapsing box
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 1599 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.


Hello been having problems with the collapsing box codes and getting them to work... i have no idea how to do them... had to remove them all as everytime i put them in and tryed to collapse something it never worked...

can anyone help?

Vanit2010 16:35, November 19, 2011

Other than giving you a link to a Show/Hide functionality tutorial, there's not much we can do here without knowing which wiki you're referring to. Sovq 16:56, November 19, 2011 (UTC)
the link to my site is http://ace.wikia.com/wiki/WWE_Universe_Mode
i think i added the right codes in the right places.Vanit2010 17:08, November 19, 2011 (UTC)


Yep. it works thank you Sovq. :) Just trying to find out how to auto hide. Only thing thats not working. the hides are on this page. want to know how i can auto hide them :) http://ace.wikia.com/wiki/WWE_Unified_Tag_Team_Championship

reasons there 3 tables is im trying to test them

Vanit2010 18:14, November 19, 2011 (UTC)

This, in your common.js, will auto-collapse:

var ShowHideConfig = { autoCollapse: 0};
importScriptPage('ShowHide/code.js', 'dev');

It is importing the code from the "dev" wiki, you copied the ShowHide/code.js to your wiki and tried to change it there, but to import it on your own wiki you would have needed to use something like:

importScriptURI('http://ace.wikia.com/wiki/MediaWiki:ShowHide/code.js&action=raw&ctype=text/javascript&dontcountme=s&templates=expand');

in your common.js instead.

--Sxerks 19:05, November 19, 2011 (UTC)


so i need to remove this one

/* Any JavaScript here will be loaded for all users on every page load. */

var ShowHideConfig = {

brackets: '[[]]'

};

importScriptPage('ShowHide/code.js', 'dev');

importScriptPage('CollapsibleInfobox/code.js', 'dev'); //for examples on CollapsibleInfobox

Vanit2010 19:46, November 19, 2011 (UTC)


Just add

var ShowHideConfig = { autoCollapse: 0};

before

importScriptPage('ShowHide/code.js', 'dev');

that is all. --Sxerks 19:50, November 19, 2011 (UTC)


Yeah i have done that but it seems to not working at all now.


/* Any JavaScript here will be loaded for all users on every page load. */
 
var ShowHideConfig = { 
    brackets: '[[]]'
};
var ShowHideConfig = { autoCollapse: 0};
importScriptURI('http://ace.wikia.com/wiki/MediaWiki:ShowHide/code.js&action=raw&ctype=text/javascript&dontcountme=s&templates=expand');
importScriptPage('CollapsibleInfobox/code.js', 'dev'); //for examples on CollapsibleInfobox


Vanit2010 20:00, November 19, 2011 (UTC)

You don't need this line:

importScriptURI('http://ace.wikia.com/wiki/MediaWiki:ShowHide/code.js&action=raw&ctype=text/javascript&dontcountme=s&templates=expand');
--Sxerks 20:56, November 19, 2011 (UTC)
Instead of using importScriptURI, you'd be better off using importScript('MediaWiki:ShowHide/code.js');. But I would really advise you use a dev wiki import instead of porting the code to your own wiki for two reasons:
  • The good folk from dev wiki upgrade and update the code when necessary,
  • Using a unified collapsibility standard allows to solve problem on particular wikis easier.
The code to use would be
var ShowHideConfig = { autoCollapse: 0 };
importScriptPage('ShowHide/code.js', 'dev');

Try to add that (or if you must, the one with importScript('MediaWiki:ShowHide/code.js');), refresh the page and if it still doesn't work, let us know. Sovq 20:58, November 19, 2011 (UTC)


Its still not working. Put the code in http://ace.wikia.com/wiki/MediaWiki:Common.js and all. but the table remains fully open. though you can click on hide still. it loads already opened still. Vanit2010 21:51, November 19, 2011 (UTC)

Collapsible tables need to have the class autocollapse assigned to be affected by the autoCollapse: 0 setting. See this page for an example. NavFrames however don't require an additional class to be affected by the threshold. Sovq 22:06, November 19, 2011 (UTC)

Thank you all it works now. :) thank you all very much for the help. --Vanit2010 22:43, November 19, 2011 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.