User:Coincollector/test zone
Welcome to the Test Zone. Here I put the stubs of tables or templates that will be used in the wiki later (if the proof works perfectly). However, no other user but me can edit this, so I recommend for rookies to go to the sandbox to test there. |
Collapsible Table
These are some codings that I've found from Bulbapedia and This Wiki. Its creator was the user Poke. Credits to him for creating a short way of creating a dynamic box as this for the projects of wikis.
Code taken from bulbapedia:
if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) { var script = document.createElement( 'script' ); script.src = '/w/index.php?title=User:Poke/CollapsibleTables.js&action=raw&ctype=text/javascript'; script.type = 'text/javascript'; document.getElementsByTagName( 'head' )[0].appendChild( script ); hookEvent( 'load', function() { new CollapsibleTables(); } ); }
Code Taken from Guildwars:
if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) { addScript( 'MediaWiki:CollapsibleTables.js' ); hookEvent( 'load', function() { new CollapsibleTables(); diffwithFix();
To install, the code must be set in the Mediawiki:Common.js page (this wiki needs such page [!] ). However, it couldn't work efficiently without the main coding for this, and thus, it is necessary to create a subpage for the collapsible box' structure coding... something like this
I'll let you the links of the codes and some examples about results by creating this function:
Results
I had the opportunity to create the Mediawiki:Common.js page and install immediately the collapsible-expandable table class coding for a review, which it seems it was successful and the table appears working perfectly. These are the links where the functions are supported.
Mario |
---|
Mario is great |