cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Anchor.php Blockquote.php Bold.php Box.php Break.php Center.php Code.php Colortext.php Deflist.php
Delimiter.php Embed.php Emphasis.php Freelink.php Function.php Heading.php Horiz.php Html.php Image.php Include.php Interwiki.php Italic.php List.php
Newline.php Page.php Paragraph.php Phplookup.php Plugin.php Prefilter.php Preformatted.php Raw.php Revise.php Specialchar.php Strong.php Subscript.php
Superscript.php Table.php Tighten.php Titlebar.php Toc.php Tt.php Underline.php Url.php Wikilink.php

From: Date: Sat, 30 Jul 2005 08:03:33 +0000
Subject: cvs: pear /Text_Wiki/Text/Wiki/Render/Xhtml Anchor.php Blockquote.php Bold.php Box.php Break.php Center.php Code.php Colortext.php Deflist.php
Delimiter.php Embed.php Emphasis.php Freelink.php Function.php Heading.php Horiz.php Html.php Image.php Include.php Interwiki.php Italic.php List.php
Newline.php Page.php Paragraph.php Phplookup.php Plugin.php Prefilter.php Preformatted.php Raw.php Revise.php Specialchar.php Strong.php Subscript.php
Superscript.php Table.php Tighten.php Titlebar.php Toc.php Tt.php Underline.php Url.php Wikilink.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33472@lists.php.net to get a copy of this message
toggg Sat Jul 30 04:03:33 2005 EDT Modified files: /pear/Text_Wiki/Text/Wiki/Render/Xhtml Anchor.php Blockquote.php Bold.php Box.php Break.php Center.php Code.php Colortext.php Deflist.php Delimiter.php Embed.php Emphasis.php Freelink.php Function.php Heading.php Horiz.php Html.php Image.php Include.php Interwiki.php Italic.php List.php Newline.php Page.php Paragraph.php Phplookup.php Plugin.php Prefilter.php Preformatted.php Raw.php Revise.php Specialchar.php Strong.php Subscript.php Superscript.php Table.php Tighten.php Titlebar.php Toc.php Tt.php Underline.php Url.php Wikilink.php Log: Headers ... ouf !

http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php?r1=1.8&r2=1.9&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php:1.8 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php:1.9 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php:1.8 Fri Jul 29 08:36:11 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Anchor.php Sat Jul 30 04:03:28 2005 @@ -1,37 +1,48 @@ <?php - +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* -* This class renders an anchor target name in XHTML. -* -* @author Manuel Holtgrewe <purestorm at ggnore dot net> -* -* @author Paul M. Jones <pmjones at ciaweb dot net> -* -* @package Text_Wiki -* -*/ + * Anchor rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Anchor.php,v 1.9 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders an anchor target name in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Anchor extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + function token($options) { extract($options); // $type, $name - + if ($type == 'start') { $css = $this->formatConf(' class="%s"', 'css'); $format = "<a$css id=\"%s\">"; return sprintf($format, htmlentities($name)); } - + if ($type == 'end') { return '</a>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Blockquote.php Sat Jul 30 04:03:28 2005 @@ -1,46 +1,69 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Blockquote rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Blockquote.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders a blockquote in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Blockquote extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $type = $options['type']; $level = $options['level']; - + // set up indenting so that the results look nice; we do this // in two steps to avoid str_pad mathematics. ;-) $pad = str_pad('', $level, "\t"); $pad = str_replace("\t", ' ', $pad); - + // pick the css type $css = $this->formatConf(' class="%s"', 'css'); - + // starting if ($type == 'start') { return "$pad<blockquote$css>"; } - + // ending if ($type == 'end') { return $pad . "</blockquote>\n"; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Bold.php Sat Jul 30 04:03:28 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Bold rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Bold.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders bold text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Bold extends Text_Wiki_Render { var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<b$css>"; } - + if ($options['type'] == 'end') { return '</b>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php:1.1 Fri Jul 29 08:38:34 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Box.php Sat Jul 30 04:03:28 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Box rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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 $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders a box drawn in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Box extends Text_Wiki_Render { var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<div class='simplebox'$css>"; } - + if ($options['type'] == 'end') { return '</div>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Break.php Sat Jul 30 04:03:28 2005 @@ -1,5 +1,28 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Break rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Break.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders line breaks in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Break extends Text_Wiki_Render { var $conf = array( @@ -7,18 +30,18 @@ ); /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $css = $this->formatConf(' class="%s"', 'css'); @@ -26,4 +49,4 @@ } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Center.php Sat Jul 30 04:03:28 2005 @@ -1,29 +1,52 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Center rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Center.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders centered content in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Center extends Text_Wiki_Render { /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { return '<div style="text-align: center;">'; } - + if ($options['type'] == 'end') { return '</div>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php?r1=1.11&r2=1.12&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.11 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.12 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php:1.11 Fri Jul 29 09:19:31 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Code.php Sat Jul 30 04:03:28 2005 @@ -1,5 +1,28 @@ <?php - +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Code rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Code.php,v 1.12 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class renders code blocks in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Code extends Text_Wiki_Render { var $conf = array( http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php?r1=1.5&r2=1.6&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php:1.5 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php:1.6 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php:1.5 Fri Jul 29 09:29:56 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Colortext.php Sat Jul 30 04:03:28 2005 @@ -1,7 +1,30 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Colortext rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Colortext.php,v 1.6 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders colored text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Colortext extends Text_Wiki_Render { - + var $colors = array( 'aqua', 'black', @@ -20,34 +43,34 @@ 'white', 'yellow' ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $type = $options['type']; $color = $options['color']; - + if (! in_array($color, $this->colors) && $color{0} != '#') { $color = '#' . $color; } - + if ($type == 'start') { return "<span style=\"color: $color;\">"; } - + if ($options['type'] == 'end') { return '</span>'; } http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php?r1=1.7&r2=1.8&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php:1.7 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php:1.8 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php:1.7 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Deflist.php Sat Jul 30 04:03:28 2005 @@ -1,64 +1,87 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Deflist rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Deflist.php,v 1.8 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders definition lists in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Deflist extends Text_Wiki_Render { - + var $conf = array( 'css_dl' => null, 'css_dt' => null, 'css_dd' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $type = $options['type']; $pad = " "; - + switch ($type) { - + case 'list_start': $css = $this->formatConf(' class="%s"', 'css_dl'); return "<dl$css>\n"; break; - + case 'list_end': return "</dl>\n\n"; break; - + case 'term_start': $css = $this->formatConf(' class="%s"', 'css_dt'); return $pad . "<dt$css>"; break; - + case 'term_end': return "</dt>\n"; break; - + case 'narr_start': $css = $this->formatConf(' class="%s"', 'css_dd'); return $pad . $pad . "<dd$css>"; break; - + case 'narr_end': return "</dd>\n"; break; - + default: return ''; - + } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php?r1=1.4&r2=1.5&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php:1.4 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php:1.5 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php:1.4 Tue Jul 20 11:53:01 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Delimiter.php Sat Jul 30 04:03:28 2005 @@ -1,23 +1,46 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Delimiter rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Delimiter.php,v 1.5 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class set back the replaced delimiters in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Delimiter extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return $options['text']; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Embed.php Sat Jul 30 04:03:28 2005 @@ -1,23 +1,46 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Embed rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Embed.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class replaces the embedded php output in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Embed extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return $options['text']; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Emphasis.php Sat Jul 30 04:03:28 2005 @@ -1,35 +1,58 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Emphasis rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Emphasis.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders emphasized text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Emphasis extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<em$css>"; } - + if ($options['type'] == 'end') { return '</em>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php:1.6 Sat Sep 18 22:56:27 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Freelink.php Sat Jul 30 04:03:28 2005 @@ -1,9 +1,35 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Freelink rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Freelink.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * The wikilink render class. + */ require_once 'Text/Wiki/Render/Xhtml/Wikilink.php'; +/** + * This class renders free links in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Freelink extends Text_Wiki_Render_Xhtml_Wikilink { // renders identically to wikilinks, only the parsing is different :-) } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php?r1=1.3&r2=1.4&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php:1.3 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php:1.4 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php:1.3 Fri Oct 8 13:46:47 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Function.php Sat Jul 30 04:03:28 2005 @@ -1,71 +1,92 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Function rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Function.php,v 1.4 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ -// $Id: Function.php,v 1.3 2004/10/08 17:46:47 pmjones Exp $ - +/** + * This class renders a function description in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Function extends Text_Wiki_Render { - + var $conf = array( // list separator for params and throws 'list_sep' => ', ', - + // the "main" format string 'format_main' => '%access %return <b>%name</b> ( %params ) %throws', - + // the looped format string for required params 'format_param' => '%type <i>%descr</i>', - + // the looped format string for params with default values 'format_paramd' => '[%type <i>%descr</i> default %default]', - + // the looped format string for throws 'format_throws' => '<b>throws</b> %type <i>%descr</i>' ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { extract($options); // name, access, return, params, throws - + // build the baseline output $output = $this->conf['format_main']; $output = str_replace('%access', htmlspecialchars($access), $output); $output = str_replace('%return', htmlspecialchars($return), $output); $output = str_replace('%name', htmlspecialchars($name), $output); - + // build the set of params $list = array(); foreach ($params as $key => $val) { - + // is there a default value? if ($val['default']) { $tmp = $this->conf['format_paramd']; } else { $tmp = $this->conf['format_param']; } - + // add the param elements $tmp = str_replace('%type', htmlspecialchars($val['type']), $tmp); $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp); $tmp = str_replace('%default', htmlspecialchars($val['default']), $tmp); $list[] = $tmp; } - + // insert params into output $tmp = implode($this->conf['list_sep'], $list); $output = str_replace('%params', $tmp, $output); - + // build the set of throws $list = array(); foreach ($throws as $key => $val) { @@ -74,14 +95,14 @@ $tmp = str_replace('%descr', htmlspecialchars($val['descr']), $tmp); $list[] = $tmp; } - + // insert throws into output $tmp = implode($this->conf['list_sep'], $list); $output = str_replace('%throws', $tmp, $output); - + // close the div and return the output $output .= '</div>'; return "\n$output\n\n"; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php?r1=1.8&r2=1.9&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php:1.8 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php:1.9 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php:1.8 Fri Jul 29 09:45:46 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Heading.php Sat Jul 30 04:03:28 2005 @@ -1,5 +1,28 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Heading rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Heading.php,v 1.9 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders headings in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Heading extends Text_Wiki_Render { var $conf = array( http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Horiz.php Sat Jul 30 04:03:28 2005 @@ -1,28 +1,51 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Horiz rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Horiz.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders an horizontal bar in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Horiz extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $css = $this->formatConf(' class="%s"', 'css'); return "<hr$css />\n"; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php?r1=1.4&r2=1.5&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php:1.4 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php:1.5 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php:1.4 Tue Jul 20 11:53:01 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Html.php Sat Jul 30 04:03:28 2005 @@ -1,24 +1,47 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Html rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Html.php,v 1.5 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders preformated html in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Html extends Text_Wiki_Render { - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return $options['text']; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php?r1=1.14&r2=1.15&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php:1.14 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php:1.15 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php:1.14 Mon Mar 7 08:25:18 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Image.php Sat Jul 30 04:03:28 2005 @@ -1,4 +1,28 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Image rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Image.php,v 1.15 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class inserts an image in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Image extends Text_Wiki_Render { var $conf = array( @@ -7,35 +31,35 @@ 'css' => null, 'css_link' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // note the image source $src = $options['src']; - + // is the source a local file or URL? if (strpos($src, '://') === false) { // the source refers to a local file. // add the URL base to it. $src = $this->getConf('base', '/') . $src; } - + // stephane@metacites.net - // is the image clickable? + // is the image clickable? if (isset($options['attr']['link'])) { // yes, the image is clickable. // are we linked to a URL or a wiki page? @@ -56,15 +80,15 @@ } // unset so it won't show up as an attribute unset($options['attr']['link']); - - // stephane@metacites.net -- 25/07/2004 + + // stephane@metacites.net -- 25/07/2004 // we make up an align="center" value for the <img> tag. if (isset($options['attr']['align']) && $options['attr']['align'] == 'center') { - + // unset so it won't show up as an attribute unset($options['attr']['align']); - + // make sure we have a style attribute if (! isset($options['attr']['style'])) { // no style, set up a blank one @@ -73,17 +97,17 @@ // style exists, add a space $options['attr']['style'] .= ' '; } - + // add a "center" style to the existing style. $options['attr']['style'] .= 'display: block; margin-left: auto; margin-right: auto;'; } - - // stephane@metacites.net -- 25/07/2004 + + // stephane@metacites.net -- 25/07/2004 // try to guess width and height if (! isset($options['attr']['width']) && ! isset($options['attr']['height'])) { - + // does the source refer to a local file or a URL? if (strpos($src,'://')) { // is a URL link @@ -96,52 +120,52 @@ // is a local file on absolute path. $imageFile = $_SERVER['DOCUMENT_ROOT'] . $src; } - + // attempt to get the image size $imageSize = @getimagesize($imageFile); - + if (is_array($imageSize)) { $options['attr']['width'] = $imageSize[0]; $options['attr']['height'] = $imageSize[1]; } - + } - + // start the HTML output $output = '<img src="' . htmlspecialchars($src) . '"'; - + // get the CSS class but don't add it yet $css = $this->formatConf(' class="%s"', 'css'); - + // add the attributes to the output, and be sure to // track whether or not we find an "alt" attribute $alt = false; foreach ($options['attr'] as $key => $val) { - + // track the 'alt' attribute if (strtolower($key) == 'alt') { $alt = true; } - + // the 'class' attribute overrides the CSS class conf if (strtolower($key) == 'class') { $css = null; } - + $key = htmlspecialchars($key); $val = htmlspecialchars($val); $output .= " $key=\"$val\""; } - + // always add an "alt" attribute per Stephane Solliec if (! $alt) { $alt = htmlspecialchars(basename($options['src'])); $output .= " alt=\"$alt\""; } - + // end the image tag with the automatic CSS class (if any) $output .= "$css />"; - + // was the image clickable? if ($href) { // yes, add the href and return @@ -149,8 +173,8 @@ $css = $this->formatConf(' class="%s"', 'css_link'); $output = "<a$css href=\"$href\">$output</a>"; } - + return $output; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php?r1=1.5&r2=1.6&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php:1.5 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php:1.6 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php:1.5 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Include.php Sat Jul 30 04:03:28 2005 @@ -1,8 +1,32 @@ <?php -class Text_Wiki_Render_Xhtml_Include extends Text_Wiki_Render { +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Include rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Include.php,v 1.6 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class renders included maekup in XHTML. (empty) + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ +class Text_Wiki_Render_Xhtml_Include extends Text_Wiki_Render { function token() { return ''; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php?r1=1.8&r2=1.9&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php:1.8 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php:1.9 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php:1.8 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Interwiki.php Sat Jul 30 04:03:28 2005 @@ -1,7 +1,30 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Interwiki rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Interwiki.php,v 1.9 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders inter wikis links in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render { - + var $conf = array( 'sites' => array( 'MeatBall' => 'http://www.usemod.com/cgi-bin/mb.pl?%s', @@ -11,34 +34,34 @@ 'target' => '_blank', 'css' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $site = $options['site']; $page = $options['page']; $text = $options['text']; $css = $this->formatConf(' class="%s"', 'css'); - + if (isset($this->conf['sites'][$site])) { $href = $this->conf['sites'][$site]; } else { return $text; } - + // old form where page is at end, // or new form with %s placeholder for sprintf()? if (strpos($href, '%s') === false) { @@ -48,14 +71,14 @@ // use the new form $href = sprintf($href, $page); } - + // allow for alternative targets $target = $this->getConf('target'); - + // build base link $text = htmlspecialchars($text); $output = "<a$css href=\"$href\""; - + // are we targeting a specific window? if ($target) { // this is XHTML compliant, suggested by Aaron Kalin. @@ -65,10 +88,10 @@ $output .= " onClick=\"window.open(this.href, '$target');"; $output .= " return false;\""; } - + $output .= ">$text</a>"; - + return $output; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Italic.php Sat Jul 30 04:03:28 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Italic rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Italic.php,v 1.7 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders italic text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Italic extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<i$css>"; } - + if ($options['type'] == 'end') { return '</i>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php?r1=1.7&r2=1.8&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php:1.7 pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php:1.8 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php:1.7 Sat May 28 17:17:32 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/List.php Sat Jul 30 04:03:28 2005 @@ -1,49 +1,71 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * List rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: List.php,v 1.8 2005/07/30 08:03:28 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ - +/** + * This class renders bullet and ordered lists in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_List extends Text_Wiki_Render { - + var $conf = array( 'css_ol' => null, 'css_ol_li' => null, 'css_ul' => null, 'css_ul_li' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * This rendering method is syntactically and semantically compliant * with XHTML 1.1 in that sub-lists are part of the previous list item. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // make nice variables (type, level, count) extract($options); - + // set up indenting so that the results look nice; we do this // in two steps to avoid str_pad mathematics. ;-) $pad = str_pad('', $level, "\t"); $pad = str_replace("\t", ' ', $pad); - + switch ($type) { - + case 'bullet_list_start': - + // build the base HTML $css = $this->formatConf(' class="%s"', 'css_ul'); $html = "<ul$css>"; - + /* // if this is the opening block for the list, // put an extra newline in front of it so the @@ -52,33 +74,33 @@ $html = "\n$html"; } */ - + // done! return $html; break; - + case 'bullet_list_end': - + // build the base HTML $html = "</li>\n$pad</ul>"; - + // if this is the closing block for the list, // put extra newlines after it so the output // looks nice. if ($level == 0) { $html .= "\n\n"; } - + // done! return $html; break; - + case 'number_list_start': - + // build the base HTML $css = $this->formatConf(' class="%s"', 'css_ol'); $html = "<ol$css>"; - + /* // if this is the opening block for the list, // put an extra newline in front of it so the @@ -87,51 +109,51 @@ $html = "\n$html"; } */ - + // done! return $html; break; - + case 'number_list_end': - + // build the base HTML $html = "</li>\n$pad</ol>"; - + // if this is the closing block for the list, // put extra newlines after it so the output // looks nice. if ($level == 0) { $html .= "\n\n"; } - + // done! return $html; break; - + case 'bullet_item_start': case 'number_item_start': - + // pick the proper CSS class if ($type == 'bullet_item_start') { $css = $this->formatConf(' class="%s"', 'css_ul_li'); } else { $css = $this->formatConf(' class="%s"', 'css_ol_li'); } - + // build the base HTML $html = "\n$pad<li$css>"; - + // for the very first item in the list, do nothing. // but for additional items, be sure to close the // previous item. if ($count > 0) { $html = "</li>$html"; } - + // done! return $html; break; - + case 'bullet_item_end': case 'number_item_end': default: @@ -143,4 +165,4 @@ } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php?r1=1.4&r2=1.5&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php:1.4 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php:1.5 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php:1.4 Tue Jul 20 11:53:01 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Newline.php Sat Jul 30 04:03:29 2005 @@ -1,12 +1,35 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Newline rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Newline.php,v 1.5 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders new lines in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Newline extends Text_Wiki_Render { - - + + function token($options) { return "<br />\n"; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php:1.1 Fri Jul 29 09:56:30 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Page.php Sat Jul 30 04:03:29 2005 @@ -1,23 +1,46 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Page rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Page.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders page markers in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Page extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return 'PAGE MARKER HERE*&^%$#^$%*PAGEMARKERHERE'; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Paragraph.php Sat Jul 30 04:03:29 2005 @@ -1,36 +1,59 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Paragraph rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Paragraph.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders paragraphs in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Paragraph extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { extract($options); //type - + if ($type == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<p$css>"; } - + if ($type == 'end') { return "</p>\n\n"; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php?r1=1.7&r2=1.8&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php:1.7 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php:1.8 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php:1.7 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Phplookup.php Sat Jul 30 04:03:29 2005 @@ -1,36 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Phplookup rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Phplookup.php,v 1.8 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ -// $Id: Phplookup.php,v 1.7 2004/09/25 19:05:14 pmjones Exp $ - +/** + * This class renders a link to php functions description in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Phplookup extends Text_Wiki_Render { - + var $conf = array( 'target' => '_blank', 'css' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { $text = trim($options['text']); $css = $this->formatConf(' class="%s"', 'css'); - + // start the html $output = "<a$css"; - + // are we targeting another window? $target = $this->getConf('target', ''); if ($target) { @@ -40,20 +61,20 @@ $output .= " onclick=\"window.open(this.href, '$target');"; $output .= " return false;\""; } - + // take off the final parens for functions if (substr($text, -2) == '()') { $q = substr($text, 0, -2); } else { $q = $text; } - + $q = htmlspecialchars($q); $text = htmlspecialchars($text); - + // finish and return $output .= " href=\"http://php.net/$q\">$text</a>"; return $output; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php:1.1 Thu Jul 28 07:23:38 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Plugin.php Sat Jul 30 04:03:29 2005 @@ -1,4 +1,28 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Plugin rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Plugin.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class renders wiki plugins in XHTML. (empty) + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Plugin extends Text_Wiki_Render { /** http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php:1.6 Tue Feb 22 14:12:58 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Prefilter.php Sat Jul 30 04:03:29 2005 @@ -1,40 +1,34 @@ <?php -/* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2003 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 2.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Paul M. Jones <pmjones@php.net> | -// +----------------------------------------------------------------------+ -// -// $Id: Prefilter.php,v 1.6 2005/02/22 19:12:58 pmjones Exp $ - - +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /** -* -* This class implements a Text_Wiki_Render_Xhtml to "pre-filter" source text so -* that line endings are consistently \n, lines ending in a backslash \ -* are concatenated with the next line, and tabs are converted to spaces. -* -* @author Paul M. Jones <pmjones@php.net> -* -* @package Text_Wiki -* -*/ + * Prefilter rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Prefilter.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class implements a Text_Wiki_Render_Xhtml to "pre-filter" source text so + * that line endings are consistently \n, lines ending in a backslash \ + * are concatenated with the next line, and tabs are converted to spaces. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Prefilter extends Text_Wiki_Render { function token() { return ''; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php:1.1 Fri Jul 29 09:56:29 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Preformatted.php Sat Jul 30 04:03:29 2005 @@ -1,23 +1,46 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Preformatted rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Preformatted.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders preformated text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Preformatted extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return '<pre>'.$options['text'].'</pre>'; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php?r1=1.4&r2=1.5&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php:1.4 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php:1.5 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php:1.4 Tue Jul 20 11:53:01 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Raw.php Sat Jul 30 04:03:29 2005 @@ -1,23 +1,46 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Raw rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Raw.php,v 1.5 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders not processed blocks in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Raw extends Text_Wiki_Render { - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { return $options['text']; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Revise.php Sat Jul 30 04:03:29 2005 @@ -1,45 +1,68 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Revise rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Revise.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders revision marks in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Revise extends Text_Wiki_Render { - + var $conf = array( 'css_ins' => null, 'css_del' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'del_start') { $css = $this->formatConf(' class="%s"', 'css_del'); return "<del$css>"; } - + if ($options['type'] == 'del_end') { return "</del>"; } - + if ($options['type'] == 'ins_start') { $css = $this->formatConf(' class="%s"', 'css_ins'); return "<ins$css>"; } - + if ($options['type'] == 'ins_end') { return "</ins>"; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php:1.1 Fri Jul 29 09:56:29 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Specialchar.php Sat Jul 30 04:03:29 2005 @@ -1,5 +1,28 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Specialchar rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Specialchar.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders special characters in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_SpecialChar extends Text_Wiki_Render { var $types = array('~bs~' => '&#92;', @@ -15,7 +38,7 @@ '&quot; -- &quot;' => '&mdash;', '~lt~' => '&lt;', '~gt~' => '&gt;'); - + function token($options) { if (isset($this->types[$options['char']])) { @@ -26,4 +49,4 @@ } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Strong.php Sat Jul 30 04:03:29 2005 @@ -1,35 +1,58 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Strong rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Strong.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders text marked as strong in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Strong extends Text_Wiki_Render { - - + + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<strong$css>"; } - + if ($options['type'] == 'end') { return '</strong>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php:1.1 Thu Feb 24 12:25:50 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Subscript.php Sat Jul 30 04:03:29 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Subscript rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Subscript.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders subscript text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Subscript extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<sub$css>"; } - + if ($options['type'] == 'end') { return '</sub>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Superscript.php Sat Jul 30 04:03:29 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Superscript rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Superscript.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders superscript text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Superscript extends Text_Wiki_Render { - + var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<sup$css>"; } - + if ($options['type'] == 'end') { return '</sup>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php?r1=1.7&r2=1.8&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php:1.7 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php:1.8 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php:1.7 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Table.php Sat Jul 30 04:03:29 2005 @@ -1,60 +1,83 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Table rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Table.php,v 1.8 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders tables in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Table extends Text_Wiki_Render { - + var $conf = array( 'css_table' => null, 'css_tr' => null, 'css_th' => null, 'css_td' => null ); - - + + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // make nice variable names (type, attr, span) extract($options); - + $pad = ' '; - + switch ($type) { - + case 'table_start': $css = $this->formatConf(' class="%s"', 'css_table'); return "\n\n<table$css>\n"; break; - + case 'table_end': return "</table>\n\n"; break; - + case 'row_start': $css = $this->formatConf(' class="%s"', 'css_tr'); return "$pad<tr$css>\n"; break; - + case 'row_end': return "$pad</tr>\n"; break; - + case 'cell_start': - + // base html $html = $pad . $pad; - + // is this a TH or TD cell? if ($attr == 'header') { // start a header cell @@ -65,22 +88,22 @@ $css = $this->formatConf(' class="%s"', 'css_td'); $html .= "<td$css"; } - + // add the column span if ($span > 1) { $html .= " colspan=\"$span\""; } - + // add alignment if ($attr != 'header' && $attr != '') { $html .= " style=\"text-align: $attr;\""; } - + // done! $html .= '>'; return $html; break; - + case 'cell_end': if ($attr == 'header') { return "</th>\n"; @@ -88,11 +111,11 @@ return "</td>\n"; } break; - + default: return ''; - + } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php?r1=1.5&r2=1.6&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php:1.5 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php:1.6 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php:1.5 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tighten.php Sat Jul 30 04:03:29 2005 @@ -1,10 +1,34 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Tighten rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Tighten.php,v 1.6 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class makes the tightening in XHTML. (empty) + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Tighten extends Text_Wiki_Render { - - + + function token() { return ''; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php:1.1 Fri Jul 29 09:56:30 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Titlebar.php Sat Jul 30 04:03:29 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Titlebar rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Titlebar.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders a title bar in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Titlebar extends Text_Wiki_Render { var $conf = array( 'css' => 'titlebar' ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<div$css>"; } - + if ($options['type'] == 'end') { return '</div>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php?r1=1.8&r2=1.9&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php:1.8 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php:1.9 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php:1.8 Sat May 28 17:30:33 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Toc.php Sat Jul 30 04:03:29 2005 @@ -1,9 +1,30 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Toc rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Toc.php,v 1.9 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ -// $Id: Toc.php,v 1.8 2005/05/28 21:30:33 pmjones Exp $ - +/** + * This class inserts a table of content in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render { - + var $conf = array( 'css_list' => null, 'css_item' => null, @@ -11,57 +32,57 @@ 'div_id' => 'toc', 'collapse' => true ); - + var $min = 2; - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // type, id, level, count, attr extract($options); - + switch ($type) { - + case 'list_start': - + $css = $this->getConf('css_list'); $html = ''; - + // collapse div within a table? if ($this->getConf('collapse')) { $html .= '<table border="0" cellspacing="0" cellpadding="0">'; $html .= "<tr><td>\n"; } - + // add the div, class, and id $html .= '<div'; if ($css) { $html .= " class=\"$css\""; } - + $div_id = $this->getConf('div_id'); if ($div_id) { $html .= " id=\"$div_id\""; } - + // add the title, and done $html .= '>'; $html .= $this->getConf('title'); return $html; break; - + case 'list_end': if ($this->getConf('collapse')) { return "\n</div>\n</td></tr></table>\n\n"; @@ -69,26 +90,26 @@ return "\n</div>\n\n"; } break; - + case 'item_start': $html = "\n\t<div"; - + $css = $this->getConf('css_item'); if ($css) { $html .= " class=\"$css\""; } - + $pad = ($level - $this->min); $html .= " style=\"margin-left: {$pad}em;\">"; - + $html .= "<a href=\"#$id\">"; return $html; break; - + case 'item_end': return "</a></div>"; break; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php?r1=1.6&r2=1.7&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php:1.6 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php:1.7 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php:1.6 Sat Sep 25 15:05:14 2004 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Tt.php Sat Jul 30 04:03:29 2005 @@ -1,35 +1,58 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Tt rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Tt.php,v 1.7 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ + +/** + * This class renders monospaced text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ +class Text_Wiki_Render_Xhtml_Tt extends Text_Wiki_Render { + -class Text_Wiki_Render_Xhtml_tt extends Text_Wiki_Render { - - var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<tt$css>"; } - + if ($options['type'] == 'end') { return '</tt>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php?r1=1.1&r2=1.2&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php:1.1 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php:1.2 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php:1.1 Sun Jul 10 16:40:20 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Underline.php Sat Jul 30 04:03:29 2005 @@ -1,34 +1,57 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Underline rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Underline.php,v 1.2 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders underlined text in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Underline extends Text_Wiki_Render { var $conf = array( 'css' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { if ($options['type'] == 'start') { $css = $this->formatConf(' class="%s"', 'css'); return "<u$css>"; } - + if ($options['type'] == 'end') { return '</u>'; } } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php?r1=1.11&r2=1.12&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.11 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.12 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php:1.11 Sun Feb 13 21:12:15 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Url.php Sat Jul 30 04:03:29 2005 @@ -1,9 +1,31 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Url rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Url.php,v 1.12 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ - +/** + * This class renders URL links in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render { - - + + var $conf = array( 'target' => '_blank', 'images' => true, @@ -13,48 +35,48 @@ 'css_descr' => null, 'css_img' => null ); - + /** - * + * * Renders a token into text matching the requested format. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // create local variables from the options array (text, // href, type) extract($options); - + // find the rightmost dot and determine the filename // extension. $pos = strrpos($href, '.'); $ext = strtolower(substr($href, $pos + 1)); $href = htmlspecialchars($href); - + // does the filename extension indicate an image file? if ($this->getConf('images') && in_array($ext, $this->getConf('img_ext', array()))) { - + // create alt text for the image if (! isset($text) || $text == '') { $text = basename($href); $text = htmlspecialchars($text); } - + // generate an image tag $css = $this->formatConf(' class="%s"', 'css_img'); $output = "<img$css src=\"$href\" alt=\"$text\" />"; - + } else { - + // should we build a target clause? if ($href{0} == '#' || strtolower(substr($href, 0, 7)) == 'mailto:') { @@ -65,12 +87,12 @@ // allow targets on non-anchor non-mailto links $target = $this->getConf('target'); } - + // generate a regular link (not an image) $text = htmlspecialchars($text); $css = $this->formatConf(' class="%s"', "css_$type"); $output = "<a$css href=\"$href\""; - + if ($target) { // use a "popup" window. this is XHTML compliant, suggested by // Aaron Kalin. uses the $target as the new window name. @@ -78,18 +100,18 @@ $output .= " onclick=\"window.open(this.href, '$target');"; $output .= " return false;\""; } - + // finish up output $output .= ">$text</a>"; - + // make numbered references look like footnotes when no // CSS class specified, make them superscript by default if ($type == 'footnote' && ! $css) { $output = '<sup>' . $output . '</sup>'; } } - + return $output; } } -?> \ No newline at end of file +?> http://cvs.php.net/diff.php/pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php?r1=1.9&r2=1.10&ty=u Index: pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php diff -u pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php:1.9 pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php:1.10 --- pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php:1.9 Sat Jan 29 17:38:07 2005 +++ pear/Text_Wiki/Text/Wiki/Render/Xhtml/Wikilink.php Sat Jul 30 04:03:29 2005 @@ -1,7 +1,30 @@ <?php +// vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +/** + * Wikilink rule end renderer for Xhtml + * + * PHP versions 4 and 5 + * + * @category Text + * @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: Wikilink.php,v 1.10 2005/07/30 08:03:29 toggg Exp $ + * @link http://pear.php.net/package/Text_Wiki + */ +/** + * This class renders wiki links in XHTML. + * + * @category Text + * @package Text_Wiki + * @author Paul M. Jones <pmjones@php.net> + * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * @version Release: @package_version@ + * @link http://pear.php.net/package/Text_Wiki + */ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render { - + var $conf = array( 'pages' => array(), // set to null or false to turn off page checks 'view_url' => 'http://example.com/index.php?page=%s', @@ -12,26 +35,26 @@ 'css_new' => null, 'exists_callback' => null // call_user_func() callback ); - - + + /** - * + * * Renders a token into XHTML. - * + * * @access public - * + * * @param array $options The "options" portion of the token (second * element). - * + * * @return string The text rendered from the token options. - * + * */ - + function token($options) { // make nice variable names (page, anchor, text) extract($options); - + // is there a "page existence" callback? // we need to access it directly instead of through // getConf() because we'll need a reference (for @@ -41,7 +64,7 @@ } else { $callback = false; } - + if ($callback) { // use the callback function $exists = call_user_func($callback, $page); @@ -56,24 +79,24 @@ $exists = true; } } - + // convert *after* checking against page names so as not to mess // up what the user typed and what we're checking. $page = htmlspecialchars($page); $anchor = htmlspecialchars($anchor); $text = htmlspecialchars($text); - + // does the page exist? if ($exists) { - + // PAGE EXISTS. - + // link to the page view, but we have to build // the HREF. we support both the old form where // the page always comes at the end, and the new // form that uses %s for sprintf() $href = $this->getConf('view_url'); - + if (strpos($href, '%s') === false) { // use the old form (page-at-end) $href = $href . $page . $anchor; @@ -81,26 +104,26 @@ // use the new form (sprintf format string) $href = sprintf($href, $page . $anchor); } - + // get the CSS class and generate output $css = $this->formatConf(' class="%s"', 'css'); $output = "<a$css href=\"$href\">$text</a>"; - + } else { - + // PAGE DOES NOT EXIST. - + // link to a create-page url, but only if new_url is set $href = $this->getConf('new_url', null); - + // set the proper HREF if (! $href || trim($href) == '') { - + // no useful href, return the text as it is $output = $text; - + } else { - + // yes, link to the new-page href, but we have to build // it. we support both the old form where // the page always comes at the end, and the new @@ -113,11 +136,11 @@ $href = sprintf($href, $page); } } - + // get the appropriate CSS class and new-link text $css = $this->formatConf(' class="%s"', 'css_new'); $new = $this->getConf('new_text'); - + // what kind of linking are we doing? $pos = $this->getConf('new_text_pos'); if (! $pos || ! $new) { @@ -134,4 +157,4 @@ return $output; } } -?> \ No newline at end of file +?>
« previous php.pear.cvs (#33472) next »