You’ll need to have an active Symfony 1.4 project before getting started with the installation.
mkdir reditype_project cd reditype_project symfony1.4 generate:project reditype_project
You’ll also need to configure a database…
mysqladmin -udbUser -pdbPassword create reditype_project
…and make sure the account settings are reflected in config/databases.yml:
all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: 'mysql:host=localhost;dbname=reditype_project'
username: dbUser
password: dbPassword
Download the rtCorePlugin into you plugins directory along with the following plugins:
cd plugins git clone git://github.com/pierswarmers/rtBlogPlugin.git git clone git://github.com/pierswarmers/rtCorePlugin.git git clone git://github.com/pierswarmers/rtSitePlugin.git git clone git://github.com/pierswarmers/rtWikiPlugin.git svn co http://svn.symfony-project.com/plugins/sfDoctrineActAsTaggablePlugin/trunk/ sfDoctrineActAsTaggablePlugin svn co http://svn.symfony-project.com/plugins/sfDoctrineGuardPlugin/trunk/ sfDoctrineGuardPlugin svn co http://svn.symfony-project.com/plugins/sfFeed2Plugin/branches/1.2/ sfFeed2Plugin svn co http://svn.symfony-project.com/plugins/sfFormExtraPlugin/branches/1.3/ sfFormExtraPlugin svn co http://svn.symfony-project.com/plugins/sfGeshiPlugin/trunk/ sfGeshiPlugin svn co http://svn.symfony-project.org/plugins/sfThumbnailPlugin/branches/1.3/ sfThumbnailPlugin ls -lash cd ..
Enable the plugin in your ProjectConfiguration.class.php, The enabled plugins call will look something like this:
$this->enablePlugins( 'rtCorePlugin', 'rtBlogPlugin', 'rtSitePlugin', 'rtWikiPlugin', 'sfDoctrinePlugin', 'sfDoctrineActAsTaggablePlugin', 'sfFormExtraPlugin', 'sfDoctrineGuardPlugin', 'sfGeshiPlugin', 'sfThumbnailPlugin', 'sfFeed2Plugin' );
You need a frontend application, if you don’t already have one:
./symfony generate:app frontend
Enable the required modules in your fontend apps/frontend/config/settings.yml:
enabled_modules:
# rtWikiPlugin
- rtWikiPage
- rtWikiPageAdmin
# rtBlogPlugin
- rtBlogPage
- rtBlogPageAdmin
# rtSitePlugin
- rtSitePageAdmin
- rtSitePage
# rtCorePlugin
- rtDefault
- rtAdmin
- rtAsset
- rtComment
- rtCommentAdmin
- rtContact
- rtEmail
- rtGuardRegister
- rtGuardForgotPassword
- rtGuardAuth
- rtGuardUser
- rtGuardUserAdmin
- rtGuardGroupAdmin
- rtGuardPermissionAdmin
- rtTag
- rtTreeAdmin
- rtSearch
- rtSearchAdmin
- rtSnippet
- rtSnippetAdmin
- rtSitemap
# rtShopPlugin
- rtShopProduct
- rtShopProductAdmin
- rtShopCategory
- rtShopCategoryAdmin
- rtShopAttributeAdmin
- rtShopPromotionAdmin
- rtShopVoucherAdmin
- rtShopOrder
- rtShopOrderAdmin
While we’re here, lets set up the email and cache configuration in factories.yml:
all:
mailer:
class: sfMailer
param:
logging: %SF_LOGGING_ENABLED%
charset: %SF_CHARSET%
delivery_strategy: realtime
transport:
class: Swift_SmtpTransport
param:
host: my.smtp.server.location.com
port: 485
encryption: ~
username: no-reply@example.com.au
password: 123456
view_cache_manager:
class: sfViewCacheManager
param:
cache_key_use_vary_headers: true
cache_key_use_host_name: true
view_cache:
class: sfSQLiteCache
param:
database: %SF_TEMPLATE_CACHE_DIR%/cache.db
Two addition filters need to be enabled. In apps/frontend/config/filters.yml, you should have something like the following:
rendering: ~ remember_me: class: sfGuardRememberMeFilter security: ~ # insert your own filters here rt_admin_toolbar: class: rtAdminToolbarFilter cache: ~ execution: ~
The routing in apps/frontend/config/routing.yml to point to the required home. For example, rtSitePage:
# default rules
homepage:
url: /
param: { module: rtSitePage, action: index }
# generic rules
# please, remove them by adding more specific rules
default_index:
url: /:module
param: { action: index }
default:
url: /:module/:action/*
Symfony will now need to be told how user authentication should be handled. In the apps/frontend/lib/myUser.class.php, change the exteded class:
<?php class myUser extends sfGuardSecurityUser { }
Now we need to configure the user management modules in apps/frontend/config/settings.yml:
all:
.settings:
login_module: rtGuardAuth
login_action: signin
secure_module: rtGuardAuth
secure_action: secure
While you’re at… wy not add the custom 404 handling:
all:
.settings:
error_404_action: error404
error_404_module: rtDefault
You will now need to run a complete build on your project:
./symfony doctrine:build --all ./symfony cc ./symfony plugin:publish-assets
And… you’re done!
Nearly…
You’ll probably want to create a user with some permissions. Its simple to do from the cli using the following task:
ln -s ../../plugins/rtCorePlugin/data/fixtures/guard.yml.sample data/fixtures/guard.yml ./symfony doctrine:data-load ./symfony guard:create-user [somebody@example.com] [username] [password] ./symfony guard:add-group [username] admin