coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: klaeuser on June 30, 2008, 02:17:13 PM

Title: Different allowed Picturesize in diffrent Categories
Post by: klaeuser on June 30, 2008, 02:17:13 PM
Hello all,

we have a Problem with our public Coppermine-Gallery realted to a Photography-Board. The allowed picturesize for the upload is 1024x1024 px.
Now we want to have one Category with a larger Imagesize (about 5000x1024px).
Is it possibe to change the picturesize/imagesize for one dedicated category.

I so not work so long with Coppermine, so I hope it is not an very stupid question.

If someone is intrested you can find the gallery on http://www.freiesfotoforum.de (Language is German)
Title: Re: Different allowed Picturesize in diffrent Categories
Post by: Stramm on June 30, 2008, 02:39:34 PM
If you auto resize images:
Without having tested this I can say that it's harder for cat but maybe possible without huge core code changes for albums.
For that you'd have to modify include/picmgmnt.inc.php

Where the fullsized image's getting resized you'll have to add an if clause ( if ($aid=6) {//here some code for the resizing of the huger pics for the album with the id 6} else {//standard code})
Use the same code for both with just adapting $CONFIG['max_upl_width_height'] to the size you want to allow... eg 5000
I hope you get the idea. However there may occur other problems...

If you do not make use of auto resize:
You need to edit upload.php ... search for $CONFIG['max_upl_width_height'] to find what you need to edit.

Also have a look at db_input.php (again: search for $CONFIG['max_upl_width_height'] )
If you use the admin tools, then util.php is another file to edit
Title: Re: Different allowed Picturesize in diffrent Categories
Post by: klaeuser on June 30, 2008, 02:53:04 PM
Thanks for your answer  :)

I dont want auto rezise. The limit should be the Maximum size for the users to upload pictures otherwise the image will be deleted.

I have found the entry for the check, but i have in the Moment no solution to change it for one Category.
I think it will cause very much work for a not so php-knowing guy like me  :P

Title: Re: Different allowed Picturesize in diffrent Categories
Post by: Stramm on June 30, 2008, 07:19:44 PM
Without some programming skills I'd say it's hard. However doable if you know the basics.
Title: Re: Different allowed Picturesize in diffrent Categories
Post by: klaeuser on June 30, 2008, 08:46:12 PM
I have some programming skills, but C++ would be much better.

Can you help me with an idea what the best way is ???
Title: Re: Different allowed Picturesize in diffrent Categories
Post by: Nibbler on June 30, 2008, 08:50:55 PM
The category (album) is not selected until after the file has been uploaded, so you can't do this easily.