Giter Club home page Giter Club logo

sonatanewsbundle's Introduction

test modif SonataNewsBundle ================

A blog platform based on Doctrine2 (ORM and MongoDB) and Symfony2.

The installation process can be found here : http://sonata-project.org/bundles/news/master/doc/reference/installation.html

With Symfony v2.0.4

Clear cache before !! rm app/cache/* -rf !!

Add to app/deps <pre> [symfony]

git=http://github.com/symfony/symfony.git version=v2.0.4

...

[FOSUserBundle]
git=git://github.com/FriendsOfSymfony/FOSUserBundle.git target=/bundles/FOS/UserBundle
[SonataNewsBundle]
[email protected]:sonata-project/SonataNewsBundle.git target=/bundles/Sonata/NewsBundle
[SonataMediaBundle]
[email protected]:sonata-project/SonataMediaBundle.git target=/bundles/Sonata/MediaBundle
[SonataUserBundle]
git=https://github.com/sonata-project/SonataUserBundle.git target=/bundles/Sonata/UserBundle
[SonataAdminBundle]
[email protected]:sonata-project/SonataAdminBundle.git target=/bundles/Sonata/AdminBundle
[SonataFormatterBundle]
git=http://github.com/sonata-project/SonataFormatterBundle.git target=/bundles/Sonata/FormatterBundle
[KnpMarkdownBundle]
git=http://github.com/knplabs/KnpMarkdownBundle.git target=/bundles/Knp/Bundle/MarkdownBundle
[KnpMenu]
git=https://github.com/knplabs/KnpMenu.git target=/knp/menu
[gaufrette]
git=https://github.com/sonata-project/Gaufrette.git target=/gaufrette
[imagine]
git=https://github.com/avalanche123/Imagine.git target=/imagine

</pre>

Let a empty line to the end of file deps

Make a "php bin/vendors install"

If you have some errors after this action, install vendor folder from http://symfony.com/download

Add this to app/autoload.php <pre> .. $loader->registerNamespaces(array(

... 'FOS' => __DIR__.'/../vendor/bundles', 'Knp' => array(

__DIR__.'/../vendor/bundles', __DIR__.'/../vendor/knp/menu/src'

), 'Sonata' => __DIR__.'/../vendor/bundles', 'Gaufrette' => __DIR__.'/../vendor/gaufrette/src', 'Imagine' => __DIR__.'/../vendor/imagine/lib',

... </pre>

Add to app/AppKernel.php <pre> class AppKernel extends Kernel {

public function registerBundles() {

$bundles = array(
.../Vendor Sonata/

new SonataAdminBundleSonataAdminBundle(), new SonataNewsBundleSonataNewsBundle(), new SonataUserBundleSonataUserBundle(), new SonataMediaBundleSonataMediaBundle(), new SonataFormatterBundleSonataFormatterBundle(),

new FOSUserBundleFOSUserBundle(), new KnpBundleMarkdownBundleKnpMarkdownBundle(), new KnpBundleMenuBundleKnpMenuBundle(),

/Application Sonata/ new ApplicationSonataNewsBundleApplicationSonataNewsBundle(), new ApplicationSonataUserBundleApplicationSonataUserBundle(), new ApplicationSonataMediaBundleApplicationSonataMediaBundle(),

... )}; </pre>

Add to app/config/config.yml <pre> imports:

  • { resource: parameters.ini }
  • { resource: security.yml }
  • { resource: sonata_news.yml }
  • { resource: sonata_media.yml }
  • { resource: fos_user.yml }

</pre>

Create 3 new files: - app/config/fos_user.yml - app/config/sonata_media.yml - app/config/sonata_news.yml

Add to fos_user.yml <pre> fos_user:

db_driver: orm # can be orm or odm firewall_name: main user_class: ApplicationSonataUserBundleEntityUser group:

group_class: ApplicationSonataUserBundleEntityGroup
doctrine:
orm:
entity_managers:
default:
mappings:
FOSUserBundle: ~ ApplicationSonataUserBundle: ~ SonataUserBundle: ~

</pre>

Add to sonata_media.yml <pre> sonata_media:

db_driver: doctrine_orm contexts:

default: # the default context is mandatory
providers:
  • sonata.media.provider.dailymotion
  • sonata.media.provider.youtube
  • sonata.media.provider.image
  • sonata.media.provider.file
  • sonata.media.provider.vimeo
formats:
small: { width: 100 , quality: 70} big: { width: 500 , quality: 70}
cdn:
sonata.media.cdn.server:
path: /uploads/media # http://media.sonata-project.org/
filesystem:
sonata.media.adapter.filesystem.local:
directory: %kernel.root_dir%/../web/uploads/media create: true
providers:
sonata.media.provider.file:
resizer: false
doctrine:
orm:
entity_managers:
default:
mappings:
ApplicationSonataMediaBundle: ~ SonataMediaBundle: ~

</pre>

Add to sonata_news.yml <pre> sonata_news:

title: "Mon titre" link: http://sonata-project.org description: Cool bundles on top of Symfony2
doctrine:
orm:
entity_managers:
default:

#metadata_cache_driver: apc #query_cache_driver: apc #result_cache_driver: apc mappings:

ApplicationSonataNewsBundle: ~ SonataNewsBundle: ~

</pre>

Create in src/application/Sonata ../MediaBundle/ApplicationSonataMediaBundle.php <pre>

namespace ApplicationSonataMediaBundle; use SymfonyComponentHttpKernelBundleBundle; class ApplicationSonataMediaBundle extends Bundle { } </pre>

../NewsBundle <pre>

namespace ApplicationSonataNewsBundle; use SymfonyComponentHttpKernelBundleBundle; class ApplicationSonataNewsBundle extends Bundle { } </pre>

../UserBundle/ <pre>

namespace ApplicationSonataUserBundle; use SymfonyComponentHttpKernelBundleBundle; class ApplicationSonataUserBundle extends Bundle { } </pre>

sonatanewsbundle's People

Contributors

cifren avatar helmer avatar mremi avatar nicolasricci avatar pborreli avatar rande avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.