(update - problem described in my next reply)
I was easily able to find and delete the "Upload a ZIP file full..." text from the default add_photo.php file but I have not been able to actually change the number of files you can add. I want to remove the drop down list that allows one to select the number of files to upload and I only want one slot for uploading to show (default is 5). This is beyond my capability.
The reason I want to do this is give visitors only one space to upload one photo into the album -this would go a long way toward discouraging mega pic uploads.
What do you think? Possible? Been done? I did search but for this subject I came up dry. Most every question I have had I have found by searching :grin: TIA
Posts: 238
That's a good idea, thanks! This is what you need to do:
1.) Find these lines (line 37 for me):
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
if (!$boxes) {
$boxes = 5;
}</TD></TR></TABLE><!-- BBCode End -->
Change 5 to the number of boxes you want to show.
2.) Then find these lines (around line 78):
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
1. Select the number of files you want to upload:
<select name="boxes" onChange='reloadPage()'>
<?php for ($i = 1; $i <= 10; $i++) {
echo "<option ";
if ($i == $boxes) {
echo "selected ";
}
echo "value="$i">$i
";
} ?>
</select>
<br>
</form></TD></TR></TABLE><!-- BBCode End -->
And completely comment them out with HTML comment tags. E.g.:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
<!-- 20020205: Do not allow user to choose number of uploads
1. Select ...
...
</form>
-->
</TD></TR></TABLE><!-- BBCode End -->
3.) Then you probably want to remove the "2." from "2. Use the Browse button ..." (line 99 for me)
You can check it out <!-- BBCode Start --><A HREF="http://www.discobug.com/gallery/your_photos" TARGET="_blank">>> here <<</A><!-- BBCode End -->. Click on add photos, it's a public album. I set it to two boxes.
Posts: 7
It seems when I insert this code that it does exactly what I want but also photos won't upload ??? when pic is selected and upload is clicked it switches to the upload dialogue box but the photo never actually uploads -it just sits there acting lie the pic is uploading forever. I can't figure it out but maybe you can.
The problem lies in remming out this whole section:
Do not allow user to choose number of uploads
1. Select the number of files you want to upload:
<select name="boxes" onChange='reloadPage()'>
<?php for ($i = 1; $i <= 10; $i++) {
echo "<option ";
if ($i == $boxes) {
echo "selected ";
}
echo "value="$i">$in";
} ?>
</select>
<br>
</form>
Somehow I need to get rid of the "files you want to upload:" drop down list but keep something else in this snippet of code that allows/deals with uploading.
Thanks in advance cause I'm stumped! :smile:
Posts: 14
johncall: That part of the code is a completely separate form. It doesn't deal with the uploading form at all. So there's nothing more to be done but to comment it out and set the default number of boxes you want displayed. If you can't upload, then you have other problems or you changed the code incorrectly.
Posts: 7
Well that's not entirely true. You see if you go to ppmnt's <!-- BBCode Start --><A HREF="http://www.discobug.com/gallery/your_photos" TARGET="_blank">Gallery here</A><!-- BBCode End --> (which she links to in her reply) you'll see that you can't upload pics into her gallery. So the code hack the gave me has the same problem I experienced.
If I rem out this section as she says:
1. Select the number of files you want to upload:
<select name="boxes" onChange='reloadPage()'>
<?php for ($i = 1; $i <= 10; $i++) {
echo "<option ";
if ($i == $boxes) {
echo "selected ";
}
echo "value="$i">$in";
} ?>
</select>
<br>
</form>
I cannot upload any pics -as in it looks like it is transferring but nothing happens after that -no file ever does get transferred. If I un-rem it file uploading works again so there must be some connection.
Posts: 238
John -
I was gone over the weekend and didn't read all 300 something gallery emails I got in the meantime :eek: - thanks for sending me an email!
Alright, I found the problem. Thanks for pointing this out to me, it was a typical typo error: the very last "</form>" tag actually shouldn't be commented out. So instead of:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
<!-- 20020205: Do not allow user to choose number of uploads
1. Select ...
...
</form>
-->
</TD></TR></TABLE><!-- BBCode End -->
it should actually be:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
<!-- 20020205: Do not allow user to choose number of uploads
1. Select ...
...
-->
</form>
</TD></TR></TABLE><!-- BBCode End -->
This time I REALLY tested it! Try it out and let me know if it works now.
~Eva