This extension is simple but let you high customize addThis widget appearance.
Check addThis website for API instructions.
protected/extensionsSee the following code example:
Append this line on your views. <?php $this->widget('application.extensions.addThis'); ?>
See Services List to ensure correct usage of showServices feature.
Append this code on your views. <?php $this->widget('application.extensions.addThis', array( 'id'=>'id', 'username'=>'username', 'defaultButtonCaption'=>'Share', 'showDefaultButton'=>true, 'showDefaultButtonCaption'=>true, 'separator'=>'|', 'htmlOptions'=>array(), 'linkOptions'=>array(), 'showServices'=>array('separator', 'facebook', 'twitter', 'myspace', 'email', 'print'), 'showServicesTitle'=>false, 'config'=>array('ui_language'=>'en'), 'share'=>array()) ); ?>
Total 5 comments
Hi all! I had to add some custom buttons, but original code didn't allow to add custom data to service's [A] HTML element. I've changed code a bit so widget's $showServices property can contain associative arrays within, where key is the service code (as per AddThis documentation), and value will be passed as htmlOptions to [A] HTML element. Code is here
I don't want that this extension become old-aged.
I'm thinking about extending this extension. I just want to know. What do you expect of this extension?
Contributors are welcome!
On next version you will be able to control more the design of the widget. Wait to the next version.
meanwhile... You can use the 32x32 default addthis style setting the ... 'htmlOptions'=>array('class'=>'addthis_32x32_style addthis_default_style'), ... You could attach on css file to modify the apearence of the widget just combining the htmlOptions and linkOptions attributes.
Question, do you plan to add support for displaying addThis buttons in various way, like here: http://www.addthis.com/gallery
Thanks
Leave a comment
Please login to leave your comment.