mod_btwitter

mod_BTwitter is a simple module designed to embed a users timeline into Joomla based sites.mod_BTwitter logo At the core of it's design is the principle that there should be no un-necessary chrome and page load speed should not be adversely affected.

This documentation details how to use mod_BTwitter

 

Demo and Purchase

A demonstration of mod_BTwitter can be seen on the demo site and the extension can be purchased from my shop.

 

Installation

Install the module as you would any other Joomla component - with Joomla's Extension Manager.

 

Module Configuration

As with most Joomla! modules, configuration options are found in the right hand panes when editing the module.

Basic Options

This pane contains the core configuration options

Style: Select Light or Dark. Dark is intended for pages with dark backgrounds, light for bright backgrounds.

Twitter Screenname: Enter the Twitter username to show tweets for (Don't include an @)

# Tweets: Enter how many tweets to show

Display Profile Pic: Display the user's profile pic next to every tweet?

Display Twitter Name: Display the users Twitter name at the top of the module

 

Formatting

This pane contains additional options relating to the look and feel of the module

Div Width: Leave at 0 to let Joomla!/the browser decide. Enter a number to force the module to occupy a certain size of area

Date Format: How should the date be displayed for Tweets sent before today? Use the PHP date syntax for formatting the date

Date Format (Today's Tweets): How should the date be displayed for any tweets posted today?

Force CURL: Force use of CURL (useful for when Twitter is unavailable) - Will be moved to a more sensible pane in the future.

 

Linking

This pane contains configuration settings relating to the use and display of links by the module.

Use T.co Urls: Twitter converts all tweeted URL's to t.co links. Set this to Yes to leave the urls this way, set to No to convert back to the original URL (i.e. tc.co/1234 vs bbc.co.uk/news)

Link to Tweet: Include a link to the status update on Twitter? If set to Yes each tweet will be followed with a linked arrow (->)

Link to Twitter User: If Basic Options->Display Twitter Name is set to yes, enabling this will link to the user's twitter page.

 

Twitter

This pane contains configuration options that affect additional functions offered by Twitter

Show Follow Button: Display a button the user can click to follow you

Show Follower Count: Displays a bubble next to the Follow button stating how many followers you have

Button Language: Enter the two letter ISO code for the language you want the button to be displayed in (i.e. en for English, de for German etc).

Opt Out: Twitter uses the content of your site to help tailor the Twitter site to your readers. Set this to No to prevent them from doing so.

 

Caching

Options in this pane relate to the caching of the Twitter timeline (to reduce page load time). Pay attention to the note at the bottom of this page if you are using multiple modules

Use Cache: Should a cache be used? (recommended: Yes)

Cache Time: How long should the cache be valid for (in minutes)? 15 - 30 minutes is a good number

 

Notes

There is potential for a slight conflict when using multiple instances of the BTwitter module, however this is easily resolved by observing the following;

Caches are created with the name mod-btwitter_tweets{twitteruser}{# of tweets} so if you create a module that retrieves 5 tweets for user MyUser the cache would be mod-btwitter_tweetsMyUser5.

An issue arises if you have two modules retrieving the same data, but with different values set for Cache Time. The length of the cache validity in this instance would depend on which module last updated it. To avoid this issue, retrieve a different number of tweets (say 4 or 6) in one of the modules.

This isn't an issue when different users are used, so a module retrieving 5 tweets for MyUser would not conflict with another retrieving 5 for YourUser.

 

Changelog

Date Entry
02/10/2012 Added support for Joomla 3
21/01/2013 Prevented page timeout when Twitter API down
21/01/2013 Added support for Module Class Suffix
21/01/2013 Rolled Joomla 2.5 and Joomla 3 support into one
24/01/2013 Commit a4389 Integrated GIT with BUGGER Changelog

 
 Share