coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: ElricM on September 27, 2007, 04:57:15 PM

Title: Limit # photos in an album and file capacity?
Post by: ElricM on September 27, 2007, 04:57:15 PM
Is there a way to limit the number of pictures that can be added to an album? I am currently looking at CPG to provide screenshots to a large game file download database. My thought is to (programmatically) create an album for each game mod uploaded and then allow the mod owner to upload screenshots for his/her mod. However I want to limit the number of pictures to say 6 per album. So the limit is not by user (a user could have 1 or many such mods) but by album.

Second question then is with regards to CPG's performance with large number of files and albums. The database currently has about 4000 mods, if I were to implement the above and everyone were to add 6 pictures that would be 4000 albums and 24000 pictures. Can CPG handle a gallery this large? I currently use Gallery 1.x, but not for this use, I find Gallery 1 tops out at around 5000 pictures and gets very slow if there are a large number of albums and nested albums (I understand CGP does not allow nested albums).

Ok, sneaking in a third question, does anyone have an example of code to create albums or add/delete pictures from a php script?

Thank you
Title: Re: Limit # photos in an album and file capacity?
Post by: Joachim Müller on September 28, 2007, 06:01:34 AM
Quote from: ElricM on September 27, 2007, 04:57:15 PM
Is there a way to limit the number of pictures that can be added to an album? I am currently looking at CPG to provide screenshots to a large game file download database. My thought is to (programmatically) create an album for each game mod uploaded and then allow the mod owner to upload screenshots for his/her mod. However I want to limit the number of pictures to say 6 per album. So the limit is not by user (a user could have 1 or many such mods) but by album.
Not available using the current user interface. You'll have to modify the core code to add this feature.

Quote from: ElricM on September 27, 2007, 04:57:15 PMSecond question
We have a strict "one question per thread" policy that you agreed to respect when signing up. In the future, please respect this policy.

Quote from: ElricM on September 27, 2007, 04:57:15 PMwith regards to CPG's performance with large number of files and albums. The database currently has about 4000 mods, if I were to implement the above and everyone were to add 6 pictures that would be 4000 albums and 24000 pictures. Can CPG handle a gallery this large? I currently use Gallery 1.x, but not for this use, I find Gallery 1 tops out at around 5000 pictures and gets very slow if there are a large number of albums and nested albums (I understand CGP does not allow nested albums).
There is theoretically no limit to the number of categories, albums and files in Coppermine. This is only related to server performance. If the server is powerfull enough, the numbers you propose should be no problem.

Quote from: ElricM on September 27, 2007, 04:57:15 PMOk, sneaking in a third question, does anyone have an example of code to create albums or add/delete pictures from a php script?
albmgr.php is a PHP script. It contains the code to create albums.

All your questions are not related to install. Moving from the install board to "misc".
Title: Re: Limit # photos in an album and file capacity?
Post by: Nibbler on September 28, 2007, 10:49:14 AM
Quote from: GauGau on September 28, 2007, 06:01:34 AM
albmgr.php is a PHP script. It contains the code to create albums.

Actually, it doesn't. delete.php does.