• I recently switched to Tweet Blender because it looks really nice and it does a really good job at recognizing links, hastags and usernames.

    It does not, however, do everything my heart desires. I really want to show a few twitter posts (selected by a hashtag) on my blog (so far so good)
    However, most people seeing this will know nothing about Twitter and will not know to click the twitpic links I use. What I would really like is to have it show a thumbnail of the picture instead of the link.

    This sounds like a big implementation but I think it doesn’t have to be.
    I’m not good at any programming language (I know a little Actionscript) but I can usually “read” what is going on.
    I saw this part in tweet-blender/js/main.js:

    // if we are linking URLs
    	if (TB_config.general_link_urls) {
    		tweet.text = tweet.text.replace(/(https?:\/\/\S+)/gi, '<a rel="nofollow" href="$1" target="_blank">$1</a>');
    	}

    And think it could be adapted like this:

    if (TB_config.general_link_urls) {
    		if ([the link looks like a twitpic link]){
    		[take the twitpic embed code and insert the last bit of the twitpic URL into it]
    		} else {
    		tweet.text = tweet.text.replace(/(https?:\/\/\S+)/gi, '<a rel="nofollow" href="$1" target="_blank">$1</a>');
    		}
    	}

    Where I put text between square brackets thats where I don’t know what code to use.
    the embed code looks like this:

    <a href="http://twitpic.com/125ccv" title="title of the page"><img src="http://twitpic.com/show/thumb/125ccv.jpg" width="150" height="150" alt="nearly the same a the title of the page"></a>

    The URL you would have at the start would include the unique identifier used to find the href URL and the thumbnail url, I dont think the title and the alt are really necessary but If this ever becomes a full fledged feature It would be nice to be able to adjust the size.

    I’m hope I managed to convey my idea and I’m sorry it took me so long to do so.

    I’m really hoping for a quick “code edit” short term solution and maybe in a new update a solution thats integrated in the settings page.
    This long term solution could even be formatted in such a way that people could adapt it to any service providing a embed option.

    http://wordpress.org/extend/plugins/tweet-blender/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Tweet Blender] Show picture instead of twitpic link’ is closed to new replies.