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

Re: [UPDATE] Logo upload rewrite

Quote Reply
Re: [UPDATE] Logo upload rewrite In reply to
I'll have full instructions, but essentially, that is the best way to do it.

If you've customized your added-in templates make a backup up, but in general, uninstall the plug in, delete the attach.cgi and attach*.html files (if your copy installed a backup directory you can leave it or delete it).

What will happen is it will install new fields. Depending on your situation, the fields may be different.

But, issuing a command:

update prefix_Links
set Logo_Image = Logo_Graphic

Will do the biggest update, then delete the Logo_Graphic column.
Same for the xTsize/yTsize which are now Logo_xTsize and Logo_yTsize.
Logo_Size is used, but Show_Logo or Show_Graphic is now Logo_Show,
and Graphic_Validated is now Logo_Validated.

In reality, you could avoid all this by changing the defaults, but
then you'd have to edit all the templates. It's easier to make 6 changes
to the database, then 100's of changes to the templates.

While the software doesn't care what the columns and fields are called, there is a hash-mapping of that, the Templates _do_ care. They need to know the VALUES of the KEY fields (a hard-coded sort of thing), so they need to know the names of the database fields. No way around this in the current implementations, or really would it be worth trying to get around it.

I'm compiling a list of changes that need to be made, and after the next install or two, I should have the complete list. All are minor.

link.html needs to have <%image_url%> changed to <%Logo_image_url%>, and <%Logo_Graphic%> changed to <%Logo_Image%> stuff like that.

I'll make a few changes to the Install program to add the modified templates to the backup directory (modify_link.html, modify.html, etc) that way you can chose to copy them to your new directory, or just edit the changes into your existing templates.

The thing that has kept tripping me up is the change from Logo_Graphic to Logo_Image -- and I really do suggest moving the image fields in your database, then deletly the Logo_Graphic field (This wil catch about 90% of the template errors!!).

Once I deleted that field from the Links table, I caught all the errors immediately.

I should have this out later tonight. It's going well :)

Check out the FAQ site, try adding al ink with a small logo, then going to Modify to see how it works.

Any errors, let me know.

I consider that site "working" (although the admin features are missing a few connections still to be made -- you won't see those <G>).



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Subject Author Views Date
Thread [UPDATE] Logo upload rewrite pugdog 4791 Jun 7, 2001, 1:16 PM
Thread Re: [UPDATE] Logo upload rewrite
BryanL 4648 Jun 7, 2001, 3:52 PM
Thread Re: [UPDATE] Logo upload rewrite
pugdog 4669 Jun 7, 2001, 4:11 PM
Thread Re: [UPDATE] Logo upload rewrite
ryel01 4631 Jun 7, 2001, 7:27 PM
Thread Re: [UPDATE] Logo upload rewrite
pugdog 4662 Jun 7, 2001, 8:44 PM
Post Re: [UPDATE] Logo upload rewrite
ryel01 4628 Jun 7, 2001, 9:37 PM
Thread Re: [UPDATE] Logo upload rewrite
pugdog 4645 Jun 7, 2001, 8:47 PM
Thread Re: [UPDATE] Logo upload rewrite
BryanL 4623 Jun 8, 2001, 5:05 AM
Post Re: [UPDATE] Logo upload rewrite
pugdog 4612 Jun 8, 2001, 10:26 AM
Post Re: [UPDATE] Logo upload rewrite
pugdog 4595 Jun 9, 2001, 12:42 AM