coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Upload => Topic started by: the_beav on August 24, 2004, 09:47:02 PM

Title: Increase the number of files to upload on the form?
Post by: the_beav on August 24, 2004, 09:47:02 PM
I'm currently using Coppermine 1.3 for a few clients that like to upload their own pictures. By default, Coppermine allows 5 pictures to be loaded at once...the form has five file location text boxes.

Is there a way to increase this to say, 20 for example? Just to give them the option on the few occassions that they load more than 10 files.

Thanks in advance...

-b
Title: Re: Increase the number of files to upload on the form?
Post by: Casper on August 24, 2004, 10:43:10 PM
Yes there is a way, by changing the setting directly in the database.  Browse to the usergroups table, and change the setting there.
I tested this by changing the setting for admin on my site to 20, and the page came up with 20 upload boxes.

BUT, there may be timeout problems when uploading so many.
Title: Re: Increase the number of files to upload on the form?
Post by: the_beav on August 24, 2004, 11:48:42 PM
Perfect. Worked like  a charm!

Thanks a ton man.
Title: Re: Increase the number of files to upload on the form?
Post by: Casper on August 25, 2004, 12:03:24 AM
Just realised this way will only work until the next time the groupmanager is changed.

A better way, is to edit your groupmgr.php as follows;

Find code;

// Create permissible number of file upload boxes box.
     echo "<td class=\"tableb\" align=\"center\">";
     echo "<select name=\"num_file_upload_{$group['group_id']}\" class=\"listbox\">";
     for ($i = 1; $i <= 10; $i++) {
     echo "<option value=\"$i\"";
     if($group['num_file_upload']==$i){echo "selected=\"selected\"";}
     echo " >$i</option>";
     }
     echo "</select>";
     echo "</td>";


and change the '10' to '20', as here;

// Create permissible number of file upload boxes box.
     echo "<td class=\"tableb\" align=\"center\">";
     echo "<select name=\"num_file_upload_{$group['group_id']}\" class=\"listbox\">";
     for ($i = 1; $i <= 20; $i++) {
     echo "<option value=\"$i\"";
     if($group['num_file_upload']==$i){echo "selected=\"selected\"";}
     echo " >$i</option>";
     }
     echo "</select>";
     echo "</td>";
Title: Re: Increase the number of files to upload on the form?
Post by: Joachim Müller on August 25, 2004, 10:28:29 AM
as Casper already suggested, increasig this value to 20 is not recommended, as your customers are bound to run into time-out issues if they upload so mayn pics at once. I suggest leaving 10 as maximum, as settable in the groups manager.

GauGau
Title: Re: Increase the number of files to upload on the form?
Post by: pzfc on August 22, 2005, 04:48:36 PM
ive tried the above instructions but for some reason all i get is 5 upload boxes? how do i increase it?
Title: Re: Increase the number of files to upload on the form?
Post by: Joachim Müller on August 23, 2005, 10:01:15 AM
groups manager. Read the docs.