Yii 1.1: echirp

Do you want add your tweets on your website? try this one :)
7 followers

EChirp is a yii widget wrapping for Chirp.js.

Chirp.js is a lightweight templating JavaScript library that enables you to display tweets on your website. Client-side caching is available; and you can set if you’d like to show retweets and replies, too.

Requirements

  • Yii 1.1 or above (built and tested on 1.1.12)

Installation

1. Download EChirp or Clone the files
2. Extract into extensions folder

Usage

$this->widget('ext.echirp.EChirp',array('options'=>array('user'=>'nucreativa','max'=>10,'target'=>'tweet')));

List options : - userstring Twitter username - maxnumber The maximum number of tweets to show - countnumber The maximum number of tweets to retrieve - retweetstrue|false Show or don't show retweets - repliestrue|false Show or don't show at-replies - cacheExpirenumber Number of milliseconds to cache tweets (localstorage on the client). - liststring Name of the list from the user to pull tweets from - targetstring Id of a target DOM object you'd like the tweets to get added to. - successfunction(json) A callback function called when tweets are successfully retrieved. The json data is the argument. - errorfunction A callback function called when tweet retrieval errors. - templatesjson object A json collection with both the base and tweet templates. Example:

templates: {
  base:'<ul class="chirp">{{tweets}}</ul>',
  tweet: '<li><img src="{{user.profile_image_url}}"> {{html}}</li>'
}

Resources

Total 1 comment

#11124 report it
manolo at 2012/12/18 06:49pm
How to pass the template

I am stuck on how to pass the template json to this extension. How should this be done?

Leave a comment

Please to leave your comment.

Create extension
Downloads