User:Year2000Prob/Y2P

I'm working on a MediaWiki framework called Y2P. All you need to use it is this code: // Y2P MediaWiki Framework var Y2P = new Object; importScript("User:Y2K/Y2P.MediaWiki.js"); importScript("User:Y2K/Y2P.Debug.js"); // optional; enables debug features; shows errors when they occur
 * : Very similar functionality to.
 * Adds a new portlet to the sidebar on the left.
 * Example: Using the code:

Y2P.MediaWiki.AddPortlet("p-extlinks", "external links");
 * will generate:

external links  
 * and put it in the sidebar underneath the others.


 * : Very similar functionality to.
 * Adds new items to an existing portlet. (Portlets include the tab bar, the personal bar and all the boxes in the left sidebar.)


 * Example: Using the code:

Y2P.MediaWiki.AddPortletItem([ {    text: "my monobook js",    url: document.getElementById("pt-userpage").childNodes[0].href + "/monobook.js",    before: "pt-logout"  },  {    text: "my monobook css",    url: document.getElementById("pt-userpage").childNodes[0].href + "/monobook.css",    before: "pt-logout"  } ]);
 * will generate:

my monobook js my monobook css
 * and place it in the personal bar in front of the "log out" link.


 * NOTE: You only need one parameter out of,  ,   or   to define where the item is placed.

Full Example var externallinks = Y2P.MediaWiki.AddPortlet("p-extlinks", "externallinks"); Y2P.MediaWiki.AddPortletItems([ {    text: "Joey Joe Joe Junior Shabbadoo's Website",    url: "http://www.joeyjoejoejuniorshabbadoo.com/",    addToRaw: externallinks  },  {    text: "#wikipedia",    url: function {      window.open( "http://embed.mibbit.com/?channel=%23wikipedia&server=irc.freenode.net%3A6667", "_blank", "width=600&height=380&scrollbars=no&status=no&toolbar=no&location=no&menubar=no&directories=no&resizable=yes" );   },    addToRaw: externallinks  } ]); Generates: external links  Joey Joe Joe Junior Shabbadoo's Website <a onclick="function{window.open("http://embed.mibbit.com/?channel=%23wikipedia&server=irc.freenode.net%3A6667","_blank","width=600&height=380&scrollbars=no&status=no&toolbar=no&location=no&menubar=no&directories=no&resizable=yes")};" href="javascript:void(0)">#wikipedia</a></li> </ul>