Yii 1.1: addthis

Simple addThis widget extension
8 followers

This extension is simple but let you high customize addThis widget appearance.

Check addThis website for API instructions.

Resources

Donate

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/extensions

Usage

See the following code example:

Simple Usage

Append this line on your views. <?php $this->widget('application.extensions.addThis'); ?>

Customized Appearance

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()) ); ?>

Change Log

June 8, 2010

  • Initial release.

Total 5 comments

#5170 report it
b3atb0x at 2011/09/20 07:48pm
Updated version

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

#289 report it
thiagovidal at 2010/07/16 09:14pm
Developer Question

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!

#320 report it
thiagovidal at 2010/07/09 04:36pm
Comming on next version

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.

#353 report it
aztech at 2010/07/01 01:08pm
Perfect!

Question, do you plan to add support for displaying addThis buttons in various way, like here: http://www.addthis.com/gallery

#401 report it
jarb at 2010/06/14 05:35am
Simple and useful

Thanks

Leave a comment

Please to leave your comment.

Create extension
Downloads
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: thiagovidal
  • Category: Others
  • Votes: +4 / -1
  • Downloaded: 622 times
  • Created on: Jun 8, 2010
  • Last updated: Jul 25, 2010