MobileMe Gallery


Jump to MobileMe Gallery

|
WP Widget: Twitter

looks like this

•Description

Display twitter on your sidebar!

•Requirements

WordPress 2.6 environment
PHP version 5.1 or later

•Install

Place php file into your /wp-content/plugins/ directory and activate through the administration panel, and then go to the widget panel and drag it to where you would like to have it!

•Settings

Title: Title text for sidebar
Twitter ID: the twitter id
Max tweets: how may tweets you want to display, maybe 5, 10 or so
Profile: ON/OFF switch to display profile section
Profile Image: if checked, you can see yourself :P
Location: Display location text
Description: Display description
Display Image: If you check this, by clicking contents shows its linked image (currently, it supports only snipurl.com and twitpic.com)
Display reply: if checked, you can see “@” message which you wrote
Display time: time tweeted
Display source: in what application you used

*NOTE: according twetter specification, this application will cache your tweets. Its cache lives five actual minutes so you do not worry about traffic thing. If you want to empty cache, just open option panel and press ‘Done’ (no change requires).

•On your sidebar

bra bra bra

•Download

via WordPress.org

•Versions

* Jan 02 2009 – v0.0.1
- Initial release
* Jan 04 2009 – v0.0.2
- now data will be cached automatically
* Jan 05 2009 – v0.1.0
- Initial public release
* Jan 05 2009 – v0.1.1
- bug fix: http://twitpic.com
* Jan 05 2009 – v0.1.2
- new support: http://movapic.com (ke-tai hyakkei)
- support overflow on IE 6
* Jan 15 2009 – v0.1.3
- bug fix: source link is now open in new window
* Jan 29 2009 – v0.1.4
- added: date-time format configuration
* Jan 03 2010 – v0.1.5
- fixed: twitpic incompatibility fixed.
- added: display image option (when loaded)
* Jan 03 2010 – v0.1.6
- fixed: url position related bug
- added: hashtag link
* Jan 14 2010 – v0.1.7
- added: brightkite supported
* Jan 15 2010 – v0.1.8
- fixed: timezone issue

•If you like this

If you like this widget, writing small entry on your blog and trackbacking to this entry makes me really really happy!


37 Responses to “WP Widget: Twitter”

  1. Rolando

    Excellent plugin, thanks!

  2. V.J.Catkick

    Thanks Rolando, if you have any question, problem, etc, just comment here plz.


  3. Rolando

    Actually I do have a question. How do I change the time in the widget? Just like in your example above, it’s in military time. How can I make it regular time? In addition, it’s several hours off. Can it display my server’s time/ISP’s time instead?

  4. V.J.Catkick

    Rolando,

    I’ve just ‘hard coded’ time string in my widget. You can modify it by editing PHP file line 263 and 278. However, if you are not familiar with code editing, I do add ‘date/time formatting’ option on next version ‘todo’ list. Also, the date-time is pulled from twitter server so if you want to display other timezone, it is little hard to edit code. But I do add this to my list, too. Thank you.


  5. Rolando

    No problem about the time. If it was an easy fix, then I could try to do it myself.

    If it did the twitter time, that would be a good fix because my profile in twitter is set in my time zone.

    No rush. Thanks for your reply.

  6. V.J.Catkick

    Actually, I did updated Twitter widget to 0.1.4 and it contains date-time formatting option. It is already at repository so you will see auto-update at your dashboard shortly.

    Its time format is PHP time format, if you do not know PHP time format, check out somewhere around http://www.php.net/datetime this page.


  7. Rolando

    Thank you! I did the upgrade and I see the time format. So far I am using this code:

    n/j h:i A

    it displays the month and date without the leading zero and shows the hour and minute and AM or PM. But the time zone is still wrong for me. Do you know how I can make it so it shows AMERICAS/Los Angeles time zone? It’s about 8 hours ahead of twitters time at the time of this posting.

  8. V.J.Catkick

    Did you setup timezone at this page?
    http://twitter.com/account/settings

    I will double check my code from now.


  9. Rolando

    Yes I did. My setting on Twitter is set for Pacific Time.

  10. V.J.Catkick

    Rolando,

    I checked my code and xml file which Twitter generated then found something. Maybe your hosted server does not configure properly or its time zone setting is missing. Here’s what it goes.
    1) Twitter generate its time with GMT (default)
    2) My php file get GMT time stamp from XML file which Twitter generated.
    3) My php file uses date() function to generate local time stamp.
    The function date() automatically pulls time zone information from configuration at its local server. I’ve checked XML file and its time stamps are as same as mine.

    If you using PHP 5.0 or higher version, you can set timezone within my php file using with date_default_timezone_set(). Inset this function with your local time zone string between line 253 and 254. The code insert is:

    date_default_timezone_set( ‘America/Los_Angeles’ );

    try this.


  11. Rolando

    Awesome! that worked! Thank you very much!

  12. V.J.Catkick

    Oh yes and I am happy, too. Please do not forget to add that line each time I upgrade this plugin.


  13. Lee Smith

    Can I use this widget more than once on a sidebar?

  14. V.J.Catkick

    Currently, it is not possible to use more than one time, but if many people wanted to do so, I will re-write.


  15. olsield

    Trouble shooting: can’t see it the widget page.

    In the list of my activated plugins, I can see Widget Twitter VJCK.
    But, when I go to the Widget page, it is not there.
    Did not work with 2.5, nor with 2.7.1 after upgrade.
    Please help.

  16. V.J.Catkick

    I don’t now how it work on ver 2.5 of WordPress, and it only tested on 2.6 or later version. Why don’t you upgrade it to 2.6 or later version?


  17. Diogo Gomes

    Hi!

    I decided to mess a bit with your code and made it XHTML 1.0 strict compatible and added support for brightkite pictures.

    Please contact me through my email so I can send you my contribution

  18. V.J.Catkick

    Hello,

    I’ve emailed you about this.


  19. Huub

    Hi,

    I would really like to use this widget on my blog but get the following error,

    PHP 5.1 or later requires: no simplexml_load_file()

    Firefox tells me it switched to something called Quirks mode and my floatbox plugin stopped working. Somewehere on the wordpless forum someone mentioned having the same problem.

    I don’t have a clue, could you please help me.

    Ik really like this widget. Checked out a lot but this one is the one i wish to use.

    I think you did a great job here,

    Thanks Huub

  20. V.J.Catkick

    Hi Huub,

    That error message, ‘PHP 5.1 or ….’ means that your server (not your local computer) does not use PHP 5.1 (maybe 4.x) so if you can, ask your server administrator to upgrade PHP version. Or, some of them can upgrade it by yourself at server control panel if you have.

    Anyway, ask your server administrator, first.

    Thanks using my widget.


  21. Huub

    Hi

    Turned out my host provides PHP5.2.8 but by default .php extentions run on 4.x.

    I needed to change my .htaccess and added the following line to force all .php to run version 5.X

    AddType application/x-httpd-php5 .php .php4 .php3 .php5

    Thanks, it now works. Some css editing and it will look fine ;-)

    Greetz Huub

  22. V.J.Catkick

    That’s good to know! I am very happy you are using my widget twitter. It will soon update next version with one more image site supported.


  23. Ivan Carlos

    Great plugin! I just found 1 problem, they create automaticaly links for http:// text, but dont finish the link when find a space =/

    Example: I did a tweet as “bla bla bla http://cli.gs/Nq7nXd #absurdo”

    The plugin didn’t got just “http://cli.gs/Nq7nXd” and created an “<a href", they used all text found after http://, in this case "http://cli.gs/Nq7nXd%20#absurdo" – the plugin converted the space in %20 and created a long and invalid link =/

    anyway, tyvm! i'm using that =)

  24. V.J.Catkick

    Hi,

    Oh my, I forgot to fix this issue this time, but will fix this next update.
    Thanks!


  25. Nathan

    I just came to let you know about the same bug that Ivan found above.. :)

    Thanks for your efforts.

  26. V.J.Catkick

    Hi,

    I’ve just released fixed version so you can find new version (0.1.6) on your dashboard soon. With this update, I made hash-tag link, too.

    thanks all.


  27. SHea

    Hi! I was wondering what is the css code I can add to my stylesheet so i can edit the size of the entry fonts. (not the date or the location)

  28. V.J.Catkick

    Hi,

    By using following CSS code to change font for each time lines.

    #twitter_time_line li {
    font-size: 14pt !important;
    }

    Some of them, you need ‘!important’ to override it.


  29. Chris from onlinerakebackpoker

    Hi there, installed it and ticked all boxes to see what appears, added my twitter id (AA_poker) but the sidebar widget shows nothing except the header bar.

    Any idea where I’m going wrong?

    Thanks,

    Chris.

  30. V.J.Catkick

    Hi Chris,

    I’ve tried this issue with your account name on my test site:

    http://www.vjck.com/prototypes/

    and it looks fine, so maybe there’s some limitation on your server configuration (I am not sure). Try other twitter plugins and check what it happens.


  31. yoidoreoyaji

    便利に使わさせて頂いております。
    時間表示の件ですが、時間表示が米国時間になって日本時間になりません。

    変更する方法はありますでしょうか?

    宜しくお願いします。

  32. V.J.Catkick

    使って頂いてありがとうです。
    日付の件ですが、Twitterで設定したタイムゾーンを反映するように修正しておきました。

    Folks,

    Today, I’ve released 0.1.8 with fixing timezone issue. Now it’s reading Twitter’s timezone setting so you do not have to adjust it by yourself.


  33. Dax

    PHP 5.1 or later requires: no simplexml_load_file()

    I saw your earlier response, but I’ve changed my mind about adding a forum widget at all. I’ve deleted the plugin, but I still have the error. Is there a way to just get rid of ti altogether?

  34. Dax

    haha. I changed to 5 and it went away. Duh.


  35. sono

    Hi, great plugin. One question.

    I notice that you strip out URL’s and append them to the bottom of each twitter entry. This makes sense for displaying images but is confusing for URL’s that are part of a message. (I have the image option unchecked)

    Example:

    “I think I am going to let the domain reg for http://awesomeist.com expire unless someone can convince me that it is worth keeping alive”

    Displays like:

    “I think I am going to let the domain reg for expire unless someone can convince me that it is worth keeping alive
    http://awesomeist.com

    Would it be a difficult code change for me to remove the URL stripping functionality?

  36. V.J.Catkick

    hi, this is one concern i thought when i wrote code, too. i am looking for the solution for this (for example, if image url between sentences, and so on).

    anyway, i will fix this issue. thanks for comments.



Trackbacks

  1. Ways To Integrate Twitter Into Your Blog | Shaun Low

Leave a Reply

*First time to comment? Please comment in English or Japanese to avoid your comment as spam.

retaggr

TrackBack URL : http://www.vjcatkick.com/blog/wp-trackback.php?p=5475