Download the PHP package ed/blog-bundle without Composer
On this page you can find all versions of the php package ed/blog-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ed/blog-bundle
More information about ed/blog-bundle
Files in ed/blog-bundle
Package blog-bundle
Short Description Symfony EDBlogBundle
License MIT
Homepage http://blog-demo.etonlabs.com
Informations about the package blog-bundle
EDBlogBundle
EDBlogBundle is extensive and user friendly blog bundle for Symfony2. It provides a lot of interesting features that makes a serious bloging platform from your symfony2 application. It is very intuitive and flexible, you can easily fit it to your own needs.
Features:
- Blog admin panel
- User management, multiple roles Contributer, Author, Editor and Administrator
- Comments management
- Categories
- Tags
- Articles with multiple revisions, writing locks, autosave...
- Media gallery
- RSS feed
License:
This bundle is under the MIT license.
Prerequisites
This bundle is relaying on many cool features provided by very popular Symfony2 bundles such as:
- FOSUserBundle - for user management ( See https://github.com/FriendsOfSymfony/FOSUserBundle for more details)
- KnpPaginatorBundle - Symfony 2 paginator ( See https://github.com/KnpLabs/KnpPaginatorBundle for more details )
- StofDoctrineExtensionsBundle - DoctrineExtensions for Symfony2 ( See https://github.com/stof/StofDoctrineExtensionsBundle for more details )
- SonataMediaBundle - Media management ( See https://github.com/sonata-project/SonataMediaBundle for more details)
Demo:
Visit demo application on http://blog-demo.etonlabs.com to see behaviour of our bundle integrated into standard Symfony2 application.
Installation:
Installation process includes following steps:
- Composer vendors installation and activation
- Creating blog related entities from provided model
- EDBlogBundle configuration
- SonataMediaBundle installation and configuration
- Rutes configuration
- Assetic configuration
- RSS feed configuration
- Finish
Step 1: Composer vendors installation and activation
If you already don't have composer installed, you can get it using:
$ wget http://getcomposer.org/composer.phar
Then you can require following packages:
$ composer require friendsofsymfony/user-bundle:"~2.0@dev" eko/feedbundle:1.2.5 ed/blog-bundle:v1.0.5
Activate newly required bundles in app/AppKernel.php
similar to this example:
Step 2: Creating blog related entities from provided model
To be able to use EDBlogBundle features you must implement certain entities somewhere inside your application. It will be very easy, only thing that you should do is to create relevant classes and extend our prepared models.
2.1 Article entity
Create your Article entity similar to this example:
2.2 ArticleMeta entity
Create your ArticleMeta entity similar to this example:
2.3 Comment entity
Create your Comment entity similar to this example:
2.4 Settings entity
Create your Settings entity similar to this example:
2.5 Taxonomy entity
Create your Taxonomy entity similar to this example:
2.6 TaxonomyRelation entity
Create your TaxonomyRelation entity similar to this example:
2.7 Term entity
Create your Term entity similar to this example:
2.8 User entity
To be able to use EDBlogBundle your User entity should implement two interfaces: BlogUserInterface and ArticleCommenterInterface. Modify your User entity something similar to the following example.
Note:
Find more about FOSUser integration on https://github.com/FriendsOfSymfony/FOSUserBundle/blob/1.2.0/Resources/doc/index.md
2.9 User Repository
Your User repository class should implement BlogUserRepositoryInterface. We prepared ED\BlogBundle\Model\Repository\UserRepository
that you can use as a start point. Modify your UserRepository class something similar to:
Step 3: EDBlogBundle configuration
Now when your entities are ready, you can configure EDBlogBundle in your app/config/config.yml
. Please add ed_blog
to your configuration while targeting previously created entities, something similar to the following example:
Step 4: SonataMediaBundle installation and configuration
Next, we will install and configure media management core. Add following configuration to your config.yml:
To generate ApplicationSonataMediaBundle open terminal and run following code:
$ php app/console sonata:easy-extends:generate --dest=src SonataMediaBundle
Now you can include ApplicationSonataMediaBundle in app/AppKernel.php
by add/uncomment this line:
Finally we should create local directory for media storage:
$ mkdir web/uploads
$ mkdir web/uploads/media
$ sudo chmod -R 0777 web/uploads
Step 5: Rutes configuration
Enable EDBlogBundle and SonataMediaBundle rutes by adding following code to your app/config/routing.yml
:
Step 6: Assetic configuration
Add EDBlogBundle to your Assetic configuration similar to:
Step 7: RSS feed configuration
In order to use RSS feed functionality add eko_feed
configuration to your app/config/config.yml
. Please change required lines according to your application.
Note:
Visit https://github.com/eko/FeedBundle to learn more about eko/FeedBundle
Step 8: Finish
Now you are ready to finish your EDBlogBundle installation:
$ php app/console as:in --symlink
$ php app/console as:du --env=prod
$ php app/console doc:sc:update --force
Before you can access Blog administration area you should promote a Blog Administartor. In order to do that you should assign two roles to your future blog administrator user ROLE_BLOG_USER
and ROLE_BLOG_ADMIN
. You can do it easily by modifying your registration action or by running following code from the console:
$ php app/console fos:user:promote
Note:
Every blog user must have role
ROLE_BLOG_USER
assigned. Beside this one and according to permission level they should have one of following:
- ROLE_BLOG_ADMIN - Administrators can see/access/modify: Articles, Users, Categories, Tags, Comments, Media library, Settings
- ROLE_BLOG_EDITOR - Editors can see/access: Articles, Comments, Media library
- ROLE_BLOG_AUTHOR - Authors can see/access: Articles, Media library, can publish and manage their own posts
- ROLE_BLOG_CONTRIBUTOR - Contributors can see/access: Articles, Media library, can write and manage their own posts but cannot publish them
Now you can login as a blog administrator and visit /blog/admin/
. Please save your initial blog settings first on /blog/admin/settings/edit
.
Congratulation! Your EDBlogBundle is ready.
Please tell us what you think.
Enjoy using EDBlogBundle and don't forget to contribute!
All versions of blog-bundle with dependencies
symfony/symfony Version >=2.4
twig/extensions Version ~1.0
symfony/assetic-bundle Version ~2.3
sensio/framework-extra-bundle Version ~3.0,>=3.0.2
incenteev/composer-parameter-handler Version ~2.0
sonata-project/media-bundle Version ~2.3
sonata-project/doctrine-orm-admin-bundle Version ^2.3
jms/serializer-bundle Version 0.13.0
knplabs/knp-paginator-bundle Version *
doctrine/doctrine-fixtures-bundle Version *
stof/doctrine-extensions-bundle Version ~1.1@dev