Joomla Extensions

CLUB

RokTwittieLatest Version: 0.9

RokTwittie

Versatile Real Time Twitter RokTwittie provides a means of transporting the various aspects of Twitter, such as your tweets, your profile information and plus much more, into your Joomla. Perfect for any site with a Social edge.

The configurability of the module is its best feature, allowing you to choose which aspects you wish to show which can result in a short, contracted module or a full page of tweets, searches and information. Tweak the Twittie to your liking.

NOTICE: If you experience the Fatal error: Call to undefined function curl_init() error then you need to have CURL enabled on your server. You can ask your hosting provider to activate this.

List of Features

  • Real Time Tweets: dynamic updates from Twitter for your tweets
  • Search: use the inbuilt search to scan for usernames or keywords to show in RokTwittie
  • Profile information: showcase your profile details, such as name, avatar and bio
  • Fast Loading: the module has been built for speed and performance
  • Highly configurable: with a fantastic amount of options, the module can be changed easily to your own personal preferences

Screenshots

As with almost all of our new extensions since January, RokTwittie is to be considered a standalone module. This means that it comes up with a default style and has been tested on a Joomla! default installation, so that you can install it in other templates and just make the desired CSS tweaks. For this article, I have RokTwittie installed in a default Joomla! 1.5 install, as the screenshot below shows. The screenshot has been split into three sections, of which each will be explaining further in the article.

RokTwittie - Versatile Real Time Twitter

Each of the three sections above is independent and can be enabled/disabled exclusively. For example, if you just want to show your latest 5 updates, you can easily disable the status and the search options.

History

RokTwittie first made an appearance with the June 2009 Joomla Template Release, the Refraction template. You can see its various configurations in action on the demo (link previous).

Installation - Joomla 1.5


Downloading the Extension Files

  • RokTwittie Module (mod_roktwittie.zip) This file is the module package you will use to install RokTwittie into Joomla.

Using the Joomla Installer

From the Menu in your Joomla Administrator, go to Extensions → Install/Uninstall.

Next, browse for your mod_roktwittie.zip file you downloaded and then click Upload File & Install.


installation


Accessing the Module Page

Next, go to Extensions → Module Manager. From the list, find RokTwittie and open it to be brought to the RokTwittie Module Manager page, which lists all the available options for the module.


How Does it Work?

RokTwittie is entirely reliant on the Twitter API. The status uses the REST API Methods while updates and search both use Search API Methods.

Although there are some limitations with the API, we have tried our best to circumvent these issues, to provide you with a functional, solid, fast and complete extension.


Rate Limiting

One example of a limitation is the rate limits, that affects only the status section. Due to the ever increasing popularity of Twitter and the applications that rely on it, Twitter has recently restricted the API to be hit 100 times only, per IP, per hour. It is low because the status is built via PHP by the extension (while the updates are built via JavaScript), so even if you have 100 different users loading your site, the requests to the API for the status will always come from the server hosting this extension, which means the IP is always the same and would be very easy to reach the 100 limit in no time. Moreover, if you have your desktop Twitter application running, you are browsing Twitter via twitter.com and you are also using RokTwittie, all the three make a hit for each one and again, in no time, you would have reached the limit.

On the other hand though, the statuses are not something that gets updated very often. This forced us to introduce a RokTwittie cache system, that we really encourage you to keep enabled. At the first retrieval of the data, all the statuses info are stored in a cache db and for the amount of time you have set in the parameters option, the cache db will be read and served as if it was fresh data. If the cache time is exceed, the data will be gathered again from Twitter and cached again. Not only was this the solution for the rate limits, but it increases, exponentially, the site's speed.

The updates and search sections of RokTwittie rely on the Twitter Search API. There is also a rate limit, but it is much higher than the 100 of the REST API. Moreover these two sections have their data retrieved by the client so that they do not rely on the server hosting the extension and consequently, hitting the rate limit is a hard task to accomplish. We then opted to not include any sort of cache system for it due to updates and search requiring almost constant fresh data.

If you already have RokTwittie installed, you will see there are fields to enter your own Twitter username and password. These fields are optional, RokTwittie will function correctly even if these fields are left empty. The only reason you would use these account fields is because Twitter provides a whitelisting service, allowing anyone to increase their Rate Limits up to 20000 hits per hour, tied to the account and/or the IP. if you know your site is going to require more than 100 hits per hour per ip, you can fill out the whitelisting request form. RokTwittie is already configured for the whitelisting, all you have to do is send your request to Twitter, in order to enter their whitelist. Then fill your account details into RokTwittie params. RokTwittie will do the rest.

More details about Rate Limiting (source: twitter.com).


API requests

Another example are the requests to obtain the fresh data. Due to the way the Twitter API works, we could not provide all the bits by a single request. Taking an example, the screenshot above, which shows everything enabled, there are 3 API requests. However, in that screenshot the 'following' count is 0, if it was higher and the option to show 'following' icons was enabled, that would have cost two more requests, for a total of 5. So a simple account with all options enabled and having one or more 'following' icons showing, costs the total of 5 requests.

Consider also that 5 requests for status and 'following' icons are to be considered per user. If you are going to show more than one user, you have to double the requests count.


Search Queries

Thanks to the search section of RokTwittie, you can specify a query of terms that will be processed and filtered by the Twitter Search API. The API allows also operators to be used within the search query, below a list of operators and examples.

Operator Find tweets...
rockettheme joomla Containing both "rockettheme" and "joomla". This is the default operator.
\"rockettheme joomla\" containing the exact phrase "rockettheme joomla". You need to use escaped quotes (\").
from:rockettheme sent from person "rockettheme".
to:rockettheme sent to person "rockettheme" (tweet starts with @rockettheme).
@rockettheme referencing person "rockettheme" (tweet contains @rockettheme).
#rockettheme containing the hashtag "rockettheme".
rockettheme source:tweetie containing "rockettheme" and entered via Tweetie application (limited to 7 days).
rockettheme OR joomla containing either "rockettheme" or "joomla" (or both).
rockettheme -joomla containing "rockettheme" but not "joomla".

Note that a query string is limited to 140 chrs.


Configuration

RokTwittie is a highly configurable module that allows you to control the various aspects of its appearance and functions. Details of each options are as follows:-

Load Built-in CSS: Choose whether to load the standalone styling or to load the CSS from the template. You should disable this option only if you wish to use your own styling which you have already created.

Output Caching: As the name suggests, if this is enabled, the module will enable caching in order to save on performance and prevent the 100 Twitter API limit being met.

Cache Time: If caching is enable, set, in minutes, the time you wish before it is cleared and new data is called.

Twitter Login: If you wish to load your own profile, then enter your username into this field. As Twitter has a 100 hit limit on its API, this field was created to subvert that issue. If you are going to experience high traffic, fill this field then the 100 hit limit does not apply.

Twitter Password: Enter your Twitter password here if you wish to subvert the Twitter API limit of 100 hits. See explanation for Twitter Login.

Usernames: You do not need to fill out the Twitter login or password for RokTwittie to function. You can insert your username or multiple usernames (separated by a comma) here and the module will load them.

Show default avatars: When enabled, your profile picture from Twitter will appear in the module, alongside your other profile information.

Enable username statuses: This option controls whether the statuses from each username appears in the module.

Open links in new window: A self explanatory parameter, basically, all links in RokTwittie can be set to either open in a new window (will default to a new tab in certain browsers) or load in the page you are viewing.

Show RSS feed link: This parameter controls whether the RSS feed link for your profile appears in the module, it is accompanied by the RSS feed icon.

Show Follow Updates Link: Set to show if you wish to show the updates link.

Show the Bio Description: Set to show if you wish to show your Twitter Bio in the module.

Show the URL: If you have a website address in your profile, this option allows you to show it.

Show the location: Again, if this is set in your twitter profile, you can set it to appear.

Show user updates count: Show the number of updates of the user.

Show user followers count: Show the number of those who are following the user.

Show user following count: Show the number of those who the user is following.

Show following icons: Set to show if you wish to show the icons/avatars of the users who are following the user.

Icon Count: If icons are enabled, this option controls the number that are actually displayed.

Show View all after Icons: When enabled, an additional link will be placed below the icons to view all of the following twitter users.

Inactive user opacity: This sets the opacity of the inactive user tab, if you have multiple users set to show in RokTwittie.

Tweet Options

Enable usernames tweets: This parameter allows you to show the tweets from the user set above.

Show usernames avatar: Set to show if you wish to show the avatar next to each tweet.

Size in pixel of the avatar: If you set the username avatars to show, this controls the size in pixels.

Tweet count: This sets the number of tweets to show if enabled.

Open links in new window: A self explanatory parameter, basically, all links in RokTwittie can be set to either open in a new window (will default to a new tab in certain browsers) or load in the page you are viewing.

Show tweets sources: When enabled, the sources of each tweet will be shown.

Show username as preopened text: If set to show, the username of the tweeter will appear before each tweet.

Search Options

Enable search tweets: This parameter allows you to show the tweets from the search option.

Search string: Enter the value you wish to search for in Twitter.

Show search avatar: Set to show if you wish to show the avatar next to each search tweet.

Size in pixel of the avatar: If you set the search avatars to show, this controls the size in pixels.

Tweet count: This sets the number of tweets to show if enabled.

Open links in new window: A self explanatory parameter, basically, all links in RokTwittie can be set to either open in a new window (will default to a new tab in certain browsers) or load in the page you are viewing.

Show tweets sources: When enabled, the sources of each tweet will be shown.

Show username as preopened text: If set to show, the username of the tweeter will appear before each tweet.

Requirements

RokTwittie has the following requirements in order to operate:-
  • Joomla 1.5x - ensure you are using the latest version.
  • CURL - this needs to be enabled on your server for the module to work. You can contact your hosting provider to activate this for you.

Changelog

This is a changelog for RokTwittie, inclusive of alpha, beta and release candidate versions.

Legend:

* -> Security Fix
# -> Bug Fix
+ -> Addition
^ -> Change
- -> Removed
! -> Note

----------- 0.9 Release [15-Jan-2009] -----------

14-Jan-2010 Andy Miller
# Reverted $doc->baseurl to JURI::base(root) for CSS and JS

14-Jan-2010 Djamil Legato
# Rewrote the Search handler to work again with the latest Twitter Search API changes
# Rewrote the date handler for IE to work again with the latest Twitter Search API changes
# Fixed merged results for users tweets
# Updated "View All" link from the old "/friends" to the new "/following".

----------- 0.8 Release [08-Dec-2009] -----------

08-Dec-2009 Djamil Legato
^ New way to gather users tweets. Not relying on Twitter Search API anymore but directly on Twitter API. This new way guarantee a more reliable output.
+ Added "Merge" options. Based on the tweets count you want to show, if you have more than 1 user you can either merge the tweets so the global count is the one you have set or not merge, so every user is going to show as many tweets as your count setting.

----------- 0.7 Release [30-Nov-2009] -----------

30-Nov-2009 Djamil Legato
# Fixed the missing ABOUT language translation
# Fixed an issue that didn't let you show only the tweets, without statuses

----------- 0.6 Release [18-Nov-2009] -----------

18-Nov-2009 Brian Towles
# Added bug fix for PHP 5.3

----------- 0.5 Release [18-June-2009] -----------

18-Jun-2009 Djamil Legato
# Optional timeout when reaching Twitter.com (with low timeout, 5s)
# Removed escaped double quotes from the searching query
# Fixed parsing issue when user tweets disabled and search enabled

----------- 0.4 Release [09-June-2009] -----------

09-Jun-2009 Djamil Legato
# HTTPS fix

----------- 0.3 Release [05-June-2009] -----------

05-Jun-2009 Djamil Legato
# Bio containing amps caused RokTwittie to not validate.
# Clicking on avatars in updates and search took always to the same page, instead of taking in consideration the "Open in new window" option.
# Several CSS tweaks
+ You can now choose between a Light and Dark header style.
+ Improved caching

----------- 0.2 Release [02-June-2009] -----------

02-Jun-2009 Andy Miller
# Fixed XML error related to caching option

----------- 0.1 Release [31-May-2009] -----------

31-May-2009 Djamil Legato
! Initial release. 

----------- Initial Changelog Creation -----------