Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin Feature
#13
Just some rough thoughts, inspired from jquery style plugins.

Code:
Class pluginName(){
$db = array(
   info = array(
    name = "",
    author = "",
    version = "",
    website = "",
    license = "",
    requires = array()    
   ),
   files = array(
    "users" = "users.xml",
    "sites" = "sites.xml"
   ),
   settings = array(
    blah = "lol"
   )
  )
  /* plugin admin screens */
  function optionsRender($key $value){
   /* render form
    *  key & value can be used to chage how / what the config form displays.
    */
  }
  function optionsProcess($key $value){
   /* process form
    *  operates on form values and runs the get & set below.
    */
  }
  function configSet($key $value){}
  function configGet($key $value){}
  
  /* plugin start logic */
  function init(){
   /* setup hooks */
  }

  /* hooks */
  function renderList($key, $value){}
  function renderItem($key, $value){}
  function doSomething($key, $value){}

  function install($key, $value){
    // do things required by the plugin to operate, possibly create a folder
  }
  function uninstall($key, $value){
    // reverse the installation process.
  }

  function healthcheck($key, $value){
    // make sure the plugin requirements are good.
  }

}

Those hooks in there are unique to the plugin.

Installation will create a manifest.xml file in the plugin folder. describing the steps taken.
Fear is mindkiller, the little death that obliterates.
Reply


Messages In This Thread
Plugin Feature - by someone - 2009-08-08, 10:17:59
Plugin Feature - by kristjanmik - 2009-08-08, 10:51:37
Plugin Feature - by Derek - 2009-08-08, 13:40:39
Plugin Feature - by badcat - 2009-08-08, 14:37:33
Plugin Feature - by someone - 2009-08-08, 16:45:07
Plugin Feature - by ccagle8 - 2009-08-08, 23:55:15
Plugin Feature - by ccagle8 - 2009-08-08, 23:56:54
Plugin Feature - by Derek - 2009-08-09, 00:06:15
Plugin Feature - by someone - 2009-08-12, 04:23:48
Plugin Feature - by ccagle8 - 2009-08-13, 11:52:08
Plugin Feature - by someone - 2009-08-18, 06:05:25
Plugin Feature - by pixelita - 2009-08-29, 23:31:36
Plugin Feature - by airtonix - 2009-12-26, 13:33:49
Plugin Feature - by Zegnåt - 2009-12-26, 21:32:19
Plugin Feature - by litzinger - 2010-01-06, 12:33:59
Plugin Feature - by ccagle8 - 2010-01-06, 13:47:05
Plugin Feature - by airtonix - 2010-01-09, 12:02:00



Users browsing this thread: 1 Guest(s)