User:Coincollector/test zone: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
Line 5: Line 5:
----
----


===Collapsible Table===
<big><font color=red>None Current</font></big>
These are some codings that I've found from Bulbapedia and [http://wiki.guildwars.com/wiki/User:Poke/sandbox/CollapsibleTables 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 <nowiki>[!]</nowiki> ). 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 [http://wiki.guildwars.com/wiki/MediaWiki:CollapsibleTables.js this]
 
I'll let you the links of the codes and some examples about results by creating this function:
*[http://bulbapedia.bulbagarden.net/wiki/User_talk:Poke User Poke's talk page from Bulbapedia]
*[http://bulbapedia.bulbagarden.net/wiki/User_talk:Poke/CollapsibleTables.js 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.
These are the links where the functions are supported.
*[[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 01:28, January 24, 2009

32px-Crystal_Clear_app_kservices.png 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.

None Current