MyBB Community Forums

Full Version: Upload many attachments at once...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried this plugin:
http://mods.mybb.com/view/multi-attachments

I activate it, but nothing...

Does anyone have any other plugins that can do this?

I'm using MyBB 1.6.3.
What browser?
Chrome only allows two uploads at a time, I think, it's strange.
Try firefox.
(2011-07-23, 04:22 AM)Concon Wrote: [ -> ]What browser?
Chrome only allows two uploads at a time, I think, it's strange.
Try firefox.

I'm using Chrome, but I don't even get 2, I still have the 1 at a time as before.

I don't have Firefox installed...

The only browsers I have are Chrome, Safari, and IE9... I use Chrome the most.

Update:
I tried IE9, and Safari and nothing... using that plugin.
Open post_attachments_new template, find:
<tr>
<td class="trow1" width="1"><img src="{$theme['imgdir']}/paperclip.gif" alt="" /></td>
<td class="trow1" style="white-space: nowrap"><strong>{$lang->new_attachment}</strong> <input type="file" name="attachment" size="30" class="fileupload" /></td><td class="trow1" align="center"><input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}"  tabindex="12" />
</td>
</tr>

Replace:
<script type="text/javascript">
window.onload=addInput;
var num = 0;
function addInput()
{
num++;
var br = document.createElement('br');
var b = document.createElement('b');
var text = document.createTextNode('Upload Attachment: ');
b.appendChild(text);
	var x = document.getElementById("uploads1");
	input = document.createElement("input");
  	input.setAttribute("type", "file");
  	input.setAttribute("name", 'attachment' + num);
  	input.setAttribute("size", "30");
  	input.setAttribute("class", "fileupload");
x.appendChild(b);
x.appendChild(input);
x.appendChild(br);
var number = document.getElementById('numbersa');
number.setAttribute('value',num);
}
</script>


<tr>
<td class="trow1" colspan="3" id="uploads1"><div id="uploads"></div></td>
</tr>
<tr>
<td class="trow1" colspan="3">
<center><input type="button" onmousedown="addInput();" value="Another Attachment"/> <input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}"  tabindex="12" /></center>
</td>
</tr>

<input type="hidden" id="numbersa" name="numbersa" value="test" />
(2011-07-23, 04:59 AM)Sama34 Wrote: [ -> ]Open post_attachments_new template, find:
<tr>
<td class="trow1" width="1"><img src="{$theme['imgdir']}/paperclip.gif" alt="" /></td>
<td class="trow1" style="white-space: nowrap"><strong>{$lang->new_attachment}</strong> <input type="file" name="attachment" size="30" class="fileupload" /></td><td class="trow1" align="center"><input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}"  tabindex="12" />
</td>
</tr>

Replace:
<script type="text/javascript">
window.onload=addInput;
var num = 0;
function addInput()
{
num++;
var br = document.createElement('br');
var b = document.createElement('b');
var text = document.createTextNode('Upload Attachment: ');
b.appendChild(text);
	var x = document.getElementById("uploads1");
	input = document.createElement("input");
  	input.setAttribute("type", "file");
  	input.setAttribute("name", 'attachment' + num);
  	input.setAttribute("size", "30");
  	input.setAttribute("class", "fileupload");
x.appendChild(b);
x.appendChild(input);
x.appendChild(br);
var number = document.getElementById('numbersa');
number.setAttribute('value',num);
}
</script>


<tr>
<td class="trow1" colspan="3" id="uploads1"><div id="uploads"></div></td>
</tr>
<tr>
<td class="trow1" colspan="3">
<center><input type="button" onmousedown="addInput();" value="Another Attachment"/> <input type="submit" class="button" name="newattachment" value="{$lang->add_attachment}"  tabindex="12" /></center>
</td>
</tr>

<input type="hidden" id="numbersa" name="numbersa" value="test" />

So replace that tiny section, with all of the code in the second one?
(2011-07-24, 12:05 AM)Chris2005 Wrote: [ -> ]So replace that tiny section, with all of the code in the second one?

Yes, that is how this plugin works.
(2011-07-24, 03:10 AM)Sama34 Wrote: [ -> ]
(2011-07-24, 12:05 AM)Chris2005 Wrote: [ -> ]So replace that tiny section, with all of the code in the second one?

Yes, that is how this plugin works.

Thanks, it works now.