Copyright (c) 2007 Tristan Rivoallan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Installation for sf 1.2
php symfony plugin:install sfSimpleForum_PayloadFilterChainPlugin --release=0.6.0
Installation for sf 1.1
php symfony plugin:install sfSimpleForum_PayloadFilterChainPlugin --release=0.6.0
Installation for sf 1.0
php symfony plugin-install http://plugins.symfony-project.org/sfSimpleForum_PayloadFilterChainPlugin
PEAR
Download the PEAR package
Repository
Go to the repository: http://svn.symfony-project.com/plugins/sfSimpleForum_PayloadFilterChainPlugin
sfSimpleForum_PayloadFilterChainPlugin
This behavior enhances the sfSimpleForumPlugin, allowing it to make use of sfPayloadFilterChain capabilities.
Integration with sfPayloadFilterChain_TextTransformationPlugin :

Installation
- Install plugin dependencies :
Required :
symfony plugin-install http://plugins.symfony-project.com/sfPayloadFilterChainPlugin
Optional : you can also install plugin's optional dependency sfPayloadFilterChain_TextTransformationPlugin(/plugins/sfPayloadFilterChain_TextTransformationPlugin sfPayloadFilterChain_TextTransformationPlugin).
If you want text transformation capabilities (bbcode, markdown, smileys, etc) you need to install it :
symfony plugin-install http://plugins.symfony-project.com/sfPayloadFilterChain_TextTransformationPlugin
Install the plugin
symfony plugin-install http://plugins.symfony-project.com/sfSimpleForum_PayloadFilterChainPlugin
Enable Propel behavior support in config/propel.ini:
propel.builder.AddBehaviors = true
Rebuild your model:
symfony propel-build-model
Configuration
Filtering profile
You need to define the filtering profile of a post.
Create and edit pfc/profiles.yml in your appplication's config directory. Here's an example profile definition :
sfSimpleForum_post: [pfc_expand_emoticons](pfc_text_to_xhtml,)
For a comprehensive list of available filters, please refer to sfPayloadFilterChain_TextTransformationPlugin documentation(/plugins/sfPayloadFilterChain_TextTransformationPlugin sfPayloadFilterChain_TextTransformationPlugin documentation).
Of course, you can also define your own filters.
Mimetype conversion
If you plan to use the pfc_text_to_xhtml filter, you need to specify what is the source mimetype for posts.
This is defined by a new sfSimpleForumPlugin configuration directive in app.yml :
all:
sfSimpleForumPlugin:
post_mimetype: text/markdown
sfPayloadFilterChain_TextTransformationPlugin(/plugins/sfPayloadFilterChain_TextTransformationPlugin sfPayloadFilterChain_TextTransformationPlugin) natively supports text/bbcode and text/markdown.
Roadmap
0.6.1
- Handle multiple chain profile execution
- updated installation docs
Changelog
0.6.0
- Renamed plugin due to renaming of sfBBPlugin to sfSimpleForumPlugin
2006-06-29 | 0.5.1 beta
- updated installation docs
- fixed improper mixin registration
2006-06-28 | 0.5.0 beta
- fixed typo in README
- installation documentation update (since symfony's
plugin-install does not support pear dependencies)
- renamed plugin to sfSimpleForum_PayloadFilterChainPlugin
- removed sfSimpleForumPlugin patch (as it's been commited in [4463])
- moved sfSimpleForumPostPayload class to sfSimpleForumPlugin
Thanks to François for his fast and enlightning feedback.
2006-06-27 | 0.4.0 beta