Twitter posting lists with images Twitter posting lists with images
  • Home
  • Posts
  • Home
  • Posts

Twitter posting lists with images

200810161358.jpg

Recently I released some code to discover and embed Twinkle images linked from Twitter postings, and released a modification to Ricardo González’s Twitter for WordPress plugin which uses it.

I’ve now implemented support for Twitpic as well.

Grab the modified WordPress plugin here:

twitter-for-wordpress-plus-images-v0.2.6.zip

After installation, add the widget and make sure ‘Discover images’ is ticked.

For non-Wordpress users, the base code is also available here:

TwitterImageUtil.class.php-v0.2.6.zip

Include it in your twitter list source code, and use it as a filter for the message content. Something like:

$message = TwitterImageUtil::processContent($message, $mysql_database_handle);

Some configuration is possible – see the header comments for more details.

The code will create a thumbnail of the image, and store it locally. It’ll also cache the results in a MySQL database for speed. It supports Lightbox, too – just supply the relevant flag to turn it on.

Updates

  • Version 0.2.6: Bugfix for posts with both images and @mentions
  • Version 0.2.5: Bugfix from prior version, plus compatibility fix for Twitpic changes
  • Version 0.2.4: Updated to match Twitter for WordPress v1.9.2: Compatibility fix for WP 2.7
  • Version 0.2.3: Another update, chasing the moving target that is Twitpic
  • Version 0.2.2: Updated to match Twitpic’s new image storage using Amazon S3.
Read More

Advanced web templating with PHP and regular expressions

This post describes a method to gain more control over the styling of images for web templates/blog themes, using a bit of Regular Expression magic. This is the technique used for my recent theme, Elegant Grunge.

You’ve just designed the most beautiful template ever – pleasing composition, clean lines, smooth colours and gradients and an awesome typeface. You apply it as the theme for your blog, or release it to the community, and there is much rejoicing.Example of the 'SH Trocadero' WordPress theme with image

Then you or someone else inconsiderately puts a photograph into a post – disaster! That nasty square of graphic just destroyed your composition, and the page is unbalanced and suddenly looks terrible.

Images are particularly tricky to make work with a theme, mostly because they’re so unpredictable. With text, it’s easy to control the way it looks. With images, they can be any colour or shape, many of which will break the composition of a theme, especially if the design elements of the theme contains irregular lines.

A big impediment to making images work is the limitations introduced by the current versions of CSS: All you can really do is provide a square border, possibly with some padding. That’s it, unless you’re willing to manually add tons of markup around images every time – and willing to make your users do it, if you’ve released a theme.Example of images in the "Green Light" WordPress theme

Some people will carefully Photoshop-up their images to make them fit – Webdemar (who made the theme I first used on my blog) does this, for example, and it looks great. That’s a lot of work, though, especially if you make frequent posts with images!

If you’re a theme designer, there’s an easier way to make images work.

Read More

Keeping iChat and Adium status in sync with Twitter

I’ve been using Twitter for a while now, and I’ve just started doing ‘global’ status updates across Twitter, Facebook, and my instant messenger account statuses for iChat and Adium. Usually I use MoodBlast, a really nice application which lets me use a global keyboard shortcut to quickly enter a tweet and hit enter to update everything simultaneously.

However, if I want to update from, say, Twinkle on my iPhone (side-note: Wow, Tapulous need to do some serious SEO – their Twitter site isn’t even on the first page of Google hits. I’m on the first page of Google hits for it, ferchrissake) the sync won’t happen. This Ruby script will do the trick.

Read More

“Elegant Grunge” WordPress theme

“Elegant Grunge” is an unwashed yet crisp WordPress theme inspired by wefunction.com. It features:

  • Layouts options
  • Support for custom background and header
  • Widget-ready footer
  • Optional full-width page template that removes the sidebar

screenshot.png

Read More

New WordPress theme

I’ve designed a new WordPress theme that uses grungey elements I found in some old photos around Carlton, inspired by Function’s theme. It has some cool features –

  • Images are automatically surrounded by frame eyecandy, with some nifty regex replacement – it really makes images pop
  • A photoblog tag page displays entries in a photoblog style
  • A custom page template allows sidebar customisation – supply a list of tags to display related posts, and display arbitrary text/html.
  • Per-page and per-post configuration, and global configuration via admin interface

Let me know what you think – and if it’s broken for you. I’ll release it publicly soon if all is well.

screenshot.png 200810051416.jpg

Read More

Smart 404 for WordPress

Save visitors to your WordPress site from unhelpful 404 errors!

When a page cannot be found, Smart 404 will use the current URL to attempt to find a matching page, and redirect to it automatically. Smart 404 also supplies template tags which provide a list of suggestions, for use on a 404.php template page if a matching post can’t be immediately discovered.

Instead of quickly giving up when a visitor reaches a page that doesn’t exist, make an effort to guess what they were after in the first place. This plugin will perform a search of your posts, tags and categories, using keywords from the requested URL. If there’s a match, redirect to that page instead of showing the error. If there’s more than one match, the 404 template can use some template tags to provide a list of suggestions to the visitor.

This plugin is also useful if you have recently changed your permalink structure: With minimal or no adjustment, old permalinks will still work.

Read More

Taking the 404 further

Update: I have now written a WordPress plugin that does all of this for you. Please use this plugin instead.

I’ve just changed my permalink structure for my blog to something a bit prettier. In the process, I realised that some previously-working permalinks weren’t operating any more, despite having a plugin set up to maintain old permalinks.

WordPress is fairly good at figuring out what viewers are requesting when a post can’t be found immediately – for example, if you’re using a permalink structure with an ID number in it, and the requested ID is incorrect, WordPress seems to be able to redirect to the correct address.

However, it’s not 100%, as I recently realised.

Consequently, a few pages were heading to the 404 page, which isn’t ideal. I changed my template’s 404 page to do a search for what the viewer was really after, and redirect them there. If it can’t find an exact match, it’ll perform a search with keywords extracted from the URL. If it finds a single result, it’ll redirect, otherwise it’ll put up a few results as suggestions on the 404 page.

It also works as a nice search shortcut. Try it: http://atastypixel.com/wordpress 404 redirect

Read More

Adding Twinkle to Twitter posting lists

Twinkle from Tapulous is an iPhone Twitter application with a twist – it uses location information, to introduce local social networking, and supports photos, a great extension to the standard Twitter recipe.

Twinkle handles photographs by uploading them to Tapulous’ server, then appending a ‘snipurl’ to the Twitter message which points to a page displaying the image. That works fairly well, but wouldn’t it be nice to actually see images inline, when viewing Twitter posts?

Well, now you can, if you have a self-hosted Twitter post list. See my Twitter feed on the right for a demo (although there may not be a post there with an image).

Read More

Hi! I'm Michael Tyson, and I run A Tasty Pixel from our home in the hills of Melbourne, Australia. I occasionally write on a variety of technology and software development topics. I've also spent 3.5-years travelling around Europe in a motorhome.

I make Loopy, the live-looper for iOS, Audiobus, the app-to-app audio platform, and Samplebot, a sampler and sequencer app for iOS.

Follow me on Twitter.

Posts pagination

« 1 … 30 31 32 … 36 »
© 2021 A Tasty Pixel.