Tutorials TumbleLog Our Thoughts
Bandit Design » Our Portfolio Our Design Contact Us
Quite often at Bandit Design while we're working on your project, we'll stumble upon interesting or humourous things -- so we thought why not share them with the world!
RSS iPhone Random Archive « Home

Bandit Design

This is a TumbleLog authored at the desks of Bandit Design. We're a small web and graphic design studio based in Wellington, New Zealand.

Visit Bandit Design ยป

1 year ago

Tumblr Featured Posts Plugin

I’ve created a featured/favourite posts plugin of sorts for Tumblr. Basically what it does is cycle through your posts and finds all tagged with the tag “featured”. It then outputs a link to each of these posts to a list element of your choosing.

You can see it in action to the right —>

How to install:

  1. Put the following within your <head> tags;
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" language="javascript" type="text/javascript"></script>
  2. Download a copy of the script (bandit-tumblr-featured.js, 2kb) or link to my copy as follows;
    <script src="http://lab.bandit.co.nz/sites/tumblr/bandit-tumblr-featured.js" language="javascript" type="text/javascript"></script>
  3. Put the following html code somewhere in your page;
    <ul id="featured"></ul>
  4. You’re done! All posts tagged with “featured” will now show up in this list after your page loads.

Features:

  1. List element ID (default “featured”) configurable within script.
  2. Tag (default “featured”) configurable within script.
  3. If Jacob’s AJAX Search plugin is installed, script will automatically use the API calls from that instead (to save double calling). - No longer necessary

Notes and limitations:

  1. This plugin requires the jQuery Framework (tested on 1.2.6 - will almost certainly work fine in 1.3.x though)
  2. Due to how we have to cycle through the posts (and limitations with Tumblr’s API - tag filtering anyone?) it may take a number of seconds after page load for your featured posts to appear - the more posts you have the longer this will take. - Now uses Tumblr’s new API functionality to filter by tagged posts
  3. Due to AJAX caching, your newly tagged “featured” posts may not show up in the list until your browser recaches the request. There is no simple work around for this. Rest assured if you tag a post with “featured”, it WILL show up in the list.

Good luck! Contact me via Bandit if you have any questions.

James

4 notes

Loading...