HTML_BBCodeParser
[ class tree: HTML_BBCodeParser ] [ index: HTML_BBCodeParser ] [ all elements ]

Source for file Extended.php

Documentation is available at Extended.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.02 of the PHP license,      |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Author: Stijn de Reede <sjr@gmx.co.uk>                               |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: Extended.php,v 1.2 2005/10/14 07:05:49 arnaud Exp $
  20. //
  21.  
  22. /**
  23. @package  HTML_BBCodeParser
  24. @author   Stijn de Reede  <sjr@gmx.co.uk>
  25. */
  26.  
  27.  
  28. require_once('HTML/BBCodeParser.php');
  29.  
  30.  
  31.  
  32.  
  33. class HTML_BBCodeParser_Filter_Extended extends HTML_BBCodeParser
  34. {
  35.  
  36.     /**
  37.     * An array of tags parsed by the engine
  38.     *
  39.     * @access   private
  40.     * @var      array 
  41.     */
  42.     var $_definedTags = array(
  43.                                 'color' => array'htmlopen'  => 'span',
  44.                                                 'htmlclose' => 'span',
  45.                                                 'allowed'   => 'all',
  46.                                                 'attributes'=> array('color' =>'style=%2$scolor:%1$s%2$s')),
  47.                                 'size' => array'htmlopen'  => 'span',
  48.                                                 'htmlclose' => 'span',
  49.                                                 'allowed'   => 'all',
  50.                                                 'attributes'=> array('size' =>'style=%2$sfont-size:%1$spt%2$s')),
  51.                                 'font' => array'htmlopen'  => 'span',
  52.                                                 'htmlclose' => 'span',
  53.                                                 'allowed'   => 'all',
  54.                                                 'attributes'=> array('font' =>'style=%2$sfont-family:%1$s%2$s')),
  55.                                 'align' => array'htmlopen'  => 'div',
  56.                                                 'htmlclose' => 'div',
  57.                                                 'allowed'   => 'all',
  58.                                                 'attributes'=> array('align' =>'style=%2$stext-align:%1$s%2$s')),
  59.                                 'quote' => array('htmlopen'  => 'q',
  60.                                                 'htmlclose' => 'q',
  61.                                                 'allowed'   => 'all',
  62.                                                 'attributes'=> array('quote' =>'cite=%2$s%1$s%2$s')),
  63.                                 'code' => array('htmlopen'  => 'code',
  64.                                                 'htmlclose' => 'code',
  65.                                                 'allowed'   => 'all',
  66.                                                 'attributes'=> array()),
  67.                                 'h1' => array('htmlopen'  => 'h1',
  68.                                                 'htmlclose' => 'h1',
  69.                                                 'allowed'   => 'all',
  70.                                                 'attributes'=> array()),
  71.                                 'h2' => array('htmlopen'  => 'h2',
  72.                                                 'htmlclose' => 'h2',
  73.                                                 'allowed'   => 'all',
  74.                                                 'attributes'=> array()),
  75.                                 'h3' => array('htmlopen'  => 'h3',
  76.                                                 'htmlclose' => 'h3',
  77.                                                 'allowed'   => 'all',
  78.                                                 'attributes'=> array()),
  79.                                 'h4' => array('htmlopen'  => 'h4',
  80.                                                 'htmlclose' => 'h4',
  81.                                                 'allowed'   => 'all',
  82.                                                 'attributes'=> array()),
  83.                                 'h5' => array('htmlopen'  => 'h5',
  84.                                                 'htmlclose' => 'h5',
  85.                                                 'allowed'   => 'all',
  86.                                                 'attributes'=> array()),
  87.                                 'h6' => array('htmlopen'  => 'h6',
  88.                                                 'htmlclose' => 'h6',
  89.                                                 'allowed'   => 'all',
  90.                                                 'attributes'=> array())
  91.  
  92.     );
  93.  
  94.  
  95. }
  96.  
  97. ?>

Documentation generated on Tue, 05 Jun 2007 17:30:06 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.