Yii 1.1: socialshareprivacy

Widget for jQuery socialshareprivacy Plugin - For Facebook, Twitter and Google+
5 followers

This is basicly a wrapper extension for the jQuery socialshareprivacy Plugin developed by heise.de. It allows to include the typical 'I Like', 'Tweet' and '+1' Buttons from Facebook, Twitter and Google+ respectively.
Unlike the original scripts, this one requires the user to "switch on" the buttons before loading the external scripts from the mentioned providers, allowing the user to take control of their personal data and offer them a way to opt-out of data collection for advertising and other reasons.

Requirements

Yii 1.1.5

Usage

Using the extension is straightforward. 1. Extract the Widget within your application (typically within the extension directory) 2. Use the following code within your layout (or within a view) to show the bar.

$this->widget('ext.socialshareprivacy.SocialSharePrivacy', array(
    // Options are directly passed to the plugin as JSON array
    // See offical documentation for valid values (See below)
    'options' => array(
        'services' => array(
            // Turn off the twitter button
            'twitter' => array('status' => 'off'),
        ),
    ),
    'htmlOptions' => array(
        // Assign your own options if you want
        // 'style' => 'width: 900px; margin: 0 auto;',
    ),
));

Example Preview (With twitter enabled):
Social Share Privacy HTML Preview

With all buttons turned on the bar requires approximately 600px in width and 290px in height.

Resources

Total 3 comments

#13127 report it
shaik at 2013/05/07 01:59am
Linked in Share

Ok. I have used this one Yii-social-sharing-widget-master and its working fine.

I used facebook, twitter and google plus, but is there any widget for linkedin share. Can you please pass me some links to share my site through linkedin website.I dint found any.

#13122 report it
Coksnuss at 2013/05/06 10:55am
Need more informations

Hi shaik.

What exactly isn't working? Do you mean that the buttons for facebook and google are not displayed? When i take your code it works perfectly for me.

In fact you can strip it down to the following equivalent form:

<?php $this->widget('ext.socialshareprivacy.SocialSharePrivacy'); ?>
#13118 report it
shaik at 2013/05/06 06:48am
Facebook and Google Plus

I have applied this plug in and works fine only for the twitter , i can share my page on twitter but it not working for facebook and google plus. Here is the code I have used on my view page

<?php $this->widget('ext.socialshareprivacy.SocialSharePrivacy', array( // Options are directly passed to the plugin as JSON array // See offical documentation for valid values (See below) 'options' => array( 'services' => array( // Turn off the twitter button 'twitter' => array('status' => 'on'), 'facebook' => array('status' => 'on'), 'gplus' => array('status' => 'on'), ), ), 'htmlOptions' => array( // Assign your own options if you want // 'style' => 'width: 900px; margin: 0 auto;', ), )); ?> Can any one tell me why the fshare and google share is not working. Is those are the limitations of this plug in.?

Leave a comment

Please to leave your comment.

Create extension