Advertisement
kurozael

PHP Base Plugin

Jul 10th, 2011
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.64 KB | None | 0 0
  1. <?
  2.     /*
  3.         © 2011 Bloodhound do not share, re-distribute or modify
  4.         this file without the permission of its owner (connawiles@gmail.com).
  5.     */
  6.    
  7.     class HelloWorld extends BasePlugin
  8.     {
  9.         /*
  10.             A function to get the plugin information.
  11.             Parameters: none.
  12.         */
  13.         static public function GetInfo()
  14.         {
  15.             return array(
  16.                 "Name" => "Hello World",
  17.                 "Desc" => "A plugin to display hello world.",
  18.                 "Author" => "Conna Wiles"
  19.             );
  20.         }
  21.         /*
  22.             A hook called when the page is loaded.
  23.             Parameters: a data array object which can be modified.
  24.         */
  25.         static public function OnPageLoad($dataArray)
  26.         {
  27.             ?>
  28.                 <div class="contentBox">
  29.                     <div class="contentTitle">
  30.                         <img src="images/icons/package.png"/>Hello World
  31.                     </div>
  32.                     <div class="contentText">
  33.                         This box was created by the Hello World plugin using the OnPageLoad hook.
  34.                     </div>
  35.                 </div>
  36.             <?
  37.         }
  38.         /*
  39.             A hook called when the mini-nav links are added.
  40.             Parameters: a data array object which can be modified.
  41.         */
  42.         static public function OnMiniNavLinksAdded($dataArray)
  43.         {
  44.             ?>
  45.                 <a href="#" class="toolTip" title="This was added by the Hello World plugin using the OnMiniNavLinksAdded."><img src="images/icons/package.png"/>Hello World</a>
  46.             <?
  47.         }
  48.         /*
  49.             A hook called when the navigation links are added.
  50.             Parameters: a data array object which can be modified.
  51.         */
  52.         static public function OnNavigationLinksAdded($dataArray)
  53.         {
  54.             ?>
  55.                 <a href="#" class="toolTip" title="This was added by the Hello World plugin using the OnNavigationLinksAdded hook."><img src="images/icons/package.png"/>Hello World</a>
  56.             <?
  57.         }
  58.     }
  59. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement