gallerythumbs - v0.01
Sun, 2004 Mar 28, 00:35:First release of gallerythumbs. I think it works decently well. (makes posting entries based on an image very easy) Now my next step is to install it on this blog, as well as my photo blog. (however to do this I have re arrange my art section)
Downloadgallerythumbs :: Blosxom plugin
Sat, 2004 Mar 27, 23:56:This blosxom plugin is designed to add a thumbnail of an image related to a story to the beginning of an entry.
To use this plugin you just need an image in the same directory, with the same file name (sans the extension) as the story entry. The plugin will create a thumbnail, and display it prior to the story.
This means if you want to write an entry on foo.jpg, all you do is put it in your blog, and add a corresponding foo.txt with the title and any description you want to give the image.
To install the plugin, put it in the plugin directory, edit the maximum size (of the thumbnail) and file type variable at the top of the file. The file type is the type of file the thumbnails should be assuming your content is photos jpeg is probably the best file type. This value is also used as the Content type argument ie. image/<filetype>.
For every flavor that you want the thumbnail visible you need to have a thumbnail.flavor with information about how to display the thumbnail. An example flavor (and actually what I use on my photo gallery) is in the codes documentation, as well as in the link below.
This plugin requires the Image::Magick perl module (know as perlmagick)
While this plugin generates the thumbnails on demand it saves them in the state directory for future viewers. The thumbnail is generated when someone loads a page with the attached story. Anytime after it it generated a request for storyname.tmb will return the image.
To make sure we don't have thumbnails to images that don't exist. When we need to generate a new thumbnail, we check that the original file for all existing thumbnails exists, if not we delete that file.
The code is designed so that when you change the settings, ether the thumbnail size, or filetype. it knows to invalidate (ie. delete) existing thumbnails, and regenerate them on demand.
If you change/edit and image in place on your blog, (ie. has the same file name) the thumbnail will not update.. my recommendation is to move the thumbnail and entry to filename+tmp, load it in your browser, then move it back.
This plugin will only work in dynamic generation, or hybrid mode. The blosxom code must be run to send back the thumbnail. However since this is done during the start function, sending the thumbnail should be relatively fast on even a large blog.
Current Code Version Blog Sample Flavor
The sample flavor requires both the binary (or clone) and rellink plugins. The binary is used to send the original file with the Full size link. rellink allows the files to be locally defined (you can use blosxom variables to make the links work w/o rellink).
Also remember to name the flavor thumbnail.<flavor> (probably you will want to make two copies of this file, thumbnail.html and thumnail.rss, remember to make a copy for any comments/writeback flavor if needed.
The actual code will also need to be renamed from gallerythumbs-v*.**.code to just gallerythumbs.
If you have any problems please comment on this post.
rellink - v0.03
Sat, 2004 Mar 27, 21:04:Fixed Support for multi-line tags (was not always matching)
If &'s are already escaped, with make sure its not re-escaped.
Gave a better URL for the google link example
downloadrssurl
Wed, 2004 Feb 18, 16:16:Download
rellink :: Blosxom Plugin
Mon, 2004 Feb 16, 03:42:This allows for:
"//" + blog path "/" + site path + relitive to blog entryalso makes '&' to '&' and the ability for custom link types such as 'google' (built in).. this means:
"google:Blosxom"will be a google search for Blosxom.
Links:
Current Code version blogFile must be renamed to rellink
If you have any problems post a comment