BBCode Extension
| From: | Xavier De Cock | Date: | Fri, 27 Jul 2007 11:18:01 +0000 |
| Subject: | BBCode Extension | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-4825@lists.php.net to get a copy of this message | ||
Hello All, I'm here with a question, i had contacts with David MJ From
the PHPBB Group (He has the charge of working on their BBCode
Implementation). He has given me some ideas of enhancements. And I've
done a PHP implementation of all those ideas.
The new implementation is based on a tree algorithm and provide much
more flexibility (the system will also be able to automatically replace
the smileys. Furthermore incorrectly nested tags will give a visually
correct output, but with a valid BBCode
Example:
[b] Bold Text [u]Bold and underlined[/b] Underlined Only[/u]
Will output
<b> Bold Text <u>Bold and underlined</u></b><u> Underlined
Only</u>
Many behaviour are now configurable.
However, I would like to release the Pure PHP Fallback for this
extension (provided as attachment) and I think the best point to do this
is alongside the pecl extension.
So here are the main questions:
Is it possible to distribute a Pure PHP Fallback on PECL and what mean
should be considered the more efficient?
For the license, I'd like to use a double (triple) licensing (GPL / BSD
(/PHP )), GPL for include in GPLed Projects (such as PhpBB & so on), BSD
for my own closed sourced projects and PHP for release on PECL.
Have you any suggestions?
In advance, thanks to all
In attachment is the PHP implementation of the algorithm (I'm going to
translate it to C during the Week-end) and some test cases.
If you have any suggestion for speed improvement, unnecessary operations
or functionality just give them, it's a "Draft" and I'll be glad to
enhance it. (it has been bziped to pass under the 30k limitation of
qmail)
Attachment: [application/x-bzip] bbcode_test.php.bz2
Attachment: [application/x-bzip] bbcode_test.php.bz2