Different allowed Picturesize in diffrent Categories Different allowed Picturesize in diffrent Categories
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Different allowed Picturesize in diffrent Categories

Started by klaeuser, June 30, 2008, 02:17:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

klaeuser

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)

Stramm

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

klaeuser

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


Stramm

Without some programming skills I'd say it's hard. However doable if you know the basics.

klaeuser

I have some programming skills, but C++ would be much better.

Can you help me with an idea what the best way is ???

Nibbler

The category (album) is not selected until after the file has been uploaded, so you can't do this easily.