6.0.0-git
2019-03-20

[#7285] Proposal for new Horde_Text_BBCode package
Summary Proposal for new Horde_Text_BBCode package
Queue Horde Framework Packages
Queue Version HEAD
Type Enhancement
State No Feedback
Priority 1. Low
Owners
Requester webmaster (at) dasourcerer (dot) net
Created 2008-09-05 (3848 days ago)
Due
Updated 2008-12-21 (3741 days ago)
Assigned
Resolved 2008-12-14 (3748 days ago)
Milestone
Patch Yes

History
2008-12-21 19:06:47 webmaster (at) dasourcerer (dot) net Comment #3 Reply to this comment
Hello there,



Sorry for the long delay, I am terrible at responding atm. The package 
itself isn't dead. It's rather stalled for the moment as we are 
currently overhauling our forum enigne completely. Part of this is 
moving away from the "let's concatenate strings and hope everything 
validates in the end" in favour of a more sane "use dom xml from the 
very beginning" aproach. This will also effect the BBCode parser.



As for Horde_Image: It has been one of the design goals of this 
package to provide everything it needs itself, if necessary. This will 
most likely change as well. My current plan is to make the image 
processing part entirely optional (as in: This feature will be 
available if certain external packages are available). The feature set 
won't change much. One fo the last feedbacks I received concerned 
routing external links through anonymizers as anonym.to, which would 
be a cool feature IMHO.



PHPUnit is part of our new set of build tools (as is Phing), so you 
can expect a lot of PHPUnit tests as well. All in all, I'd say there 
won't be a new version before February (likely close to March).
2008-12-14 15:49:17 Chuck Hagenbuch State ⇒ No Feedback
 
2008-11-07 04:17:04 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Any progress on those phpunit tests? Or are you waiting for specific feedback?



Also, why did you decide to write all of this image infrastructure 
instead of using Horde_Image?
2008-09-05 01:04:33 webmaster (at) dasourcerer (dot) net Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Proposal for new Horde_Text_BBCode package
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: Horde_Text_BBCode.zip Download
Reply to this comment
Hello,



a few moths ago  announced I were writing on a new tree based BBCode 
parser with

focus on XHTML 1.0. I also thought it were a great replacement for the current

Text_Filter_BBCode package. After much thought though, I decided to 
leave the new

parser out of Text_Filter as it isn't really stackable. This parser 
has been written to be

widely self sustainable (which means it only requires PHP5 and PCRE to 
run). This

also means it isn't really stackable with other packages out of 
Text_Filter. The only sane thing to do were probably to stack the XSS 
filter on top of it...



Some of the parsers features are:

  - Configurable set of supported tags (all tags can still be 
registered at once very easy)

  - Good recognition of free standing links

  - The parser makes a difference between BBCode instructions, text 
and links which

    means only things that are meant to be replaced will be replaced

  - No links within links will be created

  - Thumbnail creation for the [img] tag is available

  - Syntax highlighting for the [code] tag is available

  - automagic closing of unclosed tags

  - Correction of incorrectly nested BBCode instructions



The known or suspected issues so far are:

  - If multiple nested BBCode instructions are closed in the wrong 
order, the closing

    instructions might be displayed. Everything is nested correctly at 
(X)HTML level

    though. So this is just slightly annoying.

  - Lists tend to be a bit pesky at times. it might be possible to 
trick the parser into

    generating invalid XHTML.

  - There might be some issues with UTF-16 characters. UTF-8/BMP chars are fine

    so far. I just haven#t tested this yet



Future features might be:

  - Keyword highlighting

  - XHTML 1.0 Strict compliance

    XHTML 1.1 is out of the scope as this would make it very hard to 
place images

    within links, which is a very popular feature...

  - A notification interface

    The parser is very robust... and silent atm. If something fails 
somewhere, the parser

    will take care of it on its own and will silently use fallback 
routines or default

    settings. While this is great for stability, it is a royal pain to 
figure out why a certain

    setting is having no effect at all because the parser figured 
somethign were wrong



So, my own feeling is that the code has reached beta quality and I am 
going to use it

in production soon. I think it were a great addition to Horde 4 / 
Agora as it does a lot

of things differently than other parsers and is still quite efficient 
(e.g. it outperforms

PEAR::Text_Wiki_BBCode in terms of speed and memory usage).



A few, final words regarding the attached archive:

  - There is a set of phpDoc generated documentation. I included it 
for convenience

    as phpDoc seems to have some issues with the tutorial.

  - There are currently no tests for this package. As I started it, I 
had a bunch of .phpt

    tests. But the interface has changed a lot since then so I decided 
writing new tests

    using PHPUnit now.

  - The provided interactive example is a bit buggy, so do not take it 
as a measurement

    for the maturity of the code. (Specifically this fails for all 
settings that are controlled

    by a checkbox. And yes, it is as silly as it sounds).



Well then, have fun :)

Saved Queries