Gossamer Forum
Home : Gossamer Threads Inc. : Custom Modification Jobs :

Logo/Graphic File-Upload Mod Updated.

Quote Reply
Logo/Graphic File-Upload Mod Updated.
Version 01.01.23 adds additional error tags, and customization of error message. Also allows formatting of returned problems in bytes or Kb.

Code:
o <%errors_found%> -- If errors are found, this is non-null.
o <%max_size%> -- Maximum allowed size of uploaded image.
o <%errors_width%> -- width of image uploaded.
o <%errors_height%> -- height of image uploaded.
o <%errors_size%> -- size of image uploaded.
o <%errors_sizediff%> -- Size Difference of image uploaded to allowed size.
These features have been added back in, with major updates in how they work:

Code:
o error checking on modifying files
o error checking before unlinking files
o ensuring only one file is attached to a record (this can be easily overridden
if you want to hack it, but it will prevent "lost" files for 99% of the users
who don't want to hack it.)
o cleans up after itself so that no "loose" files should remain under normal
conditions.
Also, I had to add a tag to the system, such that <%FIELD_NAME%> is the name of the field you put the graphic in, and is the display tag, and <%New_FIELD_NAME%> is the name of the TEMPLATE field you use in the type=file box for uploading. This prevents tag crashes due to how the plug-ins get called. The "New_" is hard coded in the script, so whatever you call your database field, just make sure to set the file field's name to 'New_wwww'.

I also added a version number to the demo site, so you know if I've been making updates.

Caveat: The site should work. The error templates have not been updated, so if you generate a real error, it might look funny. Upload reasonably good data (fill in all fields) and you'll see how it works. Add and modify should work. You need to register. Let me know if anything (except the add_error or modify_error templates) isn't working.

I'm thinking of including the templates in the release, with the name LG_01_ prefixed to them, so that you can see working examples without overwriting your working templates.

Is this a good idea?

The following URL is a link to the FAQ entry, and it has a pay-pal button on it to make ordering easy. We can also take MC/Visa by fax.
http://pugdog.com/...e.cgi?ID=251&d=1


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Logo/Graphic File-Upload Mod Updated. In reply to
I have to make some changes to how "modify" works. Right now, there is a potential problem where a new graphic overwrites the old one immediately, before it's validated.

This will require a "bigger" method of handling this, since I don't want to add a field to the Link table "previous_image" or something similar :)

I need to think this through, but right now it looks like a small table that will hold the updated information, that is inserted into the Links record when a "changed" link is approved.

Right now, this only affects the "modify" feature of the plug-in, which shouldn't make much difference to most people at this time.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Logo/Graphic File-Upload Mod Updated. In reply to
Any feedback folks? Enough of you have it to tellme something... ?

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ