b2evolution PHP Cross Reference Blogging Systems

Source: /plugins/skeleton.plugin.php - 106 lines - 2561 bytes - Summary - Text - Print

Description: ----------------------------------------------------------------------------------------- This file provides a skeleton to create a new {@link http://b2evolution.net/ b2evolution} plugin quickly. See also: - {@link http://b2evolution.net/man/creating-plugin} - {@link http://doc.b2evolution.net/stable/plugins/Plugin.html} (Delete this first paragraph, of course) ----------------------------------------------------------------------------------------- This file implements the Foo Plugin for {@link http://b2evolution.net/}.

   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://b2evolution.net/man/creating-plugin}
   8   *  - {@link http://doc.b2evolution.net/stable/plugins/Plugin.html}
   9   * (Delete this first paragraph, of course)
  10   * -----------------------------------------------------------------------------------------
  11   *
  12   * This file implements the Foo Plugin for {@link http://b2evolution.net/}.
  13   *
  14   * @copyright (c)2010 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  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  23  
  24  
  25  /**
  26   * Foo Plugin
  27   *
  28   * Your description
  29   *
  30   * @package plugins
  31   */
  32  class pluginname_plugin extends Plugin
  33  {
  34      /**
  35       * Variables below MUST be overriden by plugin implementations,
  36       * either in the subclass declaration or in the subclass constructor.
  37       */
  38      /**
  39       * Human readable plugin name.
  40       */
  41      var $name = 'Plugin Name';
  42      /**
  43       * Code, if this is a renderer or pingback plugin.
  44       */
  45      var $code = '';
  46      var $priority = 50;
  47      var $version = '0.1-dev';
  48      var $author = 'http://example.com/';
  49      var $help_url = '';
  50  
  51      /**
  52       * Group of the plugin, e.g. "widget", "rendering", "antispam"
  53       */
  54      var $group;
  55  
  56  
  57      /**
  58       * Init: This gets called after a plugin has been registered/instantiated.
  59       */
  60  	function PluginInit( & $params )
  61      {
  62          $this->short_desc = $this->T_('Short description');
  63          $this->long_desc = $this->T_('Longer description. You may also remove this.');
  64      }
  65  
  66  
  67      /**
  68       * Define settings that the plugin uses/provides.
  69       */
  70  	function GetDefaultSettings()
  71      {
  72          return array();
  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       * Param definitions when added as a widget.
  87       *
  88       * Plugins used as widget need to implement the SkinTag hook.
  89       *
  90       * @return array
  91       */
  92  	function get_widget_param_definitions( $params )
  93      {
  94          return array();
  95      }
  96  
  97  
  98      // If you use hooks, that are not present in b2evo 1.8, you should also add
  99      // a GetDependencies() function and require the b2evo version your Plugin needs.
 100      // See http://doc.b2evolution.net/stable/plugins/Plugin.html#methodGetDependencies
 101  
 102  
 103      // Add the methods to hook into here...
 104      // See http://doc.b2evolution.net/stable/plugins/Plugin.html
 105  }
 106  ?>

title

Description

title

Description

title

Description

title

title

Body