2017 © Pedro Peláez

library newsboxbundle

A simple online publishing bundle. Not a blog.



A simple online publishing bundle. Not a blog.

  • Thursday, April 25, 2013
  • by smith981
  • Repository
  • 0 Watchers
  • 0 Stars
  • 19 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown



A simple issue-based online publishing platform. Not a blog., (*1)



  1. Install from the command line the Symfony Standard Edition. Specify version 2.2.
php composer.phar create-project symfony/framework-standard-edition path/to/install
  1. Add the following requirements to your composer.json:
  • "jms/security-extra-bundle": "1.4.*",
  • "jms/di-extra-bundle": "1.3.*",
  • "smith981/newsboxbundle": "dev-master"
  1. run composer update to install the new dependencies.
  2. Make sure all of these are present in your AppKernel::registerBundles() method:

// app/AppKernel.php

  $bundles = array(
            new JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
            new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
            new Smith981\CrudGeneratorBundle\Smith981CrudGeneratorBundle(),
            new Smith981\SecurityBundle\Smith981SecurityBundle(),
            new Smith981\NewsboxBundle\Smith981NewsboxBundle(),
  1. In app/config/config.yml, add this to your assetic configuration:
  bundles:        [ Smith981NewsboxBundle ]

and add this to the twig configuration in the same file:, (*2)

          - LexikFormFilterBundle:Form:form_div_layout.html.twig

Also, add the following global variables to your twig configuration in the same file:, (*3)

    site_name: "YourSiteName"
    site_url:  "http://www.yoursite.com"

Be sure strict_variables is turned off. For a standard install that means commenting this line under twig:, (*4)

  #strict_variables: %kernel.debug%

In app/config/security.yml, remove all of the demo firewalls (if installed), and import those created by Smith981SecurityBundle:, (*5)

# app/config/security.yml
#Added this import manually, and cleared all the default firewalls and access control that had been generated
    - { resource: "@Smith981SecurityBundle/Resources/config/security.yml" }

# ... whatever other security settings you need, then remove the demo firewalls below:

#        dev:
#            pattern:  ^/(_(profiler|wdt)|css|images|js)/
#            security: false

#        login:
#            pattern:  ^/demo/secured/login$
#            security: false

#        secured_area:
#            pattern:    ^/demo/secured/
#            form_login:
#                check_path: _security_check
#                login_path: _demo_login
#            logout:
#                path:   _demo_logout
#                target: _demo
#        #access_control:
#        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }

In app/config/routing.yml, add the following:, (*6)

# app/config/routing.yml

#Added this entry manually
    resource: "@Smith981SecurityBundle/Resources/config/routing.yml"

    resource: "@Smith981SecurityBundle/Controller/"
    type:     annotation
    prefix:   /

    resource: "@Smith981NewsboxBundle/Controller/"
    type:     annotation
    prefix:   /

Next, under framework in the same file:, (*7)

    translator:      { fallback: en }

Note this can be whatever language you choose, or possible %locale% if you actually took the time to set this up correctly., (*8)

In routing_dev.yml, remove all of the demo routes:, (*9)

#    pattern:  /
#    defaults: { _controller: AcmeDemoBundle:Welcome:index }

#    resource: "@AcmeDemoBundle/Controller/SecuredController.php"
#    type:     annotation

#    resource: "@AcmeDemoBundle/Controller/DemoController.php"
#    type:     annotation
#    prefix:   /demo

_wdt: resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" prefix: /_wdt, (*10)

_profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" prefix: /_profiler, (*11)

_configurator: resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" prefix: /_configurator, (*12)

_main: resource: routing.yml, (*13)

```, (*14)

  1. You should be ready to go at this point. Browse to /app_dev.php/admin to log in and start adding issues, and stories which relate to those issues. Those are the only two entity types added by this package. The rest is just an admin console and view templates.

The Versions