PDA

View Full Version : Twitter Widget 0.3



JonH
02-24-2010, 06:33 AM
Twitter Widget
Version: 0.3
Author: Jon H
Created on: 2010/02/24
Last Updated: 2010/06/17
Tested on: HotaruCMS 1.3.0
Plugins Required: widgets
Plug & Play: Yes
Supported: No

Description
Twitter Widget is a sidebar widget that shows your sites Twitter follower count and friends (people you follow) tweets

Instructions
1. Upload the "twitter_widget" folder to your plugins folder. Install it from Plugin Management in Admin.
2. Go to the Twitter Widget settings and enter your Twitter username and password.
3. Turn widget on in the main "widget" plugin settings panel in admin.
4. You can set up this widget to diplay your own tweets or your followers by editing twitter_widget.php,.

Special thanks to Antonio Lupetti - See tutorial at http://woork.blogspot.com/2009/06/super-simple-way-to-work-with-twitter.html (http://woork.blogspot.com/2009/06/super-simple-way-to-work-with-twitter.html)and the Twitter API Wiki.

This widget utilizes Hotaru's smartCache feature to get around Twitters 150/hr API call limit (Thanks Nick!). It will only update every 10 minutes or when a new story is posted this is why the Submit plugin is needed.

If your site is in debug mode you can see how many hits you have left that hour before you get to the 150/hr limit. See example pic.

584

This plugin can be highly configurable - the Twitter API's the limit!

Revision History
v.0.3 2010/06/17 - Alan - Made suggested options for changing look of widget into admin settings section
v.0.2 2010/05/27 - Nick - Removed requirement to have SB Base installed
v.0.1 2010/02/24 - JonH - Released first version

Please click "Rate Thread" and give this plugin a rating. Thank you.

JonH
02-24-2010, 06:50 AM
There's a few settings you can change in twiiter_widget.php.

To show your own tweets instead of your friends change line 100 to


$xml = $twitter->getUserTimeline();


To show more tweets text characters change line 108 (up to 140)

To show date and time friends posted uncomment line 139

To show more friends tweets (up to 20) change the number 6 on line 130 (up to 21)

To use the top "follow us" part as a twitter badge (no friends tweets) remove or comment out lines 128 thru 143

There's more to play with if you read up in libs/twitter_lib.php

zigstonk
06-16-2010, 08:36 PM
Hi JonH:

Great plug-in. Many thanks.

How did you get your image to appear in the header? I can only get the CSS to change the background color, although I've got the following in the file now (I altered the image you had in the original plug-in, uploaded to my host/server, but can't get it to appear in FFox or IE):

.twitter_header{
background: #B3ECEF url(content/plugins/twitter_widget/images/twitwidbgj.gif) no-repeat left center;
height:48px;
padding:6px;
border-top:solid 1px #DEDEDE;
border-bottom:solid 1px #DEDEDE;
}

Any insight is greatly appreciated!

JonH
06-16-2010, 10:56 PM
Did you upload the image to the correct directory and give the same name as the original? It might also shift if it's not the same size.

Sorry it's been awhile and I don't have a Hotaru site running right now.

zigstonk
06-16-2010, 11:30 PM
Did you upload the image to the correct directory and give the same name as the original? It might also shift if it's not the same size.

Sorry it's been awhile and I don't have a Hotaru site running right now.

Thanks for responding. I'll double-check everything again. Just wanted to make sure I wasn't missing something...

shibuya246
06-17-2010, 03:58 AM
There's a few settings you can change in twiiter_widget.php.

To show your own tweets instead of your friends change line 100 to


$xml = $twitter->getUserTimeline();


To show more tweets text characters change line 108 (up to 140)

To show date and time friends posted uncomment line 139

To show more friends tweets (up to 20) change the number 6 on line 130 (up to 21)

To use the top "follow us" part as a twitter badge (no friends tweets) remove or comment out lines 128 thru 143

There's more to play with if you read up in libs/twitter_lib.php

Thanks for these ideas. I have now included these in the admin settings for this plugin and updated the file to v 0.3

1160

angolanmade
08-28-2010, 06:49 AM
Has anybody been successful in displaying the users timelines. Ive setting "Timeline to show" to users but it still display my accounts timeline.

Thanks

JonH
09-09-2010, 04:11 AM
Has anybody been successful in displaying the users timelines. Ive setting "Timeline to show" to users but it still display my accounts timeline.

Thanks

Twitter just went live with Oauth a few weeks ago, this plugin along with the Twitter thumbs need updating. :(

yes
09-27-2010, 07:41 AM
The twitter background pic with the blue bird is partially cut off on my site. I'm using the shibuya theme if that matters. BTW, what is the difference between this plugin and Twitter Thumbs 0.2?

drvosjeca
01-26-2011, 10:28 AM
im having problems with this plugin, no twits are showing up...?

petsagouris
01-26-2011, 11:40 AM
Please notice you are posting in the Deprecated Plugins Forum.
In the description of the forum it reads: "Old plugins that should no longer be used. These may have been replaced with alternatives or are simply incompatible with the latest version and are not being updated."

drvosjeca
01-26-2011, 03:20 PM
so where can i find new twitter plugin??? I was looking on forum but no luck

petsagouris
01-26-2011, 03:47 PM
Please don't search the forums.

drvosjeca
01-26-2011, 03:55 PM
why not??? what is a problem?

Nick
01-29-2011, 02:20 AM
This plugin is deprecated because it hasn't been updated to work with oAuth. If someone makes that update, the thread can be moved back into Plugin Downloads.

hotaruuser
12-23-2011, 04:57 PM
Ah, thats why it does not work :D LOL, must have tomatoes on my eyes.. how do you say this in english... :D

But, for anybody who wants this, twitter itself provide widgets like this...

Just type "twitter widget" in your favourite search engine...

romancos
12-30-2011, 03:01 PM
I have v0.3 on hotaru 1.4.2 and it doesnt show any timeline neither for self, nor users, simply follow us badge. Kinda useless

PuckRobin
12-31-2011, 08:02 AM
I have v0.3 on hotaru 1.4.2 and it doesnt show any timeline neither for self, nor users, simply follow us badge. Kinda useless

Are you aware that you are writing to "deprecated plugins" (i.e. not supported, should not be used) forum title?

romancos
12-31-2011, 12:34 PM
My bad, I just found text_widget and pasted twitter widget code with custom colors and options. Thank you for that plugin.