b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: plugins ] [ index: plugins ] [ all elements ]

Source for file _autolinks.renderer.php

Documentation is available at _autolinks.renderer.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-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  8.  *
  9.  * @package plugins
  10.  */
  11. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  12.  
  13. /**
  14.  * Includes:
  15.  */
  16. require_once dirname(__FILE__).'/../renderer.class.php';
  17.  
  18. /**
  19.  * @package plugins
  20.  */
  21. {
  22.     var $code = 'b2evALnk';
  23.     var $name = 'Auto Links';
  24.     var $priority = 60;
  25.  
  26.     var $apply_when = 'opt-out';
  27.     var $apply_to_html = true
  28.     var $apply_to_xml = false
  29.     var $short_desc;
  30.     var $long_desc;
  31.  
  32.  
  33.     /**
  34.      * Constructor
  35.      *
  36.      * {@internal autolinks_Rendererplugin::autolinks_Rendererplugin(-)}}
  37.      */
  38.     function autolinks_Rendererplugin()
  39.     {
  40.         $this->short_desc = T_('Make URLs clickable');
  41.         $this->long_desc = T_('No description available');
  42.     }
  43.  
  44.  
  45.     /**
  46.      * Perform rendering
  47.      *
  48.      * {@internal autolinks_Rendererplugin::render(-)}}
  49.      *
  50.      * @param string content to render (by reference) / rendered content
  51.      * @param string Output format, see {@link format_to_output()}
  52.      * @return boolean true if we can render something for the required output format
  53.      */
  54.     function render$content$format )
  55.     {
  56.         ifparent::render$content$format ) )
  57.         {    // We cannot render the required format
  58.             return false;
  59.         }
  60.     
  61.         $content make_clickable$content );
  62.         
  63.         return true;
  64.     }
  65. }
  66.  
  67. // Register the plugin:
  68. $this->registernew autolinks_Rendererplugin() );
  69.  
  70. ?>

Documentation generated on Tue, 20 May 2008 01:52:16 +0200 by phpDocumentor 1.4.2