smith981/newsboxbundle

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (dev-master) of this package.

A simple online publishing bundle. Not a blog.

dev-master 2013-04-25 16:00 UTC

This package is not auto-updated.

Last update: 2019-02-20 20:34:37 UTC


README

A simple issue-based online publishing platform. Not a blog.

Installation

Composer

  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:
<?php

// 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:
assetic:
  bundles:        [ Smith981NewsboxBundle ]

and add this to the twig configuration in the same file:

twig:
  form:
      resources:
          - LexikFormFilterBundle:Form:form_div_layout.html.twig

Also, add the following global variables to your twig configuration in the same file:

twig:
  globals:
    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:

twig:
  #strict_variables: %kernel.debug%

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

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

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

#firewalls:
#        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:

# app/config/routing.yml

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

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

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

Next, under framework in the same file:

framework:
    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.

In routing_dev.yml, remove all of the demo routes:

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

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

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

_wdt: resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" prefix: /_wdt

_profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" prefix: /_profiler

_configurator: resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" prefix: /_configurator

_main: resource: routing.yml


6. 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.