-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
111 lines (59 loc) · 2.99 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# 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 ##
* symfony 1.4
* Doctrine
## 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