![]() |
|
sfGalleryPlugin - 1.0.1sfGallery plugin |
|
Some of the plugins offer one-click modules to easily add complete features to your symfony applications
![]() |
DescriptionHomepagehttp://www.symfonylab.com/sfgallery-plugin-101-installation-step-by-step/ Categories |
| Name | |
|---|---|
|
|
So first of all make sure you have these plugins installed:
Then for frontend/backend allow modules:
frontend:
config/settings.yml
enabled_modules: [default, sfGallery]
backend:
config/settings.yml
enabled_modules: [default, sfModeration, sfGalleryAdmin, sfPhotoAdmin]
and in propel.ini you have to enable behaviours and modify propel.builder.peer.class:
propel.builder.peer.class = plugins.sfModerationPlugin.lib.SfPeerBuilder propel.builder.addBehaviors = true
this is requred by moderation plugin.
Also we use sfGuardPlugin for authentificating users (this can be changed easily though to any other authentificating plugin) and there must be added user_profile table, here is a sample of what can be used (you can put that in schema.yml):
propel:
_attributes: { package: plugins.sfGuardPluginPlus.lib.model } sf_guard_user_profile: _attributes: { phpName: sfGuardUserProfile } id: user_id: { type: integer, index: unique, foreignTable: sf_guard_user, foreignReference: id, onDelete: cascade } nickname: { type: varchar(40) } email: { type: varchar(40) } created_at: updated_at:
Custom routes are defined in sfGalleryPlugin/config/config.php, e.g.
http://sfgallery/user/gallery/new
http://sfgallery/photos
of course it's better to put them into routing.yml for better performance. And you can use these urls to get access to admin area:
http://sfgallery/backend_dev.php/sfGalleryAdmin http://sfgallery/backend_dev.php/sfPhotoAdmin
(here sfgallery is possible project name).
Of course we skipped here part which describes enabling of sfGuardPlugin. So you should handle because sfGalleryPlugin will allow creating galleries/photos only for registered users.
Contributor: ten24 Media