Skip to end of metadata
Go to start of metadata

Zend Framework: Zend_Filter_Bbcode Component Proposal

Proposed Component Name Zend_Filter_Bbcode
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Filter_Bbcode
Proposers Van Belle Jonathan
Ralph Schindler, Zend liaison
Revision 1.0 - 22 Augustus 2007 : first proposal (wiki revision: 8)

Table of Contents

1. Overview

Zend_Filter_Bbcode is a component to parse bbcode tags to html syntax.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

4. Dependencies on Other Framework Components

  • Zend_Filter_Interface

5. Theory of Operation

...

6. Milestones / Tasks

  • Milestone 1: [DONE] basic code
  • Milestone 2: add more comments on the code!
  • Milestone 3: Optimisation
  • Milestone 4: unit test

7. Class Index

  • Zend_Filter_Bbcode

8. Use Cases

UC-01

9. Class Skeletons

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 16, 2007

    Replacing BBCodes with regular expressions or simple string replaces is a very bad idea, as it could end in not well-formed HTML/XHTML. In mind of the MVC pattern, this should also be part of a view helper, not of a component in the controller part.

  2. Sep 16, 2007

    By the way, here you can see a very good implementation of BB-code parsing:

    http://www.christian-seiler.de/projekte/php/bbcode/index_en.html

    1. Jul 30, 2008

      I agree, its a nice one, but its in PHP4 and quite complex to use (it maybe might be easier ). But this shows me one thing: Its not such a good idea to try to replace BBCode with theire html-tags, as you also mentioned, instead of a "parsing process". So it seems to be more useful to implement BBCode as an own component instead of a filter (also mentioned by another proposal (1)), which cant reach the power of something like Seiler's implementation. A filter may access that component.

      (1) http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_Bbcode+-+Pieter+Kokx

  3. Oct 31, 2008

    I think this needs to be its own component with a view helper. The Zend_Markup approach seems more "correct" in this respect. Perhaps you could work with Pieter Kokx on a joint proposal.

  4. Feb 19, 2009

    "Zend Official Response"
    This proposal is being moved to Archived in favor of a the work being done inside Zend_Markup. Ideally, we'd like to see a more common interface for translating from one markup language to another.

    Zend_Markup: http://framework.zend.com/wiki/display/ZFPROP/Zend_Markup+-+Pieter+Kokx