Re: cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Box.php
| From: | bertrand Gugger | Date: | Sun, 04 Mar 2007 20:02:59 +0000 |
| Subject: | Re: cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Box.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-44951@lists.php.net to get a copy of this message | ||
Hello Michele,
It's not necessary to break BC to introduce this option.
Before it, if their was a class xxx in $this-> conf, then result was the double class simplebox + xxx
Now it will be only xxx ...
--
toggg
Michele Tomaiuolo wrote:
mic Sat Mar 3 23:00:54 2007 UTCModified files: /pear/Text_Wiki/Text/Wiki/Render/Xhtml Box.php Log:allows specifying class in options http://cvs.php.net/viewvc.cgi/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php?r1=1.2&r2=1.3&diff_format=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.2 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.3 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.2 Sat Jul 30 08:03:28 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php Sat Mar 3 23:00:54 2007 @@ -9,7 +9,7 @@* @package Text_Wiki * @author Paul M. Jones <pmjones@php.net> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: Box.php,v 1.2 2005/07/30 08:03:28 toggg Exp $ + * @version CVS: $Id: Box.php,v 1.3 2007/03/03 23:00:54 mic Exp $ * @link http://pear.php.net/package/Text_Wiki*/ @@ -26,7 +26,7 @@ class Text_Wiki_Render_Xhtml_Box extends Text_Wiki_Render {var $conf = array( - 'css' => null + 'css' => 'simplebox' ); /**@@ -45,8 +45,13 @@function token($options) { if ($options['type'] == 'start') { - $css = $this->formatConf(' class="%s"', 'css'); - return "<div class='simplebox'$css>"; + if ($options['css']) { + $css = ' class="' . $options['css']. '"'; + } + else { + $css = $this->formatConf(' class="%s"', 'css'); + } + return "<div $css>"; } if ($options['type'] == 'end') {