This widget shows a Twitter timeline from RSS feed. It loads faster than Twitter widget for websites.
You can set up yRssTwitter widget with a configuration array. The allowed config variables are the following:
display
Type: boolean
Default value: true
For development purposes. It defines whether or not run the widget
displayName
Type: string
Default value: Why Not Soluciones
Name of your choice: eg. company name
twitterUser
Type: string
Default value: ynotsoluciones
The twitter user from which the feed will be grabbed (do not preceed whith @)
twitterActions
Type: array
Default value: array('reply'=>'responder', 'favorite'=>'favorito')
For internationalization purposes. Defines the text used for 'reply' and
'favorite'
tweetsToDisplay
Type: integer
Default value: 5
Number of Tweets that the widget will show
locales
Type: integer
Default value: array("es_ES.UTF-8", "es_ES@euro", "es_ES", "esp")
For internationalization purposes. Defines the locales used with LC_TIME in
order to set the timestamp to your timezone.
timeNames
Type: array
Default value: array('segundo', 'minuto', 'hora', 'día', 'semana', 'mes', 'año', 'decada')
For internationalization purposes. In this order: second, minute, hour, day,
week, month and decade. This is used to show the time from the Tweet's post.
minscript
Type: boolean
Default value: true
Defines if you are using minscript extension[1] or not. If true, the assets
will always be published in the same directory (crc sum of the asset name).
If minscript is set to false it will work with the assets common behavior.
twitterLogo
Type: string
Default value: dark
Allowed values: dark, light
Defines wich color scheme to use: dark (use with dark backgrounds) and light
(use with light backgrounds).
color
Type: string
Allowed values: css compliant colors
Default value: #361d27
Color used for the header (background color of the twitter logo and border)
and the footer.
linkColor
Type: string
Allowed values: css compliant colors
Default value: #361d27
Color used for the links of the widget
linkHoverColor
Type: string
Allowed values: css compliant colors
Default value: #FF6319
Color used for the hover selector for the links of the widget
$config = array( 'display' => true, 'displayName' => 'Why Not Soluciones', 'twitterUser' => 'ynotsoluciones', 'twitterActions' => array( 'reply'=>'reply', 'favorite'=>'favorite' ), 'tweetsToDisplay' => 2, 'locales' => array("en_EN.UTF-8", "en_EN"), 'timeNames' => array( 'second', 'minute', 'hour', 'day', 'week', 'month', 'year', 'decade' ), 'minscript' => true, 'twitterLogo' => 'dark', 'color' => 'black', 'linkColor' => 'green', 'linkHoverColor' => 'red' ); $this->widget('application.components.widgets.yRssTwitter.YRssTwitter', $config)
If you don't change names of files, just add the following line to the minscript config:
'minScript'=>array( 'class'=>'application.extensions.minScript.components.ExtMinScript', 'groupMap'=>array('cssgroup'=>array('assets/52ccd3ac/yRssTwitter.css') ) )
If you decide to change the name of the css, to find out the name of the asset directory, try the following:
$dir = sprintf('%x',crc32(NAME_OF_FILE.Yii::getVersion()) $result = 'asset/' . $dir . '/NAME_OF_FILE'
All the logos used in this widget are property of Twitter and comply with the "Using the Twitter brand and trademarks" from Twitter web page [3]
At the time of this writing, these are the guidelines followed:
Do: * Use our official, unmodified Twitter bird to represent our brand. * Make sure the bird faces right. * Allow for at least 150% buffer space around the bird.
Don't: * Use speech bubbles or words around the bird. * Rotate or change the direction of the bird. * Animate the bird. * Duplicate the bird. * Change the bird's color. * Use any other marks or logos to represent our brand.
If you feel that we are not following the current guidelines, please, let us know and we'll fix it as soon as possible.
[1] http://www.whynotsoluciones.com
[2] Minscript Extension
[3] http://twitter.com/logo
Total 3 comments
Hi,
I implemented this extension in Lii but I have got error : "Permission denied!" when run site. Can you help?
Hi andyofb!
No, it currently not perform caching on tweets. However, we're already working on it and will be available in the next release.
Does this do any caching on tweets? Would be great for performance
Leave a comment
Please login to leave your comment.