Git Product home page Git Product logo

dforumbundle's Introduction

ForumBundle README.

Lisez-moi Français

SensioLabsInsight Build Status Latest Stable Version Total Downloads

BUNDLE INFORMATION:

This bundle has been conceived with and for Symfony 3 (PHP >= 5.x | 7.x)

Annonce: If my work seems good to you, be aware that I am currently looking for a job.

Available on:

FEATURES:

This bundle includes the following features:

  • Category: Create / Edit / Delete / Move forums / User rights management.
  • Forum: Create / Edit / Delete / Move topics
  • Topics: Create / Edit / Delete / Move
  • Posts: Create / Edit / Delete
  • Labels: Resolved / Pinned / Closed
  • Others, coming soon...

SETUP:

Before setting up everything, this bundle requires that you install KnpPaginatorBundle.

1: Add the dependancy to your composer

composer require discutea/forum-bundle

2: Register DForumBundle in the Symfony kernel

   <?php
   // app/AppKernel.php
   // ...
   public function registerBundles()
   {
       $bundles = [
           // ...
           // IF NOT EXIST
           new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
           new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
           // END OF DEPENDANCY
           new Discutea\DForumBundle\DForumBundle(),
           // ...

4: Add routes routes

# app/Config/routing.yml

discutea_forum:
    resource: "@DForumBundle/Resources/config/routing.yml"
    prefix:   /

5: Bundle configuration:

User entity

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

# Stof Doctrine Extensions
stof_doctrine_extensions:
    orm:
        default:
            sluggable: true

# Configuration for knp paginator: don't forget to customize page_name
knp_paginator:
    page_range: 3
    default_options:
        page_name: p
        sort_field_name: sort
        sort_direction_name: direction
        distinct: true
    template:
        pagination: KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig
        sortable: KnpPaginatorBundle:Pagination:sortable_link.html.twig

# Configuration for discutea forum
discutea_forum:
    preview:
        enabled: true
    knp_paginator:
        page_name: p  #see knp_paginator.default_option.page_name
        topics:
            enabled: true
            per_page: 10
        posts:
            enabled: true
            per_page: 10

6: Add a ROLE_MODERATOR in app/config/security.yml

7: Update the database

php bin/console doctrine:schema:update --force

8: Install the styles

php bin/console asset:install

All set, browse /forum and start by creating your first category and forum

8: Avoid to 404 http://symfony.com/doc/current/cookbook/routing/redirect_trailing_slash.html

MORE INFO

To get help regarding this bundle or to request features (English and French)

  • server: irc.ircz.fr:6667
  • channel: #IRCz

To deal with potential issues, please open a ticket on GitHub.

dforumbundle's People

Contributors

harak avatar koc avatar mysterty avatar nils-van-zuijlen avatar strategy47 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dforumbundle's Issues

Quote don't works

I tried to test the bundle on my site but when i use quote to reply a message this paste me the code on my reply but shows the tag [quote=username]. How can i fix this ?

Search forum topics

Hi!
Will you implement functionality to search forum topics by topic.title and forum topics by posts.content?

Undefined index

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ContextErrorEx
ception: Notice: Undefined index: knp_paginator in C:\xampp\htdocs\reapers
vendor\discutea\forum-bundle\Discutea\DForumBundle\DependencyInjection\Foru
mExtension.php:28

expecting closing tag for the "block"

Unexpected "stylesheets" tag (expecting closing tag for the "block" tag defined near line 6) in DForumBundle::Post\edit_post.html.twig at line 6.

Sur Symfony 3.1

Bonne continuation :)

How to override entities

Hi!

How can I override entities of this bundle?
I want to:

  • add some fields to Topic entity
  • add fulltext indexes for Topic.title and Post.content

I tried to make my own Forum bundle. I have already overridden controllers and views, but entities just don't work as expected - indexes are not added after schema update (if I don't specify the table name in my extended entity "Post").

But if I specify the same table name "df_post" like this
image

then during schema update I get the following error "The table name 'df_post' already exists" although the DB doesn't contain this table.

I also tried to put the following lines in my config.yml:

doctrine:
    orm:
       resolve_target_entities:
          Discutea\DForumBundle\Entity\Post: ForumBundle\Entity\Post

but it didn't help.

Can anyone please help me?

ODB

How can I use this bundle with MongoDB ?

Wrong urls appelations

Hello,

I checked your urls and it seems that some of them aren't obvious and maybe miss spelled...

discutea_forum_topic => /forum/cat/{slug}/ : head to list of forum of a category
discutea_forum_post => /forum/topic/{slug}/ : head to list of topic of a forum

Quote & likes

Quoting button does add the quotation tag but when the comment is sent, the quotation remains raw tag
[quote=john_user]foobar[/quote].
I have no error in web console, I 've installed the assets. Any tips ?

Like button does't seem to work either.

Thanks for you work

Compatibility

Hello, this bundle works with symfony2.7 ?

thank you

block stylesheets erased

Block stylesheets is erased in index.html.twig file.

parent() should be used plus it'd be better to set style in separate css file

setup issue

Hello could u please guide me with a video to do the setup setting I got lost , thanks

Override Template Bundle

Bonjour, je voulais savoir, si il est normale de pas pouvoir override les templates du bundle. J'utilise symfony 3.3.
Cordialement.

Require sf2.8 ?

Hello,

As sf3 haven't yet main bundles but is fully compatible sf2.8, can you change your dependencies ?
I tested with my own 2.8 project and almost all works... except form_rest(form) in Topic.html.twig

LogicException: Unable to render the form as none of the following blocks exist: "_forumbundle_topic_rest", "forumbundle_topic_rest", "forumbundle_topic_rest", "form_rest".

UserInterface compatibility

Hello,
I see in the doc that you specify an "IRCzs" bundle user's class to use.
I tried FOSUserBundle and it also works ;)
Symfony\Component\Security\Core\User\UserInterface: IRCz\UsersBundle\Entity\Users
Maybe you could update to
Symfony\Component\Security\Core\User\UserInterface: MyBundle\Entity\MyUser

Problème de traduction

bonjour,

j'ai pu installer le bundle sans difficultés mais lors de son utilisation je n'avais pas les bonnes traductions sur ma page.
je m'explique :
au lieu de : "Administrer les catégories et les forums."
j'avais : "discutea.forum.category.manage"

J'ai eu beau chercher pendant plusieurs jours, pas moyen de trouver la raison du problème, sauf aujourd'hui.
Dans tous les fichiers messages.XX.xlf, source-language est égal à "en" .
Il m'a donc suffit de modifier le fichier qui m’intéressait en l’occurrence messages.fr.xlf et de modifier le sosurce-language="en" en ="fr".
Bref, vous aurez bien compris, je pense, le problème qui n'est qu'un tout petit bug face à l'ampleur du travail effectué mais qui mérite peut-être une petite correction car il "pourrit" la vie de débutant comme moi.
Un grand merci

Add reputation to users

I add a reputation field on my fos_user table and I'm trying to implement this system on posts to vote users. I create a function on PostController that works fine if I check the database but the redirect didn't work.

`public function puntuacioAction(Request $request){

    $em = $this->getDoctrine()->getManager();

    $idPoster = $request->request->get('id_posterUser');
    $positive= $request->request->get('positive');
    $negative= $request->request->get('negative');

    $user=  $em->getRepository(User::class)->findOneById($idPoster);


    $topic = $em->getRepository(Topic::class)->findOneByUser($user->getId());

    $puntuacio = $usuari->getReputatio();

    if ($positive!= null) {
        $puntuacio = $puntuacio + 1;
    }
    if($negative!= null){
         $puntuacio = $puntuacio - 1;
    }

    $usuari->setReputacio($puntuacio);
    $em->persist($usuari);
    $em->flush();

   return $this->forward('DForumBundle:Post:post', array('slug' => $topic->getSlug()));

}`

Can someone tell me how should be my return? I'm not sure how does annotations routes works so I did it on my own way.

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.