dev-master
9999999-dev https://github.com/rgsystemes/uservoice-bundleIntegrate easily UserVoice into your Symfony2 projects
MIT
The Requires
by COLE Edouard
symfony uservoice
Integrate easily UserVoice into your Symfony2 projects
Easily integrate UserVoice into your Symfony2 projects., (*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)
Add this bundle to your application's kernel:, (*6)
// app/AppKernel.php public function registerBundles() { return array( // ... new RG\UserVoiceBundle\RGUserVoiceBundle(), // ... ); }
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)
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) }}">
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)
Integrate easily UserVoice into your Symfony2 projects
MIT
symfony uservoice