2017 © Pedro Peláez
 

symfony-bundle uservoice-bundle

Integrate easily UserVoice into your Symfony2 projects

image

rgsystemes/uservoice-bundle

Integrate easily UserVoice into your Symfony2 projects

  • Thursday, March 9, 2017
  • by rgsystemes
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,479 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 7 % Grown

The README.md

Introduction

Easily integrate UserVoice into your Symfony2 projects., (*1)

Installation

  1. Add this bundle to your vendor/ dir using the vendors script:, (*2)

    Add the following to your composer.json:, (*3)

    "rgsystemes/uservoice-bundle": "dev-master"

    and run:, (*4)

    php composer.phar install

    The bundle is compatible with Symfony 2.0 upwards., (*5)

  2. Add this bundle to your application's kernel:, (*6)

    // app/AppKernel.php
    public function registerBundles()
    {
        return array(
            // ...
            new RG\UserVoiceBundle\RGUserVoiceBundle(),
            // ...
        );
    }
  3. Configure the rg_user_voice service in your config.yml:, (*7)

    rg_user_voice:
        domain: %uservoice_domain%
        sso_key: %uservoice_sso_key%
        widget_key: %uservoice_widget_key%
        primary_color: %uservoice_primary_color%
        link_color: %uservoice_link_color%
        forum_id: %uservoice_forum_id%

That's it for basic configuration., (*8)

Usage

In your template, you can include the widget:, (*9)

{% include "UserVoiceBundle::widget.html.twig" %}

In your controllers:, (*10)

$userVoiceOptions = $this->container->get('rg_uservoice_options');
$userVoiceOptions["disabled"] = !$this->getUser()->getAccount()->isUserVoiceEnabled();

Available UserVoice options:, (*11)

- disabled: true (default: false)

It is also possible to generate your SSO token from a Twig template:, (*12)

<a href="http://domain.uservoice.com/knowledgebase?sso={{ rg_uservoice_sso(app.user.name) }}">

Overriding the template

You can override the template used by copying the Resources/views/widget.html.twig file out of the bundle and placing it into app/Resources/RGUserVoiceBundle/views, then customising as you see fit., (*13)

The Versions

09/03 2017

dev-master

9999999-dev https://github.com/rgsystemes/uservoice-bundle

Integrate easily UserVoice into your Symfony2 projects

  Sources   Download

MIT

The Requires

 

symfony uservoice