Archives page

Posts Tagged ‘twitter’

Gallery2 remote API C# wrapper

I stumbled across the Gallery.NET Toolkit on Twitter, while I should have been doing something more useful; some great work from @rmaclean (thanks for sharing / codeplexing  it).

The API wraps up a lot of the Gallery2 remote services into some easy to use C# functions.

[codesyntax lang=”csharp”]Actions a = new SADev.Gallery2.Protocol.Actions(“”);
string authToken = a.Login(“*************”, “*************”).AuthToken;
album =>
a.FetchImages(authToken, album.Name).Images.ForEach(image =>
Console.WriteLine(“\t” + image.Url)

Hopefully I’ll find an excuse to use this one day.

GalleryTweet – Twitter for your Gallery2

This post is no longer being maintained due to budget constraints - please check the project page for the latest information:

I’m releasing the updated module for Gallery2 under the name of GalleryTweet. It was prompted by a few people mentioning they couldn’t get my earlier hack to work – so I thought I’d build something that was (slightly) more robust, and might stand to work on installations other than my own.

You might want to skip my ramblings and jump straight to the download, so here’s a link for you folks:

  1. Install by unzipping to the root of your Gallery2 installation, and activate through the plugins panel.activate
  2. Once logged in, edit your Twitter settings through the left navigationmenu
  3. You should enter your twitter username / password, and the format you’d like to send your Tweets out with.twitter-settings
  4. Now while you’re browsing the Gallery, Tweet about any images using the link below the thumbnailtweet

Please drop me a message on Twitter @kevinblake if you’ve found the plugin useful, can’t get it work, or have any other feedback.  That download link again, in case you missed it the first time:

Happy Tweeting!

This post is no longer being maintained due to budget constraints - please check the project page for the latest information:

April Fools 2009

I can’t keep the pretense up any longer, I’m not really a bodybuilder and it’s not really my new web site.  I’ve been redirecting this site to my alter-ego at all day long.  Fooled ya, didn’t I?

Kevin Blake - rumours of my career change have been greatly exagerrated

Rumours of my career change have been greatly exaggerated

Whilst rumours of my career change might have been greatly exagerrated, it’s been another good April Fool’s Day worldwide as individuals and businesses have thrown off any seriousness of the rest of the year by turning to Newsbiscuit-esque stories and ideas everywhere.  April 1st is of particular interest to me as a web developer, as an opportunity to proudly display the more playful side of a company, attract new audiences, and to make people smile.

So here are some of my favourites (apologies if a lot of these links don’t work.  Chances are, it’s not April 1st any more).  If you’ve been following me on Twitter today, you’ll have probably seen a lot of these already.

And lastly, in the papers…

Do you have any favourites I’ve missed?  Don’t forget, it’s never too early to start planning next years pranks 🙂

Twitter your Gallery 2

Seems everyone is talking about Twitter nowadays.  The Hudson River picture launched it into the media world as the best news source on the planet, and Obama‘s adoption of the tool has given America the same pleasure that Britain experienced when our Prime Minister, Stephen Fry starting getting ‘back in touch with the people’, in October 2008.

The Hudson River picture wouldn’t have been possible without the non-affiliated TwitPic – which never truly got the recognition it deserved.  Without it, the infamous picture would have only been a 140 character description, and nobody will have noticed or cared.  Still, that’s the nature of buzzwords I guess.  If they don’t cause a buzz, they’re just words.

Anyway, TwitPic is yet another disparate service like Flickr, Panoramio or Facebook that’s had me tempted away from uploading some of my photos to Gallery2 / Blakepics.  With Facebook, I’ve integrated my own application there; Panoramio and Flickr, stolen the best parts of each.

And now with a hack to the tagging module in Gallery 2 I can emulate all I want from TwitPic as well, and tuck another service onto the shelf at the back at the cupboard.  So as usual, I thought I’d share.

What it is…

  • Tweet any photos on Gallery just by adding the tag ‘twitter’ to your photo.
  • Automatically takes the photos title as your Tweet text.
  • Processes all URLs through TinyURL, giving you a warm and fuzzy Tiny URL

What it isn’t…

  • A seamless Gallery2 module.  There’s some hacking to do.
  • Multi-user.  If you share your Gallery, there’s some more work to do.

If you make improvements in these areas or any others – please let me know 🙂


Things you need to do

  1. Download my Twitter Tags class
  2. Unzip to the root of your Gallery installation
  3. Edit /modules/tags/classes/TwitterTag.class with your twitter username/pass, and Gallery URL.
  4. Edit /modules/tags/classes/TagsHelper.class
    1. Add this just above the line ‘class TagsHelper’
    2. Then just above
      return TagsHelper::assignTagById($itemId, $tagId);
      TwitterTag::Tweet($itemId, $tagId);
  5. Tag any photos you want to appear on Twitter with ‘twitter’.

Random thoughts from the north of Vietnam

Some random small things I’ve picked up along the way was going to twitter, but decided there were too many, and they’re too long…

Eating snakes… One of the hostel legends – first you drink the bile, then the blood, then you eat the beating heart.  Apparently you can feel the heart beating in your stomach.  There’s a place just outside of Hanoi you can try it.  I’d only do it at the end of the travels though, nothing ruins a holiday like being violently ill.

Snake wine.  It has a dead snake dead scorpion in it.  And looks a lot like olive oil.  The rumours are that if you drink the whole bottle, the poison makes you blind.  I say put it in smaller bottles.

Even though the hotel I booked in Hue was full, I can still use their free wifi if I go over by the balcony.  Well, it’s only across the street.

The same hotel should change their router password… I can login with admin / admin.  You get this a lot in places that offer free wifi, why don’t all routers force you through changing the password when you first install it?  Plug and play that creates a rubbish system is still a rubbish system.

Vietnamese cities don’t have many massive landmarks that I can use to orientate myself.  The tall narrow streets are not helping.

So, my BGT-31 GPS has been a lifesaver.  Once I find a place like a hotel or a train station – I can mark it, and use it to create way points later on.    It tells me which direction I’m heading in; North, East, South or West, which I should be heading in, and how far it is.  It also makes me feel a bit like a ghostbuster if I hold it out in front of me while I’m walking.

I can’t sleep on trains if I’m lying down.  I had the same restless nights when I was in Croatia.  Remarkably falling asleep sitting up and talking to myself on the way home from work has never been a problem.

I often pass by Facebook requests from old school friends that I can’t remember from 5 years of school.  But I’ll happily add someone I’ve spoken to for only 15 minutes in a hostel.  And I still have to ask their name again, because “hey man” never returns any successful matches.

There are a lot of good rock bars in London that I don’t know about.  And it’s embarrassing finding that out from a Swedish bloke who lived there for only a year.

Seeing a live pig tied upside down on the back of a motorcycle was well worth seeing, no matter what the animal rights activists say.

I’m beginning to understand the phrase “more people die every year crossing the street, than do flying”… Londoners should still be afraid of flying.

The book sellers on the streets have offered me huge stacks of Lonely Planet Guides, but never Rough Guides.  I wonder how accurate their counterfeiting is, or wether the books contain helpful gems such as “you should stay at my place, very cheap”, and: “Always buy lonely planet guides from the local street book people.  They are cheaper and more accurate.”  All said and done, as Mike (I won’t take the credit) – at least they’re selling something tourists will find useful, and not some useless cheap tat.

That’s the lot.  It’s a bit of a strange format for me to add on the blog and I blame twitter.  It also makes me want to include some poem about friendship or love at the bottom, and request you send it to 5 of your closest friends.

Remember, if you get it back – someone loves you too.