User:Coincollector/test zone: Difference between revisions
No edit summary |
|||
Line 36: | Line 36: | ||
*[http://bulbapedia.bulbagarden.net/wiki/User_talk:Poke/CollapsibleTables.js Examples] | *[http://bulbapedia.bulbagarden.net/wiki/User_talk:Poke/CollapsibleTables.js Examples] | ||
*[http://wiki.guildwars.com/wiki/User:Poke/sandbox/CollapsibleTables More Examples] | *[http://wiki.guildwars.com/wiki/User:Poke/sandbox/CollapsibleTables More Examples] | ||
===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. | |||
For Sysops, you can get in these pages if you need to make some changes and improvements for the appearance of the new dynamic tables | |||
*[[User:Coincollector/CollapsibleTables.js]] | |||
*[[Mediawiki:Common.js]] | |||
<br> | |||
{| class="expandable" style="border: 1px solid silver; width: 90%; margin: auto;" | |||
! style="background: #EEE;" | Mario | |||
|- | |||
| Mario is great | |||
|} |
Revision as of 03:09, December 26, 2008
![]() |
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. For Sysops, you can get in these pages if you need to make some changes and improvements for the appearance of the new dynamic tables
Mario |
---|
Mario is great |