b2evolution

Multilingual multiuser multiblog engine

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

Source for file _autolinks.plugin.php

Documentation is available at _autolinks.plugin.php

  1. <?php
  2. /**
  3.  * This file implements the Automatic Links plugin for b2evolution
  4.  *
  5.  * b2evolution - {@link http://b2evolution.net/}
  6.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  7.  * @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}
  8.  *
  9.  * @package plugins
  10.  */
  11. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  12.  
  13.  
  14. /**
  15.  * @package plugins
  16.  */
  17. class autolinks_plugin extends Plugin
  18. {
  19.     var $code = 'b2evALnk';
  20.     var $name = 'Auto Links';
  21.     var $priority = 60;
  22.     var $version = '1.9-dev';
  23.     var $apply_rendering = 'opt-out';
  24.     var $group = 'rendering';
  25.     var $short_desc;
  26.     var $long_desc;
  27.  
  28.  
  29.     /**
  30.      * Init
  31.      */
  32.     function PluginInit$params )
  33.     {
  34.         $this->short_desc = T_('Make URLs clickable');
  35.         $this->long_desc = T_('This renderer will detect URLs in the text and automatically transform them into clickable links.');
  36.     }
  37.  
  38.  
  39.     /**
  40.      * Perform rendering
  41.      *
  42.      * @param array Associative array of parameters
  43.      *                              (Output format, see {@link format_to_output()})
  44.      * @return boolean true if we can render something for the required output format
  45.      */
  46.     function RenderItemAsHtml$params )
  47.     {
  48.         $content $params['data'];
  49.  
  50.         $content make_clickable$content );
  51.  
  52.         return true;
  53.     }
  54. }
  55.  
  56.  
  57. /*
  58.  * $Log: _autolinks.plugin.php,v $
  59.  * Revision 1.13.2.3  2006/12/26 03:18:50  fplanque
  60.  * assigned a few significant plugin groups
  61.  *
  62.  * Revision 1.13.2.2  2006/11/04 19:55:11  fplanque
  63.  * Reinjected old Log blocks. Removing them from CVS was a bad idea -- especially since Daniel has decided branch 1.9 was his HEAD...
  64.  *
  65.  * Revision 1.13  2006/07/10 20:19:30  blueyed
  66.  * Fixed PluginInit behaviour. It now gets called on both installed and non-installed Plugins, but with the "is_installed" param appropriately set.
  67.  *
  68.  * Revision 1.12  2006/07/07 21:26:49  blueyed
  69.  * Bumped to 1.9-dev
  70.  *
  71.  * Revision 1.11  2006/07/06 19:56:29  fplanque
  72.  * no message
  73.  *
  74.  * Revision 1.10  2006/06/16 21:30:57  fplanque
  75.  * Started clean numbering of plugin versions (feel free do add dots...)
  76.  *
  77.  * Revision 1.9  2006/05/30 19:39:55  fplanque
  78.  * plugin cleanup
  79.  *
  80.  * Revision 1.8  2006/04/11 21:22:26  fplanque
  81.  * partial cleanup
  82.  *
  83.  */
  84. ?>

Documentation generated on Tue, 18 Dec 2007 19:10:31 +0100 by phpDocumentor 1.4.0