creating single directory repository... creating single directory repository...
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

creating single directory repository...

Started by fogpeople, June 28, 2005, 02:33:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fogpeople

Hi all, I may be cross-posting so apologies :-)

I have Coppermine up and running and working great.  What I need to do is for all users photos to upload to the same flat directory...and thumbnails to go in a separate directory.  Ultimately I want one single huge cache of pix so I can automate another script to pull from it.  The thumbs would mess that up.  Is there an easy setting for repository management I'm missing?

Thanks in advance...
michael

kegobeer

No.  Coppermine creates a subdirectory for each member of the gallery and only allows them to upload into their own subdirectory.  Thumbnails and intermediate images are put into that same subdirectory.  I recall a recent post that talks about putting thumbnails into a separate directory, but you'll have to search for it.

Have you looked at CPMFetch?  It already pulls images from Coppermine for use in other non-Coppermine pages.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Tranz

You could modify the script to ignore files with prefix "thumb_". I use my gallery files for different scripts (my signature for example) and I filter files that way except I choose thumbnails.

Nibbler

Enabling silly safe mode would disable the creation of user subfolders and dump everything straight into userpics.

fogpeople

Silly safe mode eh?  Is that for real or a euphemism?  (I'll hit the docs and see...)

And filter my random image puller script?  Not a bad idea, I'll look into it (it's an off-the-shelf script, so I haven't peeked into it's guts yet)

thanks everyone

fogpeople

Some further research.  Hrmm..

CPGFetch is a thumbnail puller, and a table generator as well, I just want to pull a random image from the entire gallery pool, not the thumbnail, and I just want the image.

I'm reading the code for GauGau's ssi hack now, but it also looks like it pulls thumbs specifically (I'd want the opposite)

Here's what I'd like to accomplish:
have users need to register to upload pix to a repository (Coppermine)
allow registered users to view their own and others pix by name (Coppermine)
allow registered users to include contact info about themselves (Coppermine)
now, here's where it gets weird:

assuming I can control that all the pix uploaded are the same specs (i.e. 1024x768, mostly dark, etc.):
pull a random image per page load that uses that image as a background
include the random image's uploader and contact info in a small box on the page

So, that's why I'd prefer one single upload directory, and why I'd like to dump the thumbnails somewhere else.  I had convinved myself that with a few little scripts that Coppermine would do the job well...even be overqualified for it actually.  Am I close? :-)

Thanks,
michael

Joachim Müller

why pull the random image from the file structure and not the database - would be a lot more effective? After all, that's what cpmFetch and ssi-mod both can do. With ssi-mod, the codecpg_thumb(1,0,1,"182",1);would pull a random thumbnail from album 182 for example. Use cpmFetch, everything would be re-inventing the wheel imo.

fogpeople

Thanks for the reply!  Obviously I need to examine that hack more carefully.

Just to make sure I'm hearing this right though, I'm looking to pull a full-size image, not the generated thumb.  And I want to be able to pull from all of the gallery images... though to be honest I only have one album and I've disabled private albums...so perhaps the database IS the best place to yank it from.  That would necessitate losing the image rotator I'm using now and definitely using something that is hacked to CPG specifically. 

I'll do some more reading...

Joachim Müller


fogpeople

Wow, what a great deal of dev work going on here, hats off to you folk!

I don't think imageget will do what I need it to because I want to pull a random image and also it's associated user info for posting a small credit box and link on a page.

CPMFetch will do the pulling just fine from the looks of it, but does everything go right into it's proprietary pages?  I'd love to just be able to yank a few necessary variables to throw into an already existing page.  Doable? (I'm reading the docs currently as well, please don't think I'm lazy!)

-michael

Nibbler

There's nothing to stop you simply opening a db connection to the coppermine db from your page, pulling a random image and displaying it. You can write it from scratch to do exactly what you want.

fogpeople

I think that's true.  Previously I was looking at it from the file point of view, and I got stumped on the multiple directory structure.  I suppose now it's slightly more trivial to pull a random image from the database directory along with some extra info.

Still, with at least two major addons that essential do this, it seems like it would be easier and less wheel inventing if it was just a matter of using the functions and variables and retrofitting it.  I'm really surprised no one has done this before, since i find it very hard to believe I'm doing anything extraordinary :-)

And really, CPGFetch would be great if it didn't have it's layout code merged with it's functionality.  I want to tweak the random pull and use the info a certain way, and just not have it go into a table of thumbnails.  Maybe it IS hackable and I just haven't pulled it apart enough....

Joachim Müller

I'm not sure that vuud (the author of cpmFetch) reads this board as well, so I suggest you post your suggestions (or a link to this thread) over on the sub-board that deals with cpmFetch (and that vuud moderates).  :)