Gossamer Forum
Home : Products : Links 2.0 : Customization :

Ok.. how about this: Image Gallery

Quote Reply
Ok.. how about this: Image Gallery
Just as the subject suggests - use Links 2 to do an image Gallery. Most of it is easy, such as making a thumbnail, and having it go to a larger image... This would enable a description, as well a user ratings, etc, etc.

BUT.. Here's the tough part: How do I handle uploads for user submissions? I'll need error checking, as well, IE. duplicate file names.

They'd have to upload 2 versions - a thumbnail image and a fullsize image.

Any ideas?


------------------
A social life? Where do I download THAT?


Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
you'd have to modify the add forms and modify forms...but dont ask me how ya'd do that...
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Ok. I can do everything except for the file uploading.

Here's the rub: It appears that trying to use CGI-LIB.pl is going to conflict. (duplicate file read methods.)

I HAVE to get this done. Is there no one out there who can help?

ALL I need is how to upload a file. (Ie. they click on submit, it grabs the file that they entered earlier.)



------------------
A social life? Where do I download THAT?


Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
I alsow would like to know how to edit Links 2.0 so it could alsow upload files..
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Take a look at the code in the Gossamer File Manager (FileMan) script. It contains code for uploading that could be integrated into Links.

I hope this helps.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Well, I have a solution -- but it's NOT very portable. I had to completely rewrite the add.cgi to use CGI.pm.

Alex, why didn't you use CGI.pm? It's MUCH easier, imho.

Anyways.. when I get it finished, I'll post a link to how to do this.

------------------
A social life? Where do I download THAT?


Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Hi Twyst,

I was going to suggest rewriting with CGI.pm, but seems you've already started that. =)

The reason for not using it is twofold:

1. I do some custom stuff with the form processing.
2. I've found some people don't have the module installed. I'm amazed at all these supposedly "standard" modules that are not installed everywhere. I try to avoid including anything system dependant if I can.
3. I really like being able to access info via a hash rather then a method call.

Hope you get it to work!

Cheers,

Alex
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
take a look of the upload feature of "chrishintz", he made an add.cgi with upload-possibilities.

(.....but it needs some tweaking.)
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Well, his certainly looks better than mine - I totally replaced the add.cgi with my version, and just made it enter data into the database itself. The one drawback to my version, is the display. It looks like crap. :/

Other features I've done as part of this, are to delete a file when the link is deleted, or is rejected. The one problem I still have, is generating thumbnails.

Still working.....


------------------
A social life? Where do I download THAT?


Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
I would love to get youre snippet of code....

Please mail it to: chrishintz@lanx.nl
Quote Reply
Re: Ok.. how about this: Image Gallery In reply to
Hi guys !

When you prefect this I would be interested to see the end result. Have someone in New Zealand who runs a car mart and would like to put his stock up on Internet - this might be a good way to handle his site.