Extensions » Tweet Display Back

Tweet Display Back

Advanced Customization in 3.0+

Updates to how the data is stored in Tweet Display Back 3.0 enables users to have greater potential for customizing the module to their site.

Accessing Raw Data

Layout files, or the various module templates, now have access to the helper class as an object instance versus a static helper class with static methods.  During processing, whether loading from cached data or retrieving directly from Twitter, the decoded JSON strings are stored as static class vars in the helper class.  Two separate requests are made when fetching fresh info; the user object to render the profile data and the chosen tweet stream. To access these vars within a layout, you can call $helper::$tweets for the tweet stream and $helper::$user for the user object.

What Can I Do With This?

A lot of data is retrieved from the Twitter API with these requests, and there's a good bit of it that is never used, especially from the user profile data.  So, you could add additional data from your Twitter profile to the module's output in your template.  Another potential use case would be to handle the formatting and rendering of the data yourself.  The helper class pre-renders much of the data by formatting it for proper display, wrapping links around appropriate text, or showing retweets as from the original tweeter.  Theoretically, an advanced user could build their own helper methods to render the data however they please with the module's new API endpoints.