No edit summary |
m (Removing redlinks.) Tag: apiedit |
||
(10 intermediate revisions by 3 users not shown) | |||
Line 38: | Line 38: | ||
:so i need to remove this one |
:so i need to remove this one |
||
⚫ | |||
− | + | <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 13.0px Courier; color: #3a3a3a; background-color: #f2f2f2">var ShowHideConfig = {</p> |
|
⚫ | |||
⚫ | |||
+ | <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 13.0px Courier; color: #3a3a3a; background-color: #f2f2f2">importScriptPage('ShowHide/code.js', 'dev');</p> |
||
− | <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 13.0px Courier; color: #3a3a3a; background-color: #f2f2f2"> |
+ | <p style="margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 13.0px Courier; color: #3a3a3a; background-color: #f2f2f2">importScriptPage('CollapsibleInfobox/code.js', 'dev'); //for examples on CollapsibleInfobox</p> |
+ | :[[User:Vanit2010|Vanit2010]] 19:46, November 19, 2011 (UTC) |
||
⚫ | |||
+ | Just add |
||
+ | <pre> |
||
+ | var ShowHideConfig = { autoCollapse: 0}; |
||
+ | </pre> |
||
+ | before |
||
+ | <pre> |
||
+ | importScriptPage('ShowHide/code.js', 'dev'); |
||
+ | </pre> |
||
+ | that is all. --[[User:Sxerks|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 |
||
+ | |||
+ | |||
+ | [[User:Vanit2010|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'); |
||
+ | :--[[User:Sxerks|Sxerks]] 20:56, November 19, 2011 (UTC) |
||
+ | |||
+ | :Instead of using <code>importScriptURI</code>, you'd be better off using <code>importScript('MediaWiki:ShowHide/code.js');</code>. 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 |
||
+ | <pre> |
||
+ | var ShowHideConfig = { autoCollapse: 0 }; |
||
+ | importScriptPage('ShowHide/code.js', 'dev'); |
||
+ | </pre> |
||
+ | |||
+ | Try to add that (or if you must, the one with <code>importScript('MediaWiki:ShowHide/code.js');</code>), refresh the page and if it still doesn't work, let us know. <span style="font-size:125%; font-weight:bold; font-family:Trebuchet MS, Helvetica, sans-serif; text-shadow:0 0 0.05em #646464">— [[User:Sovq|Sovq]]</span> 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. [[User:Vanit2010|Vanit2010]] 21:51, November 19, 2011 (UTC) |
||
+ | |||
+ | :Collapsible tables need to have the class '''autocollapse''' assigned to be affected by the<code> autoCollapse: 0</code> setting. See [http://ace.wikia.com/wiki/User:Sovq this page] for an example. NavFrames however don't require an additional class to be affected by the threshold. <span style="font-size:125%; font-weight:bold; font-family:Trebuchet MS, Helvetica, sans-serif; text-shadow:0 0 0.05em #646464">— [[User:Sovq|Sovq]]</span> 22:06, November 19, 2011 (UTC) |
||
+ | |||
+ | Thank you all it works now. :) thank you all very much for the help. --[[User:Vanit2010|Vanit2010]] 22:43, November 19, 2011 (UTC) |
Latest revision as of 05:46, 16 February 2016
To contact staff directly or to report bugs, please use Special:Contact.
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 usingimportScript('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)