sfDoctrineFaqPlugin
1.0.2stable
for sf 1.4 and Doctrine
MIT
Doctrine Port from sfFaqPlugin
http://www.symfony-project.org/plugins/sfFaqPlugin
It allows you to embed a FAQ module within your symfony application with the following features :
- Questions are grouped into Categories
- BackEnd Modules to manage categories and questions
- A category can be activated or desactivated
Developers
| Name |
Status |
Email |
Susan Lau |
lead |
ed.xmg <<ta>> ual.nasus
|
License
sfDoctrineFaqPlugin Copyright (c) 2010 Susan Lau - susan.lau@gmx.de
sfFaqPlugin Copyright (c) 2007 Jonathan Démoutiez - jonathan@demoutiez.net
sfFaqPlugin Copyright (c) 2007 Akky AKIMOTO - MY-SIRNAME@gmail.com
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.
sfDoctrineFaqPlugin
Overview
This plugin is a Doctrine port of the sfFaqPlugin
http://www.symfony-project.org/plugins/sfFaqPlugin
It allows you to embed a FAQ module within your symfony application with the following features :
- Questions are grouped into Categories
- BackEnd Modules to manage categories and questions
- A category can be activated or desactivated
- The front reloads the page with a good URL for search engine optimization
- i18n ready
Requirements
Installation
Get the source from github into your plugins-folder:
$ git clone http://github.com/slaubi/sfDoctrineFaqPlugin
or from the SVN
$ svn co http://svn.symfony-project.com/plugins/sfDoctrineFaqPlugin/trunk plugins/sfDoctrineFaqPlugin
Rebuild the model, generate the SQL code for the new tables and insert it into your database:
$ ./symfony doctrine:build --all
Clear the cache to enable autoloading to find new classes:
$ ./symfony cc
You can load included fixtures to start using FAQ with test data.
$ cp plugins/sfDoctrineFaqPlugin/data/fixtures/fixtures.yml.example data/fixtures/sf_doctrine_faq.yml
$ ./symfony doctrine:data-load --env=frontend
Configuration
plugin activation
You need to add this plugin name in the setup() method in config/ProjectConfiguration.class.php
public function setup()
{
$this->enablePlugins(array('sfDoctrineFaqPlugin'));
}
Or, if your setup() uses enableAllPluginsExcept(), which is to tell what plugins you do not use, make sure the 'sfFaqPlugin' is not in the array.
setting.yml
Enable the new sfFaq module in your application, within settings.yml file.
// in myproject/apps/frontend/config/settings.yml
all:
.settings:
enabled_modules: [default, sfFaq]
// in myproject/apps/backend/config/settings.yml
all:
.settings:
enabled_modules: [default, sfFaqCategoryAdmin, sfFaqAdmin]
Start using the plugin by browsing front-end module's default page:
// frontend
http://myproject/sfFaq
// backend
http://myproject/backend.php/sfFaqAdmin
http://myproject/backend.php/sfFaqCategoryAdmin
app.yml
Plugin features can be altered by configuration. To do so, check the plugin app.yml and copy the needed lines to your application's app.yml:
Routing rules
The plugin doesn't come with any routing rule. However, you can add some of your own to make the URLs look nicer. An example of set of rules you find in the config folder.
frontend-view / templates
The template is very simple to allow you all wished and needed adaptions. It is also up to you to integrate more fancy javascript/ajax if necessary.
Credits
The propel version of this plugin was developed by [http://jonathan.demoutiez.net Jonathan Demoutiez] and [http://asiajin.com/blog/ Akky Akimoto].
Modification for symfony 1.4 and migration to Doctrine is done by slaubi
http://github.com/slaubi/sfDoctrineFaqPlugin