Outputs tweets from one or more Twitter users. Activated through the Widget interface, shortcode or Output Anywhere (PHP function call)
Author: | Stephen Pickett (profile at wordpress.org) |
WordPress version required: | 3.2 |
WordPress version tested: | 5.8.1 |
Plugin version: | 1.7.1 |
Added to WordPress repository: | 22-01-2010 |
Last updated: | 17-08-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 90 |
Rated by: | 4 |
Plugin URI: | http://www.thepicketts.org/thinktwit/ |
Total downloads: | 14 070 |
Active installs: | 50+ |
Click to start download
|
ThinkTwit is a highly customisable plugin that can output tweets from multiple users (something that very few other plugins can do successfully), #hashtag or keyword. It uses the Twitter Search JSON API v1.1 to access tweets which can be cached. It is very simple, yet flexible and easily customised. It can be placed on your WordPress page simply through drag and drop on the Widgets interface or through the use of Shortcode or Output Anywhere (PHP function call). Supports i18n!
Support: http://www.thepicketts.org/thinktwit/ or on Twitter @stephenpickett
Features:
- Can be configured from Widgets settings (if displayed in sidebar)
- Can be implemented using shortcode or Output Anywhere (PHP function call)
- Contains default slimline CSS for integrated look and feel (can be turned off)
- Easy to configure and customise (through settings and CSS)
- Multiple instances can be deployed (like other widgets/plugins)
- JavaScript is not required (unless no-caching is activated)
- Can specify multiple usernames
- Tweets can be filtered by #hashtag or keyword
- You can select to filter between an AND or OR filter to either show tweets only containing specified usernames and hashtags or any of them
- Can specify maximum number of tweets to display
- Can specify maximum number of days back to display
- Supports no-caching, to prevent caching of tweets by caching engines such as WP Super Cache
- Supports cURL as a fallback method, if necessary
- Supports optional caching of tweets and avatars
- Cache can be manually cleared and will automatically update if the cache is empty
- Can display the avatar of the Twitter user
- Output can be filtered (using apply_filters)
- Can optionally output “Follow @username” links
- Automated cleanup process that runs periodically according to user setting
- Internationalised using i18n meaning that if it isn’t in your language it’s easy to translate! See Other Notes for more details
- Gracefully deals with Twitter errors and adds them to the PHP error log
- Supports live updates of tweets when using no-caching (AJAX)
Requirements/Restrictions:
- Works with WordPress 3.2 to 5.7.2, not tested with other versions nor re-tested on older versions than most current
- Can be installed using the widgets sidebar
- Can also be used via shortcode or Output Anywhere (PHP function call)
- Uses Twitter REST API v1.1 Application-only authentication and therefore requires an application key (see installation)
I am looking for more people to translate ThinkTwit in to other languages, if you are interested please see “Internationalisation (i18n)”
under “Other Notes”.
Uninstall
To uninstall simply deactivate and then delete through the Plugins admin interface. All options and files will be automatically removed.
Internationalisation (i18n)
Currently the following languages are supported:
- es_ES – Spanish in Spain (many thanks to Maria Ramos for contributing)
- en_GB – English in Great Britain (default)
- sr_RS – Serbian in Serbia (many thanks to [Ogi Djuraskovic] (http://firstsiteguide.com/) for contributing)
If your language is not listed and you would like to translate in to your language please do the following:
- Navigate to thinktwit/languages and take a copy of thinktwit.pot.
- Open in the language editor of your choice e.g. POedit.
- Translate each line until you’ve done them all.
- Save as thinktwit-lang_COUNTRY.po e.g. thinktwit-en_GB.po – see List of all Locales for more.
- Go to Contact and fill in the form appropriately.
- I will get in touch and ask that you respond with the translated file and a link to your site (if desired).
Screenshots
screenshot-1.png shows ThinkTwit working as a widget on the the ThinkTwit development homepage showing just usernames
screenshot-2.png shows ThinkTwit working as a widget on the the ThinkTwit development homepage showing just hashtags
screenshot-3.png shows ThinkTwit working as a widget on the the ThinkTwit development homepage filtered by usernames and hashtags
screenshot-4.png shows ThinkTwit working via shortcode within a blog post on the the ThinkTwit development homepage
screenshot-5.png shows ThinkTwit working via a Output Anywhere (PHP function call) in the header of the ThinkTwit development homepage
screenshot-6.png shows the settings that can be configured within the widget
FAQ
When I add the widget I cannot expand the menus, what is wrong?
There is a known issue where the ThinkTwit sub menus will not expand after you add a widget for the first time. Please simply reload the widgets
page and it will now work going forwards.
ChangeLog
1.7.1
- (17 Aug 2021) Sanitised multiple inputs and escape output to remove further risk of cross site script security or injection issues and fixed an issue
where CSS was shifting images to the left instead of just avatars – added a class “avatar” to images
1.7.0
- (03 Jul 2021) Modified logo and banner to remove risk of copyright issue, sanitised multiple inputs and outputs to remove risk of cross site script
security or injection issues, replaced file-access and cURL with wp_remote_get(), made an improvement to calling default CSS file and now stores avatars
in the uploads directory instead of within the plugin directory
1.6.6
- (15 Dec 2018) Confirmed compatibility with WordPress 5.0.1, fixed an error when saving settings for the first time and updated upgrade code to
ensure that it triggers for all version older than 1.6.0
1.6.5
- (10 Dec 2015) Fixed an incompatibility with WordPress 4.4 by renaming the Error class to ThinkTwitError
1.6.4
- (16 Aug 2015) Removed support for PHP 4 style class constructors, fixed “Reset Settings” function in the widget, added automatic live update
functionality when using no-caching (AJAX) and fixed an issue within no-caching where the admin-ajax page was not found
1.6.3
- (07 Mar 2015) Added support for the Serbian language – many thanks to Ogi Djuraskovic of http://firstsiteguide.com for this!
1.6.2
- (16 Feb 2015) Very minor update for cURL users – fixes an issue where getting the token fails as it is not using cURL
1.6.1
- (28 Jan 2015) Change use of “<?=” to “<?php echo” for older versions of PHP that may not have “short_open_tag” turned on, fixed the uninstall
process, fixed an error when storing cache names but none have previously been stored and made a small change to the widget form to simplify
saving of widget settings, added shortcut links to the plugin page (Settings, Support and Donate), added a redirect to Settings page after
installation (or activation when consumer key or secret is missing) and added a “Paused” option to “Update frequency” to prevent the cache
from updating
1.6.0
- (26 Oct 2014) Fixed an issue with tweets not always being picked up from Twitter due to too many requests for the authentication token, fixed
cleanup process not running, added translation to some missed areas, fixed a warning when filtering out old usernames, fixed the conversion of
relevant Tweet content that wasn’t being correctly turned in to links, updated the AJAX handler to use the recommended method (using
admin-ajax.php), updated the Twitter Follow Button to use the new code but also used the IFRAME method to ensure it works with “Prevent Caching”,
added a Clear Cache button in the Settings, added the ability to filter usernames and hashtags using AND or OR searches, added code to load
tweets when caching is turned on but the cache is empty, updated the Tweet object (which holds all tweets) to add some functionality and more
clearly define the content and functions, and added logging functionality to log error messages to PHP error log
1.5.3
- (16 Apr 2014) Very minor update to Settings page where expected values not appearing throws a warning, and also updated compatibility version
in readme
1.5.2
- (29 Mar 2014) Big improvements to debugging: amended debug output to add the frequency of updates and use of no caching, put the messages in
order of how they appear in the widget menu, now output actual menu options names and values rather than system values, and added formatting to
aid identifying option names. Additionally, removed a potential security vulnerability that could allow an unauthorised user to write to the
images folder and added a setting to allow the default style sheet to be turned off
1.5.1
- (09 Feb 2014) A user of another plugin (AI Twitter Feeds) that had borrowed the follow button code reported an issue that was a result of
an update to the follow button script from Twitter. This basic update simply updates the script so you should no longer get the following
error: “Uncaught ReferenceError: twttr is not defined”
1.5.0
- (25 Nov 2013) Fixed an issue preventing hashtags from working properly and added i18n internationalisation support, with Spanish the first
language to be supported – many thanks to Maria Ramos at webhostinghub.com!
1.4.4
- (13 Nov 2013) Replaced use of split() with explode() as the former has been deprecated, allowed entering of empty usernames and hashtags,
fixed the API call so that it doesn’t search for mentions of the first username but actually searches for tweets by the first username
and re-instated an updated version of the old avatar deletion code which runs periodically and takes account of tweets added from chosen
hashtags
1.4.3
- (19 Oct 2013) Updated the readme.txt, and both shortcode and Output Anywhere as there were some inconsistencies in naming but also some of
the instructions were out of date and hence wrong. Should resolve any issues anyone is having with either of these or with multiple usage
on one page
1.4.2
- (14 Sep 2013) Renamed constants to prefix with ThinkTwit so that they don’t interfere with constants from other plugins, changed help on
setting up Twitter app as name needs to be unique, added hashtag filtering in cache, added ability to search for hashtags without usernames
and changed hashtag searching to be OR rather than AND
1.4.1
- (02 Jun 2013) Corrected failure to update ThinkTwit version stored in the database, made a minor addition to the new settings page that
additionally outputs other information (version, cache names and date of last update to cache) that is stored in the settings which may be
useful/interesting, fixed failure to limit number of tweets by specified value when showing live updates and fixed the follow button not loading
when using no-caching
1.4.0
- (25 May 2013) Updated to use Twitter REST API v1.1 – please note that after 11th June 2013 any version of ThinkTwit below 1.4.0 WILL NOT WORK
due to changes in Twitter’s API. You MUST follow the instructions in Installation in order to make ThinkTwit work with this new version – please
read these before upgrading/installing!
1.3.11
- (30 Mar 2013) Modified “Live (uncached)” mode to clear out the cache so that it can be used to refresh your cache and fixed display of
hashtags that was causing a search error in Twitter (if you are caching tweets please set to uncached to clear out the incorrect tweets and
then you can start caching again)
1.3.10
- (14 Oct 2012) Altered the way ThinkTwit downloads avatars so that it now uses the profile image URL from the JSON output, added a check to
ensure that tweets were actually returned from Twitter and made a change to prevent output of Follow script if Show follow links is no
1.3.9
- (13 Sep 2012) HOTFIX: Twitter have deprecated output of XML on the Twitter Search 1.0 API which itself has been deprecated which has caused
strange output resulting in italics everywhere – this update switches to JSON on the version 1.0 API to immediately fix the issue until
ThinkTwit can be re-written on the Twitter Search 1.1 API
1.3.8
- (09 Sep 2012) Minor update: added “Reset Settings” link to options and replaced settings roll up workaround with proper jQuery code
1.3.7
- (02 Sep 2012) Added the ability to filter tweets by hashtag/keyword (thanks to Martijn Pantlin for the code), improvements to data loading
when entries do not exist (rare, mostly during upgrades) and the option to show “Follow @username” links
1.3.6
- (14 Aug 2012) Removed code which was potentially incorrectly removing non-images (especially root index.php) when deleting old avatars
1.3.5
- (11 Jul 2012) Added code to delete old avatars (doesn’t work if owner of avatars is different to running process), supress errors on chmod
and delete of directories and added code to remove all options on uninstallation
1.3.4
- (24 Jun 2012) Detects when Twitter displays a redirect URL when using the avatar API and downloads avatar from that URL instead, ignores
errors when trying to get the file size of an avatar or when getting tweets and checks if the avatar that is supposed to be displayed exists
1.3.3
- (02 Jun 2012) get_twitter_avatar() replaced with Twitter avatar API, added ability to cache user avatars and changed wording of TIME_1_DAY
from “about a day ago” to “yesterday”
1.3.2
- (12 Feb 2012) Added ThinkTwit versioning for making future upgrades more smooth, removed extraneous parameter when calling sort_tweets
and added settings that stores current ThinkTwit version and a list of all the cache names used
1.3.1
- (10 Nov 2011) Minor fix to resolve “file_get_contents” bug introduced in 1.3.0
1.3.0
- (25 Oct 2011) MAJOR UPDATES:
- Re-organisation of FAQ and installation instructions
- Author renamed to username in various places for consistency
- Some db names renamed for consistency
- Use of apostrophes changed for consistency
- Renamed PHP function call (thinktwit_output) to output_anywhere and altered it to use args instead of listing each parameter
- Moved shortcode and Output Anywhere functions in to ThinkTwit class
- Added more default value constants
- Introduced default stylesheet
- Fixed time output error when using no-caching
- Added no-caching to shortcodes and Output Anywhere
1.2.2
- (14 Oct 2011) Fixed incorrect PHP function call example in FAQ, fixed incorrect “Show Username” type in FAQ, fixed incorrect
boolean values in FAQ, removed silly copyright statement in comments, added link to FAQ within Plugins description to aid use
of shortcode, fixed (intermittent) bad check of boolean for displaying avatars and function call and added limit to the maximum
days of tweets to be output (NOTE: if upgrading and already using PHP function call please add the max_days parameter after limit
- parameter 5)
1.2.1
- (07 Aug 2011) Added donation links and expandable menus within the widget settings
1.2.0
- (05 Aug 2011) MAJOR UPDATES:
- Massive update to the readme, including updated screenshots
- Re-write of code to make better use of object orientation and private/public functions
- More flexibility in shortcodes and output anywhere function (thinktwit_output) – including ability to use caching
- Introduced ability to alter time output text e.g. “This happened 16 minutes ago”
- Added class to style error message when using AJAX
- General readability improvements to code
1.1.10
- (05 Jun 2011) Added ability to apply your own filters and added nofollow tags to links
1.1.9
- (29 May 2011) Added ability to target individual tweets, odd and even tweets, content and author suffix and linked the avatar to the
user’s profile
1.1.8
- (28 May 2011) Added ability to include the Twitter poster’s avatar
1.1.7
- (14 May 2011) Fixed cache not saving with the widgetid (meaning all instances will share the same cache), allows cache size to grow
and shrink according to the size limit in the widget settings, only outputs cached tweets by users whose name is in the usernames list
within settings and sorted methods in to alphabetical order to aid searching of methods
1.1.6
- (13 May 2011) Fixed caching to prevent over-writing of cache and ensure it instead adds them to it (removing anything at the end if
necessary) and added live option that uses the cache (so you can check for updates and update the cache before displaying cached tweets,
this ensures that if Twitter is not available it will still display tweets)
1.1.5
- (22 Apr 2011) Added caching of tweets (optional) and added tweet shortcodes
1.1.4
- (09 Mar 2010) Removed some extranous code, added option to show username or Twitter name and changed list to ordered list for semantics
1.1.3
- (03 Mar 2010) Minor change where a variable was being over-written but it had no real affect and updated screenshot-2.png
1.1.2
- (03 Mar 2010) Added no-caching (to prevent ThinkTwit from being cached by caching engines), an option to use CURL to access
the Twitter API, optional debug messages, updated readme and moved development to http://www.thepicketts.org
1.1.1
- (16 Feb 2010) Removed unnecessary PHP command that was causing annoying error in widget screen (though not causing a problem) and
updated readme with new FAQ and uninstall instructions
1.1.0
- (11 Feb 2010) MAJOR UPDATES:
- Rewritten 80% of the code to correctly use widget API
- No longer need to spexify suffixes and prefixes – correctly hardcoded to use unordered lists
- Added classes for more flexible CSS changes
- Original settings page removed – all settings now made in widget NOTE: TAKE NOTE OF YOUR SETTINGS BEFORE UPDATING!
- Updated default CSS for basic use – please replace original with this and update as necessary
- No break spaces (” “) no longer required to replace spaces in settings
- FAQ removed as there was only one question that is no longer relevant
- Updated screenshots to reflect new settings configuration
1.0.6
- (09 Feb 2010) Added temporary “no tweets in the last 7 days” notice (if no tweets are visible) until caching is implemented
1.0.5
- (09 Feb 2010) Fixed title not being saved in Settings, also added option to open links in new window and added FAQ to the readme
1.0.4
- (04 Feb 2010) Added option to change the widget title and replaced spaces with no-break spaces ( ) in default username suffix
1.0.3
- (03 Feb 2010) Removed some spaces at top of file that may be causing issues for some people
1.0.2
- (03 Feb 2010) Removed automatic deletion of database fields on deactivation and updated readme
1.0.1
- (27 Jan 2010) Fixed incorrect output of ampersands and apostrophes
1.0.0
- (21 Jan 2010) Initial Release