Yii extension for adding the Google +1 button to website pages.
It was created based on the facebook-opengraph which is a more complex extension (a wrapper for the Facebook PHP SDK class) developed by Evan Johnson and available at his github site on http://github.com/splashlab/yii-facebook-opengraph.
Yii 1.1 or above
- Create a folder named yii-google-plusone into YOUR_PROJECT/protected/extensions/
- Copy both files GPluginBase.php and GPlusoneButton.php into it.
You are ready to go!
Render Google Plusone Plugin using helper Yii widgets:
<?php $this->widget('ext.yii-google-plusone.GPlusoneButton', array( 'width'=>'290', 'annotation'=>'inline', 'href'=>'YOUR_DOMAIN', 'lang'=>'es_ES' )); ?>
Or download the zip file from the right side of this page under the "Downloads" section.