Check out my latest project: Code Dumper

Upgrade to Twitter JavaScript for your blog

I've been following the requests on the current Twitter JS plugin and decided to implement a few.

In particular there's now support for templates, which gives you full control of how the tweet is displayed.

I've updated the original page.

Templates are easy to write and insert into the li element that is printed. This way you can add your own classes, prefixes and suffixes as you please.

For example, here's is John Resig's twitters with friends based on the following template:

<span class="prefix">
  <img height="16" width="16" src="%user_profile_image_url%" />
  <a href="http://twitter.com/%user_screen_name%">%user_name%</a> said:
</span>
<span class="status">"%text%"</span>
<span class="time">
  <a href="http://twitter.com/%user_screen_name%/statuses/%id%">%time%</a>
</span>

Using this template, I've been able to wrap the status in quote and make the 'ago' time a link to the original twitter posting.

See the original add twitter to your blog post for a full list of template values and options.

Please wait while tweets load

Leave a Reply
Not required

CODE: Please escape code and wrap in <pre><code>, doing so will automatically syntax highlight