ThinkTwit
January 28, 2010

Stephen Pickett

Rate this post:
1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

You may or may not have noticed but at the bottom right hand of our homepage we’ve had, from the beginning, a little “window” that contains our latest tweets from Twitter. Up until now this module has monitored the ThinkCS Twitter account and all tweets had to be manually “retweeted” in order to to get updates from the various Think contributors.

After much effort searching for and testing out different modules, we discovered that there is no Wordpress module available that would allow us to list the tweets of multiple Twitter users. The few that we could find either took tweets from a single user, or simply didn’t work.

I was able to find a piece of code written by another user, and further modified by someone who also found this code useful. After a bit of testing it proved that this code was very effective and so I decided to reimplement this on our site. Satisfied that the new, heavily modified code worked successfully we decided that we would like to give back to the community and help out others in our situation by turning this code in to a Wordpress Plugin, thus simplifying the installation so that any user – even those new to Wordpress – can easily implement the same functionality.

I’ve created a new page on the Think website to support this new plugin, named ThinkTwit, which is additionally hosted at on it’s own page at Wordpress Plugins.

This is the first full contribution that Think has made to the open source community (in the past we have only submitted code fixes) but we plan for many more to come. We hope someone finds this plugin useful, and if so please let us know how you get on with an example of it’s use!

, , ,

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...

22 Responses to “ThinkTwit”

  1. #1 by Ciaula on January 30th, 2010

    I uploaded your plugin on my wordpress blog but when I try to modify the settings in the admin panel and click on “save chenges” i have this error messagge:

    Warning: Cannot modify header information – headers already sent by (output started at /wp/wp-content/plugins/thinktwit/thinktwit.php:12) in /wp/wp-includes/pluggable.php on line 868

    Please help me. TY so much

  2. #2 by Stephen Pickett on February 2nd, 2010

    Sounds like you may have an error in your functions.php file. Back it up and try uploading a fresh copy from your Wordpress zip file. There’s more about this here:

    http://wordpress.org/support/topic/267604?replies=17

    Please let me know how this goes.

  3. #3 by Ciaula on February 2nd, 2010

    I tried to replace functions.php in the theme folder and in the wordpress but i still have the sanme error. Can u help me? TY so much for your reply

  4. #4 by Stephen Pickett on February 3rd, 2010

    I’ve made some changes to the code which, if the error is in my code, will fix it. The server is inaccessible at the moment but as soon as it is available I’ll upload the changes, so keep a look out for an update to the plugin.

    If this doesn’t fix it then the problem is elsewhere. I assume you’ve not had a problem updating the settings of other plugins?

    What version of Wordpress are you using? And what web server are you using e.g. Apache on Linux?

  5. #5 by Scribo on February 4th, 2010

    Hello, and thanks for a superb plugin!
    I am in the process of building my site, and do not know coding too well.
    One question: Is it possible to get a box around the tweets, as it gets the headline, and as my other widgets gets automatically adjustet to my theme? Pls. see site: http://www.scribo.no
    Again, I am very impressed !

  6. #6 by Stephen Pickett on February 4th, 2010

    Hi Scribo, no problem – I’m glad you’ve found it useful. Ok to implement the changes you require do the following:

    1. In the settings change <ul> to <div class=”widgetcontent”><ul class=”enhanced-recent-posts”>
    2. Change</ul> to </ul></div>

    I’ve uploaded some new changes, so you should find version 1.0.4 available soon. I’d suggest either installing this first or making these changes and noting your settings before upgrading.

    I’m due to make more changes soon to allow it to work more correctly as a widget and this should resolve the remaining formatting issues that you can see once the changes are implemented.

  7. #7 by Scribo on February 4th, 2010

    Hello again, thank you for the swift answer!

    1 Alas, I tried to paste your code in TwinkTwit settings but no change and no box.
    (I have upgraded to latest, thanks!)

    Some other, not urgent questions
    2 The new box: title will not respond, i guess I can edit it directly as before
    3 Is it possible to open links in new windows when clicked from the feed?
    4 How to move and align the feeds to the left

    Thanks again for your time, .!
    Scribo

  8. #8 by Ciaula on February 5th, 2010

    TY. Everything is ok now. Ty so much. So appriciated! TY!

  9. #9 by Stephen Pickett on February 9th, 2010

    Ciaula – I’m glad this has resolved your issue.
    Scribo – I’ve fixed the title and have also added code for new links – please test and let me know if it’s ok. I’ve done my own testing and it seems ok. If you can hang on for a bit longer your other issues will be resolved when I correctly implement the widget API, I believe. Will try and get this up this week but it may have to wait until next depending on my workload.

  10. #10 by Kjell Martin Bovre on February 9th, 2010

    Thanks Stephen. Items 2 & 3 on my posting here now seems to work flawlessly. I`ll wait for the other items :-)

  11. #11 by Stephen Pickett on February 11th, 2010

    Hi Kjell, I’ve just uploaded version 1.1.0 which implements the widget API. Please download this and give it a go. I’m hoping it will work correctly now with your theme to correct those issues – please let me know how it goes!

  12. #12 by Kjell Martin Bovre on February 11th, 2010

    Hi Stephen. This is looking very good! I had some problem when upgrading, got message posted:
    Warning: extract() [function.extract]: First argument should be an array in /home/1/s/scribo/www/wp-content/plugins/thinktwit/thinktwit.php on line 88
    Deactivated and reinstalled and activated, and looks good externally, but now gets the same message on widget panel every time i try to edit from admin on widget,.
    Works perfectly though. Seems the right txtaligment comes a bit too close to the border.
    But this is good work. I`ll be faithful to Thinktwit when I continue to build my site :-)

  13. #13 by Kjell Martin Bovre on February 12th, 2010

    One question Stephen. I guess the error has something to do with my caching.. I am no expert in coding etc. Is there a way to avoid caching on homepage of ThinkTwit when using W3 Total cache?

  14. #14 by Kjell Martin Bovre on February 12th, 2010

    Seems it works now. Unchecked: “Cache RSS / Atom feeds (site, post, post comments)”. (Not too difficult to understand, but I am a newbie)..the error message lingers though.
    Best regs. Kjell

  15. #15 by Kjell Martin Bovre on February 12th, 2010

    No. Will not work om homepage when allowing for atom feeds. Recents posts etc. works fine. Txt aligment worse.

  16. #16 by Stephen Pickett on February 16th, 2010

    Hi Kjell, I’ve made an update that should fix this (I believe). Get the latest version and re-enable the caching (it’s unrelated to ThinkTwit). You’ll probably need to play with the CSS to get the formatting correct but I’ve added some pointers in the readme. I’d suggest you at least add the CSS for span.thinkTwitPublished so that it appears below your tweet, rather than squashed up to it.

    Thanks, I really appreciate your feedback and assistance in improving ThinkTwit, and also your loyalty! :)

  17. #17 by Kjell Martin Bovre on February 17th, 2010

    Thanks, have upgraded and playingg with css :-)

  18. #18 by Kjell Martin Bovre on February 27th, 2010

    Hi again. Is there a way to avoid thinktwit being cached in caching plugins like w3 total cache or wp super cache?…is there some strings I could add in their exception lists etc.?

  19. #19 by Kjell Martin Bovre on February 27th, 2010

    Am I on the right track with this, which is copied from http://wordpress.org/extend/plugins/wp-super-cache/faq/ …: (or am I on the wrong planet..):

    How do I make certain parts of the page stay dynamic?
    WP Super Cache retains the dynamic loading code of WP Cache but only works in “half on” mode.

    There are two ways to do this, you can have functions that stay dynamic or you can include other files on every page load. To have a dynamic function in the cached PHP page use this syntax around the function:


    The HTML comments around the mirrored PHP allow it to be executed in the static page. To include another file try this:

    That will include file.php under the ABSPATH directory, which is the same as where your wp-config.php file is located

  20. #20 by Kjell Martin Bovre on February 27th, 2010

    Sorry, was not able to copy paste all, but u have the link

  21. #21 by Stephen Pickett on March 1st, 2010

    Hi Kjell, I’ve read through how W3TC and WPSC work and I don’t think it’s possible to exclude plugins from them, but only specific pages. Your best bet is to contact the makers of those caching plugins and ask them specifically as they will have a far better understanding of how to do this if it is possible. Good luck! :)

  22. #22 by Stephen Pickett on March 2nd, 2010

    FYI – ThinkTwit development has moved to http://www.thepicketts.org/thinktwit/

Leave a Reply

Enter your E-mail address below to subscribe to Think Consulting Solutions by E-mail.

Close