AdvancedBBCodeParser

The AdvancedBBCodeParser is a generic implementation of a bbcode formatter. In contrast
to the previous implementation, this component is much more lightweight and the parser logic is
highly extensible. The parser itself contains a set of four output provider, that can handle font
styles (bold, italic, underlined), font sizes and colors (depending on the corresponding
configuration files) and new lines.

The bbcode parser consists of three classes: the BBCodeParserDefinition, that represent
an output provider, a provider implementation interface class (BBCodeParserProvider)
and the parser itself (AdvancedBBCodeParser). Due to the fact, that each provider
must be able to load a configuration file depending on the current context of the application, the
AdvancedBBCodeParser must be created via the service manager.

In case of extending the list of providers or replacing a particular one, the newly implemented
class must inherit from the BBCodeParserProvider class. The following code box
presents a simple provider implementation:

In case of standard application, you need to provide the necessary configuration files, that contain
the font size and color definitions used by the default provider. These configuration files are
expected to reside in the APF\tools\string\bbcpprovider namespace and the
current context path. Thereby, the font size definition must be included in the

APF template

{ENVIRONMENT}_fontsize.ini

file and the color definition must be stored in the file

APF template

{ENVIRONMENT}_fontcolor.ini

The two configuration files do consist of a fixed section and a mutable amount of size or color directives:

In order to provide a state-of-the-art web experience and to continuously improve our services we are using
cookies. By using this web page you agree to the use of cookies. For more information, please refer to
our Privacy policy.