Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Image Gallery/Picture Post 3

Quote Reply
Image Gallery/Picture Post 3
For those waiting anxiously...

I have hacked together an image upload, and multiple upload script. It takes the uploaded .jpg file (the only format at this time) and creates a thumbnail for it. That should generalize to other formats -- without using ImageMagick.

It needs a lot of cleaning up, and still has to insert into the database, but the major hurdles seem to have been jumped without much problems (yet).

The database insertions are just standard "add.cgi" stuff.

Next step is figuring out some logic to allow easy organizing of the uploads. Creating a workable scheme that is flexible enough to accomodate at least 80% of those who would like to use the program may be an effort in futility, and some "hard coded" scheme may have to be adopted... but I'm hoping for the best :)

As always, .GIF is problematic because of the UniSYS patents.


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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
Ohhh.... and making this thumbnailer mod_perl compatible may also be an exercise in futility. Hope for the best, but it requires a call to system level to run filters, and at that point things start to get grey.



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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
Uploads & multiple uploads are working. Binary files are checked for a known extenstion, then converted to thumbnails.


I had to make a choice - the thumbnails are all JPG format, because of the Unisys patent. No reason to make it complicated....

But, interestingly, NN 4.7 (at least) and the last few versions of MSIE will display an image based on the CONTENT of the file, not the file extension. What this means, is that if you have a FileName_01.gif file,and convert it, the output name could be FileName_01.gif, even though the format is JPG.

I'm not sure I'll allow this, as it's really bad form... but, it's a possibility.

The library I'm using will allow rotation, border, drop-shadow, and resizing. Other features may be added in, but for now, I'm trying to stick with easily available, or easily rewritten routines and utilities (so far NetPBM and Image::Size, both easily installed from CPAN).

I should have a demo shortly that will allow uploads, and display the thumbnail to you, (I'll delete that directory on a regular basis <G>), and some connection to Links SQL too. (entering a record).

I'm excited about this :) (as if you couldn't tell).

Right now the features are:

1) Links are "images" (my postcards.com site, for example).
2) Display in several customizable formats (and you can make your own)
3) Compatibility with the Links error/template system for integration into your site.
4) Images can be uploaded via HTML by browsing your machine.
5) Images uploaded will be automatically thumbnailed, and set to "pending"
6) Ht/Width/Size information inserted into the database record.
7) Extension-oblivious format determination -- to properly set the file extension for download (do you trust your users?? <G>)

Anyway, that is where I'm at now.

By tomorrow, I hope to have the "add_image.cgi" working, which is how to add an image-link to Links.

After that, I'll need to make some changes to the Links database structures, to accomodate the images, and handle "isImage" and "Gallery" status properly.

Hopefully, after that, a final "alpha" can be released.

It will _not_ be a plug-in at this time. Hopefully, during the beta it will be, but I have a feeling that may require waiting for the 2.0 version as I indicated previously.

BTW: If anyone is interested:

This will have more features than amost any other gallery program out there, and will of course integrate as fully as possible with your existing Links SQL site. It's born of need on our own sites, so it's been well thought out, and will be maintained for the forseeable future (it's not a hit and run). Our sites have been live since 1993. Our Digital Images have been circulating since about 1985 or 86. We'll have image subscriptions to populate your card sites with our own brand of humor -- no animations or non-family safe stuff.

This is a major add-on to Links SQL. Pricing will be $125 for the complete package during the alpha/beta stages, to anyone who wants to install it and feedback. (THAT is important.. you actually have to try to run it and let me see what you are doing!) And, will include life-time updates. After that, the price will be $250, and include updates through one major version upgrade ie: 1.x -> 2.0, 2.x -> 3.0, etc. The complete package will be defined on our site, but will include the upload scripts (images and non-images), image upload, thumbnailer, image gallery templates (basic), postcards script (including addresses, image tracking, favorites, custom templates, and more), and anything else that comes along during development (including eventually integrating with GossamerMail for giving users postcards/email accounts as well!). Our goal is to rival some of the larger stock-image houses, not the "thumbnail galleries" or "tgp" scripts. I will do my best to keep pace with GT's release of plug-ins, file attachments, user-authentication, etc. As you know, Our sites are based on these scripts, so it _is_ our job, and in our interest to keep them updated, and working. You also know how I feel about easy to maintain code, and upgradability, so nothing cuts corners or is a black-box 'hack'.

All code requires a working install of Links SQL 2.0. It will also require the installation of some additional perl modules via CPAN, not a problem for dedicated servers.

Once the first release is out, I'll move all discussion to my site, to not clutter this one, and just post updates here.

Thanks for all the feedback, suggestions, and site-pointers! Please keep them coming. I can't do everything, in every way, but the more "needs" expressed, the more flexible the base code will be.

Nothing is being hardcoded (except a few "assumptions" as explained before), and the configuration is done via a long, long list of user-selectable behaviors, from directories and paths to sizes and attributes.




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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
Brilliant pugdog, looking forward to this.

Couple of questions (some about pricing)

Definitely want to be a "beta tester" at that price. The question is, if i fail to install it (the cpan module thing i have never done but i guess following instructions is not a problem) are you going to include installation? (i have a dedicated..)

Other things:

1) WOW you got thumbnailing without imagemagik.. you star! As you can now do this can you do category walking thumbnailing creation so we don't have to bother doing it on our own server.
2) image upload by your own machine i see is avaliable, what about from the web.
3) admin mass web upload. Type in a site url http://www.site.com/images.html it goes there, finds all the images that are above x kb (so we don't download bullets), creates a page with them, you checkbox remove the ones you don't want (banner ads), press go and it uploads the lot. a v3.0 i guess.
4) The $125 price.. (fair.. $250 a bit much for poor students like me :) ) does that mean we get free upgrades up to v2.0 as i assume the beta iv v0.x as opposed to v1.0 see what i am getting at.

Anyway, looking forward to this. I have exams at the end of the week but after that i am ready to test, test test :)

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
ar.. one thing are you actually planning on category waling upload, so we can upload files by ftp and press "go". This dosen't appear to be in the script yet but i would think would be a very important/essential(?) feature.

One other thing that might be useful for some people (image galleries especially) would be password protection of certain directories, done on a user by user basis perhaps).

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
In Reply To:
ar.. one thing are you actually planning on category walking upload, so we can upload files by ftp and press "go".

One other thing that might be useful for some people (image galleries especially) would be password protection of certain directories, done on a user by user basis perhaps).
The automatic file finding is definitely on the list. I think the first version will be a "re-index this category" sort of deal. But, I have a huge gallery of photos, that I'm in no way looking to index by hand <G> I have about 30,000 from my BBS days, and 2-3,000 from the current web days.

Password protection is built into links.

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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
>> 1) WOW you got thumbnailing without imagemagik.. you star! As you can now do
>> this can you do category walking thumbnailing creation so we don't have to
>> bother doing it on our own server.

Not in the first version. The first version, or alpha/beta's are really getting the various parts of the routines to work. Once that is done, the extra features can be added in. I'm trying to make sure each "function" is stand-alone, callable, and can be used by any routine at any time.

>> 2) image upload by your own machine i see is avaliable, what about from the web.

I'm not sure what you mean? But, LWP is installed if you are running Links (most likely) and grabbing files from one machine to the next can be done with that.

>> 3) admin mass web upload. Type in a site url http://www.site.com/images.html
>> it goes there, finds all the images that are above x kb (so we don't
>> download bullets), creates a page with them, you checkbox remove the ones
>> you don't want (banner ads), press go and it uploads the lot. a v3.0 i guess.

Well.... <G> I'm really not looking at this program as a site-hijacking program. I'm not sure I'll be building this in just this way, but I probably will eventually try to add some point/click uploading/moving to some sections.

>> 4) The $125 price.. (fair.. $250 a bit much for poor students like me :) )
>> does that mean we get free upgrades up to v2.0 as i assume the beta iv v0.x
>> as opposed to v1.0 see what i am getting at.

The $125 price is basically a "give back" to the current links community, and those who are willing to suffer with the bugs and early limited releases to give feedback. It's a full license, with unlimited upgrades. Once the program is released, in order to avoid long-range problems, we are limiting the "free" upgrades to the next version. It's simple, it's clean, and that way people get all the releases for whatever version they are running. Major versions will look as different as Links 1.1x and 2.x <G> Think of it as a "Charter License" vs the "user license" <G>

Also, the program will change drastically in the first few releases, as bugs, and new ways of doing things will become evident. I don't feel right charging a full price until the program is in 'production' mode. So, the $125 price is half the anticipated price, and 1/2 to 1/8th what others are charging for similar systems -- and no additional upgrade costs.

I know it's sort of unclear, but this is moving so fast, I haven't had time to do any of the promotional/feature type docs or messages. I'm more concerned with getting the code working ASAP. I should be adding in the "user" data and log-in checking tonight. Uploads are going good :)


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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
Thanks pugdog, nothing really to add there apart from the multiple images... a use for me would be sites that would like to have their images included in the directory (original art perhaps they want there so people see it, rate it, visit their site, send as postcards etc) but of course i can see how it could be misused.

anyway, looking forward to it. cheers.

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
Will your mod do all the things needed while modifying by user??? Let it as it is => only changing the other fields, delete, add or add and replace!???
If so please send me details for buying it.

Another question to Alex!
What is with the normal uploading-feature as in 1.13?
Is it buildin in link2 or do you lost this cause Pugdog wants to start making money with his mod?

Robert

Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
on this, i assume that all the user based configuration options are going to be seperate from what we currently have on a user basis.

Also, we will be able to assign users as editors for certain image categories in the same way as we can links.

Also, as it will share the link database, in "browser" will a link that is an image just show the relevant image fields and a link that is a normal link just show the link information. I don't want to confuse my editors who say just add links to the database as well as those whose job is to moderate image uploads.

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
>> Will your mod do all the things needed while modifying by user???
>> Let it as it is => only changing the other fields, delete, add or
>> add and replace!??? If so please send me details for buying it.

Right now as I indicated, it doesn't do anything but upload the files. It's up to you to figure out what to do with them. I really don't have any interest - vested or otherwise - to make this mod work for version 1.1x. Remember -- I'm doing most of this because _I_ need it for my business (which is why I still support the current versions of all my code -- I'm using them!).

While upgrading to NG might seem like a big deal, you won't be sorry. Everything works better. Purely and simply. Down the road, building things, will be much, much easier. You add error reporting to any script by doing something such as :

print $IN->header();
print Links::SiteHTML::display ('error', { error => $results->{'errors'} });

You can change the error display by simply changing what 'error' template you pass, and what message/hash you pass in error =>

You can even pipe that throug the "languages" utility to make it appear in the current language:

print Links::SiteHTML::display ('error', { error => Links::language ('JUMP_INVALIDID', $id) });

If you _need_ this for 1.1x, I can see what exists in the current code, and how this will tie in. What my code does is upload the file. It takes it from the local machine, to the server, checks it a bit, determines if it's binary or ascii, does post-processing on the binary file (thumbnail) and then terminates. It's up to whatever called this routine to take over from there. I don't work cheap, because I have to cover my time, and I don't see this mod being terribly useful in light of the NG mod on the way. I (and my business) also have no use for a 1.1x mod that uploads files -- that is the _biggest_ factor in deciding how I prioritize projects.


>> Another question to Alex!
>> What is with the normal uploading-feature as in 1.13?
>> Is it buildin in link2 or do you lost this cause Pugdog wants to start
>> making money with his mod?

What I do, and what Alex does really don't affect each other. I don't work for GT, and I don't conspire with them :) I do give them lots of ideas and suggestions, which I hope are helpful -- many of which have been used in one form or another in each new release.

I'm only charging for the NG mods, because they are "corporate assets" and as such, they are owned by the corporation I work for, not me, personally. Because it takes up my "time" and were developed on what could be construed as "company time" there is a price tag.

But, this doesn't affect what GT does, and what I'm doing is "around" what I anticipate GT will be adding in to the NG scripts.


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


Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
It seems we talk about different things:

I want to know if your FINAL mod,
could do:

User-add: New link with 1 to x uploads (pics,pdf, doc)
User-mod:
- Change fields as normal
- add new files
- delete files
- replace files

The same to admin:

I talk about LINKS 2; for 1.13 i have this stuff done (without modifying by user, i have solved this by doing an add, if files are send with and manually delete the old link)

Robert

Quote Reply
Re: Image Gallery/Picture Post 3 In reply to
>> User-add: New link with 1 to x uploads (pics,pdf, doc)
>> User-mod:
>> - Change fields as normal
>> - add new files
>> - delete files
>> - replace files
>>
>> The same to admin:

I'm not sure what you mean. Right now the upload will upload _any_ file,
and figure out if it's a binary or ASCII file. You can then branch to do
any sort of processing. Once the plug-in system is working, maybe those
can be "hooks" that can actually be tied into, so you can pick what you
want to do with the files once they are on the system.

I don't have enough experience or understanding of the plug-in system as yet to do anything like that.

Also, I'm not writing the 'attachments' code for Links NG, so I don't know how that is being implemented, if at all yet. That might not be being worked on until the 2.01 release, or something.

Attachment management is something that has to be "centralized" if it's going to be part of the Links distribution. Then, mods like this can replace, or extend it.



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