Download the PHP package helios-ag/fm-bbcode-bundle without Composer

On this page you can find all versions of the php package helios-ag/fm-bbcode-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fm-bbcode-bundle

FMBBCodeBundle

PHP-Decoda integration in Symfony2

A lightweight lexical string parser for BBCode styled markup.

Contributors

Code Quality Assurance

SLInsight Travis CI Gitter Coverage StyleCI
SensioLabsInsight Build Status Join the chat at https://gitter.im/helios-ag/FMBbCodeBundle Coverage Status StyleCI
Deps Status Version Downloads
Dependency Status Latest Stable Version Total Downloads

Installation

To install this bundle, you'll need both the Decoda library and this bundle. Installation depends on how your project is setup:

Step 1: Installation

Using Composer, just add the following configuration to your composer.json:

Or you can use composer to install this bundle:

For symfony <3.0, use latest ~6 version

for Symfony 3

or

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

Step 3: Dump emoticons (optional)

To enable emoticons via emoticon hook, use the following command to copy emoticons images to public folder (web/emoticons)

Basic configuration

Make the Twig extensions available by updating your configuration:

By default only "default" filter enabled, which provide support
for [b], [i], [u], [s], [sub], [sup], [abbr], [br], [hr], [time]
BBCodes

Examples to use the extension in your Twig template

Define BBCode filter in your config.yml:

And you can do the following:

After enabling "quote" filter, you can do such things:

Also you can define multiple filter sets under filter_sets parameter like this:

Please keep in mind, that whitelist tags suppress tags, that applied by filters configuration.

Strip filter

To clear text from any bbcodes use bbcode_clean filter: example:

This filter will eliminate any known to decoda tags

Escaping and line breaks

Escaping and line breaks can be controlled via "escaping" and "line_breaks" parameters under filter configuration. Default configuration for them is 'true'. If you wish to pipeline filters, set escaping to false.

Advanced configuration

Overriding messages

Some templates and hooks, use text strings, that can be translated into different languages, the original file located under decoda/config directory, but content of this file can be overriden with messages option, under messages: node. File should be json formatted.

Adding own templates

Your own templates can be defined at templates node, the example below shows how:

Template examples can be found inside decoda library

Adding own filter

To enable a custom filter, add it as a regular service in one of your configuration, and tag it with fm_bbcode.decoda.filter:

Your service must implement the Decoda\Filter interface.

If your service is created by a factory, you MUST correctly set the class parameter for this tag to work correctly.

Adding own hook

To enable a custom hook, add it as a regular service in one of your configuration, and tag it with fm_bbcode.decoda.hook:

Your service must implement the Decoda\Hook interface.

If your service is created by a factory, you MUST correctly set the class parameter for this tag to work correctly.

Then enable it in your configuration:

Customize your own emoticons

Your own emoticons can be defined at emoticon node, the example below shows how:

How to automatically dump emoticons on each deploy

Add the following commands to you projects composer.json:

To customize emoticons assets folders, use path and folder node configuration:


All versions of fm-bbcode-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
mjohnson/decoda Version 6.*
symfony/twig-bundle Version ~3.0
symfony/assetic-bundle Version ~2.4
symfony/config Version ~3.0
symfony/console Version ~3.0
symfony/dependency-injection Version ~3.0
symfony/framework-bundle Version ~3.0
symfony/http-foundation Version ~3.0
symfony/http-kernel Version ~3.0
symfony/process Version ~3.0
symfony/templating Version ~3.0
symfony/yaml Version ~3.0
sensio/distribution-bundle Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package helios-ag/fm-bbcode-bundle contains the following files

Loading the files please wait ....