2017 © Pedro PelĂĄez
 

symfony-bundle forum-bundle

Forum for Symfony, Can be used with SonataAdminBundle

image

simseo/forum-bundle

Forum for Symfony, Can be used with SonataAdminBundle

  • Tuesday, July 11, 2017
  • by simcos
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Simseo/ForumBundle

Ce bundle est actuellement en developpement. Pour ceux qui voudraient contribuer, merci de faire une pull request sur Github., (*1)

Installation

Ce bundle a besoin d'utiliser knplabs/knp-paginator-bundle, stof/doctrine-extensions-bundle et egeloen/ckeditor-bundle. Je vous renvoie Ă  leur propre documentation pour leur installation., (*2)

Utilisez composer pour gérer les dépendances et télécharger SimseoForumBundle, (*3)

    $ php composer.phar require simseo/forum-bundle

Enregistrez le bundle dans app/AppKernel.php, (*4)

    <?php
    // app/AppKernel.php
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Simseo\ForumBundle\SimseoForumBundle(),
        );
        // ...
    }

Ajoutez les routes:, (*5)


# app/config/routing.yml simseo_forum: resource: "@SimseoForumBundle/Resources/config/routing.yml" prefix: /forum

Ajoutez la configuration suivante dans app/config/config.yml, (*6)

    # app/config/config.yml

    simseo_forum:
        antiflood:
            enabled: true
            hours: 12 
        preview:
            enabled: true
        pagination:
            page_name: page
            topics:
                enabled: true
                per_page: 5
            posts: 
                enabled: true
                per_page: 5
        sonata_admin:
            enabled: false # passez cette option Ă  true si vous utilisez SonataAdminBundle

Ajoutez un ROLE_MODERATOR dans app/config/security.yml, (*7)

    # app/config/security.yml

    security:
        role_hierarchy:
            ROLE_ADMIN:       [ROLE_MODERATOR]
            ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
            ROLE_MODERATOR:   [ROLE_USER]

Configuration, (*8)

    # app/config/config.yml

    doctrine:
        orm:
            auto_generate_proxy_classes: '%kernel.debug%'
            naming_strategy: doctrine.orm.naming_strategy.underscore
            auto_mapping: true
            resolve_target_entities:
                Symfony\Component\Security\Core\User\UserInterface: Namespace\YourUserBundle\Entity\User
                Sonata\MediaBundle\Model\MediaInterface: NameSpace\YourMediaBundle\Entity\Media

    # StofDoctrineExtentions Configuration
    stof_doctrine_extensions:
        orm:
            default:
                sluggable: true
                timestampable: true
                blameable: true
                sortable: true

    knp_paginator:
        page_range: 5
        default_options:
            page_name: page
            sort_field_name: sort
            sort_direction_name: direction
            distinct: true
        template:
            pagination: 'KnpPaginatorBundle:Pagination:sliding.html.twig'
            sortable: 'KnpPaginatorBundle:Pagination:sortable_link.html.twig'

    simseo_forum:
        antiflood:
            enabled: true
            hours: 12
        preview:
            enabled: true
        pagination:
            page_name: page
            topics:
                enabled: true
                per_page: 5
            posts: 
                enabled: true
                per_page: 5
        sonata_admin:
            enabled: false

Mettez à jour la base de donnée, (*9)

    $ php app/console doctrine:schema:update --force

Rendez vous ensuite à l'adresse /forum/admin et créez vos premiers forums., (*10)

The Versions

11/07 2017

dev-master

9999999-dev

Forum for Symfony, Can be used with SonataAdminBundle

  Sources   Download

GPL-3.0+

The Requires

 

by Simon Cosandey

symfony forum sonataadmin