void Tue Jul 24 12:13:12 2007 UTC Added files: /phpdoc/en/reference/bbcode .cvsignore configure.xml constants.xml reference.xml /phpdoc/en/reference/bbcode/functions bbcode-add-element.xml bbcode-create.xml bbcode-destroy.xml bbcode-parse.xml Log: make test_xml && make html were successfull, commiting bbcode documentation to CVS * Hope i didn't make too many mistakes :/ *
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/.cvsignore?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/.cvsignore +++ phpdoc/en/reference/bbcode/.cvsignore functions.xml
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/configure.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/configure.xml +++ phpdoc/en/reference/bbcode/configure.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <section xml:id="bbcode.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> &reftitle.install; <para> &pecl.info; <link xlink:href="&url.pecl.package;fileinfo">&url.pecl.package;bbcode</link> </para> </section> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/constants.xml +++ phpdoc/en/reference/bbcode/constants.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <section xml:id="bbcode.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> <varlistentry> <term> <constant>BBCODE_TYPE_NOARG</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag does not accept arguments. </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_TYPE_SINGLE</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag does not have corresponding close tag. </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_TYPE_ARG</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag need an argument. </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_TYPE_OPTARG</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag accepts an optional argument. </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_TYPE_ROOT</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag is the special tag root (nesting level 0). </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_FLAGS_ARG_PARSING</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode tag require argument subparsing (the argument is reparsed by the BBCode extension). </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>BBCODE_FLAGS_CDATA_NOT_ALLOWED</constant> (<type>integer</type>) </term> <listitem> <simpara> This BBCode Tag does not accept content (it voids it automaticaly). </simpara> </listitem> </varlistentry> </variablelist> </section> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/reference.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/reference.xml +++ phpdoc/en/reference/bbcode/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- Membership: external, pecl --> <reference xml:id="ref.bbcode" xmlns="http://docbook.org/ns/docbook"> <title>BBCode Functions</title> <titleabbrev>BBCode</titleabbrev> <partintro> <section xml:id="bbcode.intro"> &reftitle.intro; <para> The functions of this extensions are aimed to help parse BBCode text in order to convert it to HTML or another markup / markdown langage. It uses a one pass parsing and provides great speed improvement over the common approach based on regular expressions. Further more, it helps provide valid HTML by reordering open / close tags and closing automaticaly unclosed tags. </para> </section> <!-- Information found in configure.xml --> &reference.bbcode.configure; <section xml:id="bbcode.configuration"> &reftitle.runtime; &no.config; </section> <section xml:id="bbcode.resources"> &reftitle.resources; <para> There is one resource used in BBCode extension: a BBCode_Container returned by <function>bbcode_create</function>. </para> </section> <!-- Information found in constants.xml --> &reference.bbcode.constants; </partintro> &reference.bbcode.functions; </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/functions/bbcode-add-element.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/functions/bbcode-add-element.xml +++ phpdoc/en/reference/bbcode/functions/bbcode-add-element.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.bbcode-add-element" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bbcode_add_element</refname> <refpurpose>Close fileinfo resource</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>bbcode_add_element</methodname> <methodparam><type>resource</type><parameter>bbcode_container</parameter></methodparam> <methodparam><type>string</type><parameter>tag_name</parameter></methodparam> <methodparam><type>array</type><parameter>tag_rules</parameter></methodparam> </methodsynopsis> <para> This function adds a tag to an existing BBCode_Container tag_set see <function>bbcode_create</function> for the format needed for tag_rules </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>bbcode_container</parameter></term> <listitem> <para> BBCode_Container resource returned by <function>bbcode_create</function>. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>tag_name</parameter></term> <listitem> <para> The new tag to add to the BBCode_Container tag set. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>tag_rules</parameter></term> <listitem> <para> An associative array containing the parsing rules see <function>bbcode_create</function> for the keys availables </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/functions/bbcode-create.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/functions/bbcode-create.xml +++ phpdoc/en/reference/bbcode/functions/bbcode-create.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.bbcode-create" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bbcode_create</refname> <refpurpose>Create a BBCode Ressource</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <methodparam choice="opt"><type>array</type><parameter>bbcode_initial_tags</parameter></methodparam> </methodsynopsis> <para> This function starts a new BBCode Ressource used to pars BBCode strings </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>bbcode_initial_tags</parameter></term> <listitem> <para> It's an associative array containing tag name as keys and parameters needed to correctly parse BBCode as value in an associative array of the form: <itemizedlist> <listitem> <simpara> <varname remap="structfield">flags</varname> optional - a flag set based on the BBCODE_FLAGS_* constants. </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">type</varname> needed - an int indicating the type of tag use the BBCODE_TYPE_* constants </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">open_tag</varname> needed - the HTML replacement for the open tag. </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">close_tag</varname> needed - the HTML replacement for the close tag. </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">default_arg</varname> optional - it gives the default argument if tag_type is of type OPTARG </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">content_handling</varname> optional - Gives the name of the function used as callback for modification of the content - currently only supports functions not methods. callback layout is: function name($content,$argument){return $content;} </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">param_handling</varname> optional - Gives the name of the function used as callback for modification of the argument - currently only supports functions not methods. callback layout is: function name($content,$argument){return $parameter;} </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">childs</varname> optional - List of accepted childs for the tag. The format of the list is a comma separated string. If the list starts with ! it will be the list of rejected childs for the tag. </simpara> </listitem> <listitem> <simpara> <varname remap="structfield">parent</varname> optional - List of accepted childs for the tag. The format of the list is a comma separated string. </simpara> </listitem> </itemizedlist> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> Returns a BBCode_Container </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title><function>bbcode_create</function> example</title> <programlisting role="php"> <![CDATA[ <?php $arrayBBCode=array( ''=> array('type'=>BBCODE_TYPE_ROOT, 'childs'=>'!i'), 'i'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<i>', 'close_tag'=>'</i>', 'childs'=>'b'), 'url'=> array('type'=>BBCODE_TYPE_OPTARG, 'open_tag'=>'<a href="{PARAM}">', 'close_tag'=>'</a>', 'default_arg'=>'{CONTENT}' 'childs'=>'bi'), 'img'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<img src="', 'close_tag'=>'" />', 'childs'=>''), 'b'=> array('type'=>BBCODE_TYPE_NOARG, 'open_tag'=>'<b>', 'close_tag'=>'</b>'), ); $text=<<<EOF [b]Bold Text[/b] [i]Italic Text[/i] [url]http://www.php.net/[/url] [url=http://pecl.php.net/][b]Content Text[/b][/url] [img]http://static.php.net/www.php.net/images/php.gif[/img] [url=http://www.php.net/] [img]http://static.php.net/www.php.net/images/php.gif[/img] [/url] EOF; $BBHandler=bbcode_create($arrayBBCode); echo bbcode_parse($BBHandler,$text); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ <b>Bold Text</b> <i>Italic Text</i> <a href="http://www.php.net/">http://www.php.net/</a> <a href="http://pecl.php.net/"><b>Content Text</b></a> <img src="http://static.php.net/www.php.net/images/php.gif" /> <a href="http://www.php.net/"> [img]http://static.php.net/www.php.net/images/php.gif[/img] </a> ]]> </screen> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/functions/bbcode-destroy.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/functions/bbcode-destroy.xml +++ phpdoc/en/reference/bbcode/functions/bbcode-destroy.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.bbcode-destroy" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bbcode_destroy</refname> <refpurpose>Close BBCode_container resource</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>finfo_close</methodname> <methodparam><type>resource</type><parameter>bbcode_container</parameter></methodparam> </methodsynopsis> <para> This function closes the resource opened by <function>bbcode_create</function>. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>bbcode</parameter></term> <listitem> <para> BBCode_Container resource returned by <function>bbcode_create</function>. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/bbcode/functions/bbcode-parse.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/bbcode/functions/bbcode-parse.xml +++ phpdoc/en/reference/bbcode/functions/bbcode-parse.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="function.bbcode_parse" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bbcode_parse</refname> <refpurpose>Parse a string following a given rule set</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>bbcode_parse</methodname> <methodparam><type>resource</type><parameter>bbcode_container</parameter></methodparam> <methodparam><type>string</type><parameter>to_parse</parameter></methodparam> </methodsynopsis> <para> This function parse the string to_parse following the rules in the bbcode_container created by bbcode_create </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>bbcode_container</parameter></term> <listitem> <para> BBCode_Container resource returned by <function>bbcode_create</function>. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>to_parse</parameter></term> <listitem> <para> The string we need to parse. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->