The Artima Developer Community
Sponsored Link

PHP Buzz Forum
23 First official release of patBBCode 13

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Stephan Schmidt

Posts: 238
Nickname: schst
Registered: Sep, 2004

Stephan Schmidt is a founding member of PHP Application Tools and a PEAR developer.
23 First official release of patBBCode 13 Posted: Nov 29, 2004 6:16 AM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Stephan Schmidt.
Original Post: 23 First official release of patBBCode 13
Feed Title: a programmer's best friend
Feed URL: http://blog.php-tools.net/rss.php?version=1.0
Feed Description: The blog of PHP Application Tools
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Stephan Schmidt
Latest Posts From a programmer's best friend

Advertisement
dc5 Our BBCode parser, patBBCode, ist available as v1.0.0beta. This small library is based on a SAX parser, and retrieves all tags with just one regular expression. The tag transformation is then done by filter objects, or patBBcode itself in case of 'basic' tags without attributes.

A complete documentation is available as well as a series of examples also included in the package for a quick start.

Some are already familiar with patBBCode, but with this release there are a few new things. Filter classes can now trigger their own user errors, e.g. if a vital attribute is missing. The biggest addition, however, is the Describer helper class: it enables you to describe an existing patBBCode object by retieving information about all available tags. This can be used to automatically generate a tag guide which you can retrieve in several output formats by means of a specific Driver object. The following bit of code generates an HTML table with a list of tags and their function:


// create the Describer
$descr =& patBBCode::createDescriber();

// create the driver
$driver =& $descr->createDriver( 'HTML' );

// tell the describer to use the driver
// $descr->setDriver( $driver );

// and display the documentation
echo $descr->describe( $BBCode );


You can view the result here - this is included in the examples collection of the package. For the moment, the HTML driver is very simple, but I intend to add a patTemplate driver which will give you total layout control. Another feature worth noting: the Describer respects the locale you set in the patBBCode object you describe :) 17

Read: 23 First official release of patBBCode 13

Topic: 4c PRADO doesn’t replace Interphace, but the implementation is still nice 12 Previous Topic   Next Topic Topic: XML_Transformer-1.1.0 Released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use