Build Status Scrutinizer Quality Score Latest Stable Version Total Downloads

SensioLabsInsight knpbundles.com

Overview

PrestaCMSSocialBundle adds contact form in PrestaCMS.

For a ready to use demonstration of PrestaCMS you should check the prestacms-sandbox available on github. Two blocks are available in the footer of the prestacms-sandbox.

Currently we provide the three following blocks

  • Facebook fan count block
  • Twitter follower count
  • Twitter latest tweet

Installation

This bundle should be installed through composer

Require presta/cms-social-bundle to your composer.json file:

{
    "require": {
        "presta/cms-social-bundle": "1.0.*"
    }
}

Register the bundles in app/AppKernel.php

<?php
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new \new Sonata\IntlBundle\SonataIntlBundle(),
        new \new Presta\CMSSocialBundle\PrestaCMSSocialBundle(),
    );
}

Usage

By default none of the three blocks are available, you have to add some configurations in your config.yml file

To enable the twitter relative block, you have to put the config below in your config.yml file. Takes care of replacing the parameters with your own parameters, the parameters can be found in your twitter developer account.

# app/config/config.yml
presta_cms_social:
    twitter:
        url: %twitter.api_url%
        consumer_key: %twitter.consumer_key%
        consumer_secret: %twitter.consumer_secret%
        token: %twitter.access_token%
        token_secret: %twitter.access_token_secret%

By adding the configuration above, you now have access to the two twitter blocks which displays your latest tweet, and your current follower count.

To enable the facebook relative block, you have to add in your config.yml, the configuration below, here you also have to replace the parameters with your own parameters, the parameters can be found in your facebook developer account.

# app/config/config.yml
presta_cms_social:
    facebook:
        application_id: %facebook.application_id%
        application_secret: %facebook.application_secret%

With this config, you can now add the facebook fan count block into your pages

Ask for help

If you need help about this project you can post a message on our google group

How to contribute

The best way to contribute is to use Github Pull Request system. Any contributions like translation, documentation, bug reporting or even new blockā€¦


Want do contribute ? Just fork and edit it!