Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[UPDATE] postcards script and image uploads

Quote Reply
[UPDATE] postcards script and image uploads
I've added a feature to the postcards script, that is tangential to the image work I've been doing for the other programs.

Rather than using the FILE fields, and such, this attaches an image to a link using the the user_home_directory field added to the User record (which is one of the key fields in my current system).

The postcards script treats a link as an image, with the URL field the public web path to the image, and a thumb path field that is the public path to the thumb image. The idea was low server load, since anyone who tries to steal images, can, you aren't going to stop them, but you can increase your loads greatly trying.

What this does is upload a binary file "pending" into the user's home_dir/temp area. Then, when the user goes to submit the rest of the link, the add routines look for a file file called "pending" in the users home dir, and validate it, make sure it's a known image, etc and attaches it to the submitted link. When the link is deleted, the images are deleted. (Oh, the image is resized and thumbnailed based on the site criteria). The image is labled ID.fileext. Once submitted, the url to the image is stored in the link, so lookups are fast.

The benefits of this is that if for any reason the database gets mangled, all a users images are in their /xx/xx/xx/username directory, and are directly attached to a link via an ID. While the /xx/xx/xx is random, it's stored in the Users table, and can be rebuilt if necessary, since the leaf node is the Username.

Anyway, it seems to be working as I need it to as a specific addon to the postcards script. I'll be setting up a few more sites and packaging it all into a plugin.

Postcards are still a great interactive add on for sites, and if you can generate your own content, a great viral form of marketing and exposure.

This image upload feature will allow adding some interactivity to the Postcards script, and is the first step to the long-shelved Ultra_Postcards program, with advanced tracking features, stats, and such that give users more access to their cards. Because we never actually sent the card, only a pickup notice, users can "unsend" and edit things. So a bunch of features have been planned and never implemented until now.


Anyway, if you have the postcards program and want to upgrade, let me know. There are many ways to attach an image to a link, this one works for the postcards script within the context of the growing profile/portfolio/etc system I'm building.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread [UPDATE] postcards script and image uploads pugdog 2440 Aug 28, 2006, 5:09 PM
Post Re: [pugdog] [UPDATE] postcards script and image uploads
pugdog 2349 Oct 26, 2006, 10:38 AM
Post Re: [pugdog] [UPDATE] postcards script and image uploads
pugdog 2335 Oct 29, 2006, 7:13 AM