b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 2.4) [ class tree: plugins ] [ index: plugins ] [ all elements ]

Source for file skeleton.plugin.php

Documentation is available at skeleton.plugin.php

  1. <?php
  2. /**
  3.  * -----------------------------------------------------------------------------------------
  4.  * This file provides a skeleton to create a new {@link http://b2evolution.net/ b2evolution}
  5.  * plugin quickly.
  6.  * See also:
  7.  *  - {@link http://manual.b2evolution.net/CreatingPlugin}
  8.  *  - {@link http://doc.b2evolution.net/stable/plugins/Plugin.html}
  9.  * (Delete this first paragraph, of course)
  10.  * -----------------------------------------------------------------------------------------
  11.  *
  12.  * This file implements the PLUGIN_NAME plugin for {@link http://b2evolution.net/}.
  13.  *
  14.  * @copyright (c)2006 by Your NAME - {@link http://example.com/}.
  15.  *
  16.  * @license GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  17.  *
  18.  * @package plugins
  19.  *
  20.  * @author YOUR NAME
  21.  *
  22.  * @version $Id: skeleton.plugin.php,v 1.1 2006/10/30 20:14:26 blueyed Exp $
  23.  */
  24. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  25.  
  26.  
  27. /**
  28.  * PLUGIN_NAME Plugin
  29.  *
  30.  * Some description
  31.  *
  32.  * @package plugins
  33.  */
  34. class pluginname_plugin extends Plugin
  35. {
  36.     /**
  37.      * Variables below MUST be overriden by plugin implementations,
  38.      * either in the subclass declaration or in the subclass constructor.
  39.      */
  40.     var $name = 'PLUGIN_NAME';
  41.     /**
  42.      * Code, if this is a renderer or pingback plugin.
  43.      */
  44.     var $code = '';
  45.     var $priority = 50;
  46.     var $version = '0.1-dev';
  47.     var $author = 'http://example.com/';
  48.     var $help_url = '';
  49.  
  50.     var $apply_rendering = 'opt-in';
  51.  
  52.  
  53.     /**
  54.      * Init
  55.      *
  56.      * This gets called after a plugin has been registered/instantiated.
  57.      */
  58.     function PluginInit$params )
  59.     {
  60.         $this->short_desc = $this->T_('Short description');
  61.         $this->long_desc = $this->T_('Longer description. You may also remove this.');
  62.     }
  63.  
  64.  
  65.     /**
  66.      * Define settings that the plugin uses/provides.
  67.      */
  68.     function GetDefaultSettings()
  69.     {
  70.         return array(
  71.  
  72.             );
  73.     }
  74.  
  75.  
  76.     /**
  77.      * Define user settings that the plugin uses/provides.
  78.      */
  79.     function GetDefaultUserSettings()
  80.     {
  81.         return array(
  82.  
  83.             );
  84.     }
  85.  
  86.  
  87.     // If you use hooks, that are not present in b2evo 1.8, you should also add
  88.     // a GetDependencies() function and require the b2evo version your Plugin needs.
  89.     // See http://doc.b2evolution.net/stable/plugins/Plugin.html#methodGetDependencies
  90.  
  91.  
  92.     // Add the methods to hook into here...
  93.     // See http://doc.b2evolution.net/stable/plugins/Plugin.html
  94.  
  95.  
  96. }
  97. ?>

Documentation generated on Sat, 06 Mar 2010 03:25:21 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).