- Posted by miketeye on July 16, 2009
Share on FacebookOK, well maybe "enhanced" is too far fetched. If you've been using blogengine and loving the system like I do, then chances are you might have come across this wonderful extension which allows you to easily use your flickr hosted pictures and images within your posts.
The only tiny downside I had with the original extension was that, it did not provide any way of controlling the hosted image size on the fly via the extension itself. In other words, you have to upload multiple sizes to flickr to display the various sizes in a post. Which is not how developers like to do things. You will typically prefer to upload one image and resize it on the fly. OK, well, enough of the blah-blah-blah.
Enhanced flickrpicture extension with size=square : Code [--flickr:3662228891-square] (exc --)
Enhanced flickrpicture extension with size=small : Code [--flickr:3662228891-small] (exc --)
Default size flickrpicture usage : Code [--flickr:3662228891] (exc --)
So I looked a bit closer into flickr sizes (Flickr creates multiple sizes of uploaded images and saves them on their servers.) and added code to the original flickrpicture extension to arrive at this enhanced version which behaves exactly as the original except it now has an optional parameter to take care of the size. By default, it will display the flickr maintained medium size (Or the default size option specified in Extension Manager), But if a size parameter is specified, then it will use that instance size instead.
The syntax is of the form: [--flickr:pictureID] or [--flickr:pictureID-size] without the double dashes (--)
where size is a member of the set (square,thumbnail,small,medium,large) and is a close mapping to the flickr sizes set.
Additionally, I have added an extra setting in the Extensions editor which allows you to choose whether to link back to flickr or not.
When set to true, the image is linked back to the flickr hosted page of the image. When set to flase, the image itself is not linked. You are then able to wrap a link around the extension.
You may download the extension from here:FlickrPicture.zip (1.78 kb)
As usual, unzip the file and copy flickrpicture.cs to your blogengine extensions folder (/App_Code/Extensions).
I have left the name of the extension and developer as Matthew Rygiel. All credit goes to him for creating such a wonderful extension in the first place.
Please post comments and feedback below.