Increase the number of files to upload on the form? Increase the number of files to upload on the form?
 

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

Increase the number of files to upload on the form?

Started by the_beav, August 24, 2004, 09:47:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

the_beav

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

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

the_beav


Casper

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>";
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

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

pzfc

ive tried the above instructions but for some reason all i get is 5 upload boxes? how do i increase it?

Joachim Müller