Originally posted by goorootech
The resampled thumbnails are created automatically on-the-fly when a member posts an image?
Jason
They click a paper clip icon when posting. A simple form pops up that allows them to browse to their image and enter a simple caption. When the submit button is clicked, the image is uploaded, a thumbnail is created, a database entry is made and a forum tag is inserted into the post similar to this:
When the post is viewed, I use a RegEx function (thanks to -gary) that will parse the tag and get the id number, in this case 2345. A query is made using this id to get the location of the thumbnail and regular sized image which is then converted to a link so when it is clicked on the original sized uploaded image is viewed in a popup.
There is some additional JavaScript/CSS used for showing and aligning the thumbnails. If viewed in IE, there are some additional filters used to highlight the thumbnail when it is hovered with the mouse.<