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.
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):
With all buttons turned on the bar requires approximately 600px in width and 290px in height.