Please note that this post was migrated to my new blog platform. There may be bad formating, broken links, images, downloads and so on. If you need an item on this page, please contact me and I will do my best to get it from my backups.
EDIT 6/05/2007: Changed links to CS 3.0 version. Subscribe to here for updates: /archive/tags/The+MiXX+Collection/default.aspx
Some of you might have noticed my new homepage over the last month. Those of you using an RSS reader to read this, go check out my homepage for the new PostIcon module I’m talking about.
What is it?
The purpose of this Server Control and CSModule is to automatically
create a small lightweight PostIcon with little to no work on your part.
Just embed a normal image, bam, you have a PostIcon automatically.
This module creates the PostIcon for a Weblog Post during its creation
and/or update physically on disk. It will connect to your image source,
load into memory, crop, resize, compress, and save the tiny ~2 KB file
to disk. It then adds the full pathname to an ExtendedAttribute for that
post called “PostIcon”, allowing for the skin to render where required.
This storage-to-disk method greatly speeds up the homepage rendering as
we do not access the photo gallery.
To use, simply create a blog post with at least one <img> embedded.
That’s it. The default logic above will take the first <img> in your
post and process it to disk.
Optionally, you can specify a particular image to use as your PostIcon.
Say if you had multple embedded <img>s, or if you don’t have an image at
all but wanted a PostIcon for the post.
You can use the BBCode format of:
This will allow you to specify an Anchor position, if you want to crop
in a certain region. The Anchor attribute is optional. See the
module’s config file for more information on Anchor.
How does it work?
There are two parts to make this work. The backend uses the PostIconModule to download into memory, crop, resize, compress, and save the selected image to disk.
And the frontend UI uses the PostIcon server control to rendered the saved image, with smart logic.
What is the logic to determine what gets downloaded, cropped, and saved or even displayed if none is set?
There are two methods of logic. The first is which image, if any at all, is processed on the initial PostCreation process. And the other logic is in the PostIcon server control that renders, if there is no image saved from the module.
The PostIconModule determines what url gets written to the post, if any. It does this by following the order below:
- Does the