GithubHelp home page GithubHelp logo

sonatanewsbundle's Introduction

SonataNewsBundle

A blog platform based on Doctrine2 and Symfony2.

Installation

  • Add SonataNewsBundle to your src/Bundle dir

      git submodule add git://github.com/sonata-project/SonataNewsBundle.git vendor/bundles/Sonata/NewsBundle
      git submodule add git://github.com/sonata-project/SonataMediaBundle.git vendor/bundles/Sonata/MediaBundle
      git submodule add git://github.com/sonata-project/SonataUserBundle.git vendor/bundles/Sonata/UserBundle
      git submodule add git://github.com/FriendsOfSymfony/FOSUserBundle.git vendor/bundles/FOS/UserBundle
    
  • Add SonataNewsBundle to your application kernel

      // app/AppKernel.php
      public function registerBundles()
      {
          return array(
              // ...
              new Sonata\NewsBundle\SonataNewsBundle(),
              new Sonata\UserBundle\SonataUserBundle(),
              new Sonata\UserBundle\SonataMediaBundle(),
              new FOS\UserBundle\FOSUserBundle(),
              // ...
          );
      }
    
  • Run the easy-extends command

      php app/console sonata:easy-extends:generate SonataNewsBundle
      php app/console sonata:easy-extends:generate SonataUserBundle
      php app/console sonata:easy-extends:generate SonataMediaBundle
    
  • Enable the new bundles

      // app/AppKernel.php
      public function registerBundles()
      {
          return array(
              // ...
              new Application\Sonata\NewsBundle\SonataNewsBundle(),
              new Application\Sonata\UserBundle\SonataUserBundle(),
              new Application\Sonata\UserBundle\SonataMediaBundle(),
              // ...
          );
      }
    
  • Complete the FOS/UserBundle install and use the Application\Sonata\UserBundle\Entity\User as the user class

  • Add SonataNewsBundle routes to your application routing.yml

      # app/config/routing.yml
      news:
          resource: '@SonataNewsBundle/Resources/config/routing/news.xml'
          prefix: /news
    
  • Add a new context into your sonata_media configuration

      news:
          providers:
              - sonata.media.provider.dailymotion
              - sonata.media.provider.youtube
              - sonata.media.provider.image
    
          formats:
              small: { width: 150 , quality: 95}
              big:   { width: 500 , quality: 90}
    

sonatanewsbundle's People

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.