Page 1 of 7

[ABD] Multiple File Upload 0.0.3

Posted: Wed Sep 12, 2007 8:31 pm
by romano
MOD Title: Multiple File Upload
MOD Description: Multiple File Upload in Topics
MOD Version: 0.0.3

MOD Download: http://geocities.yahoo.com.br/rodrigoro ... _0.0.3.zip

MOD Screenshot:
Image

Re: [ALPHA] Multiple File Upload

Posted: Wed Sep 12, 2007 10:13 pm
by x-fi6
Can you make a [-] button? :)

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 12:43 am
by ac_roma
nice idea ;)

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 1:00 am
by romano
x-fi6 wrote:Can you make a [-] button? :)
Open: styles/prosilver/template/posting_attach_body.html
FIND

Code: Select all

	<fieldset class="fields2">
	<dl>
		<dt><label for="fileupload">{L_FILENAME}:</label></dt>
		<dd>
			<input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" /> 
			<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />

		</dd>
	</dl>
	<dl>
		<dt><label for="filecomment">{L_FILE_COMMENT}:</label></dt>
		<dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
	</dl>
	</fieldset>

REPLACE WITH

Code: Select all

	<fieldset class="fields2">
	<dl>
		<dt><label for="fileupload">{L_FILENAME}:</label></dt>
		<dd>
			<input type="file" name="fileupload" id="fileupload" maxlength="{FILESIZE}" value="" class="inputbox autowidth" /> <a href="#FILES" onclick="javascript:add_more_upload()">[+]</a>
		</dd>
	</dl>
	<input type="hidden" name="count" id="count" value="0" />
	<dl>
		<dt><label for="filecomment">{L_FILE_COMMENT}:</label></dt>
		<dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
	</dl>
	<div id="multiple">
	
	</div>
	<a name="FILES">
	<dl>
		<dd>
			<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
		</dd>
	</dl>
	</fieldset>

Open: styles/prosilver/template/posting_buttons.html

FIND

Code: Select all

	var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
Add before

Code: Select all

	function add_more_upload() {
		var new_total = Math.round(document.getElementById('count').value) + 1;
		var div = document.getElementById('multiple');
		var childdiv = document.createElement("div");        
                childdiv.setAttribute('id','multiple'+new_total); 
		var html = "<dl><dt><label for='fileupload'>{L_FILENAME}:</label></dt><dd><input type='file' name='fileupload" + new_total + "' id='fileupload" + new_total + "' maxlength='{FILESIZE}' value='' class='inputbox autowidth' /><a href='#FILES' onclick='javascript:add_more_upload()'>[+]</a><a href='#FILES' onclick='javascript:remove_more_upload(" + new_total + ")'>[-]</a></dd></dl><dl><dt><label for='filecomment'>{L_FILE_COMMENT}:</label></dt><dd><textarea name='filecomment" + new_total + "' id='filecomment" + new_total + "' rows='1' cols='40' class='inputbox autowidth'>{FILE_COMMENT}</textarea></dd></dl>";
		childdiv.innerHTML = html;
		div.appendChild(childdiv) ;
		document.getElementById('count').value = new_total;
	}

	function remove_more_upload(id) {
       var str = 'multiple' + id;
	   document.getElementById(str).innerHTML = '';
	}
Screenshot :
Image

;)

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 3:29 am
by andrewloh
Cool.. this is what i am looking for since version 2.
How can I change to make it start by 5 upload entries ?

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 3:51 am
by playerfr
nice idea :) Thanks

Any way to add a javascrip or flah progress bar when uploading ? :?

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 12:45 pm
by romano
andrewloh wrote:Cool.. this is what i am looking for since version 2.
How can I change to make it start by 5 upload entries ?
Open: styles/prosilver/template/posting_layout.html

Find:

Code: Select all

subPanels(show_panel);
Before add :

Code: Select all

	for(i=0;i < 5;i++){
	  add_more_upload();
	}
:D

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 2:58 pm
by Trinity
This is a great addition, and something I was looking out for.

Thank you.

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 7:49 pm
by playerfr
romano for Progress bar is it possible ?

Re: [ALPHA] Multiple File Upload

Posted: Thu Sep 13, 2007 8:25 pm
by romano
playerfr wrote:romano for Progress bar is it possible ?
Exists in the style Subsilver2 .
In the code of posting.php a function upload_popup.
We have that to discover, as it qualifies it for to prosilver.

Image

Re: [ALPHA] Multiple File Upload 0.0.2

Posted: Fri Sep 21, 2007 7:20 pm
by romano
New version .

Next features :
- adequacy of mod for IE7 (subsilver2).
- Messages of error for archive

Re: [ALPHA] Multiple File Upload 0.0.2

Posted: Thu Oct 04, 2007 7:27 am
by soniceyepod
Hello,

I have spent about three days working with this mod on my phpbb3 site.

I like that it allows multiple uploads. But what I want is for it to always load the same number of upload slots and never be dynamic.

I also was trying for hours and hours to make it let me get rid of the comments for uploaded files.

I was able to get rid of the comments text boxes and get a nice stack of upload slots that would upload files just fine but when I would go to delete one before submitting the post it would delete all the uploads below the one I wanted to delete as well. Leaving all the ones above it alone.

So if somebody could tell me how to have two columns of 10 upload slots that do not have any area for inputting comments that would be very very cool. Like I said I almost had it working.

Re: [ALPHA] Multiple File Upload 0.0.2

Posted: Sun Oct 07, 2007 6:59 am
by Flai
Really great mod! :geek:


Three comments:

In: styles/prosilver/template/posting_attach_body.html

Code: Select all

   <a name="FILES">
Where is the closing tag? :?:


It looks terrible on my testboard (fresh RC5 installation, prosilver, german, firefox): :roll:
Image
Image


With my IE7 it doesn't work. If I press the [+], nothing happens. :|

Re: [ALPHA] Multiple File Upload 0.0.2

Posted: Mon Oct 08, 2007 7:32 pm
by soniceyepod
<td>
<a name="FILES">
<input type="hidden" name="proxid" id="proxid" value="1" />
<input type="hidden" name="count" id="count" value="0" />
<input class="btnlite" type="submit" style="width:150px" name="add_file" value="{L_ADD_FILE}"onclick="popup_progress_bar();" /></a></td>

This is where I put the missing closing tag and the [+] worked after that.

Re: [ALPHA] Multiple File Upload 0.0.2

Posted: Fri Oct 12, 2007 9:43 pm
by Flai
Now it works correct ... great. :)


I've changed something for prosilver style:
______________________________

In "styles/prosilver/template/posting_attach_body.html"

Find:

Code: Select all

<a href="#FILES" onclick="javascript:add_more_upload()">[+]</a>
Replace:

Code: Select all

<input type='button' class='button2' name='files_' value='+' style='width: 40px' onclick='add_more_upload()' title='' />
______________________________

In "styles/prosilver/template/posting_buttons.html"

Find:

Code: Select all

<a href='#FILES' onclick='javascript:remove_more_upload(" + id + ")'>[-]</a>
Replace with:

Code: Select all

<input type='button' class='button2' name='files_" + id + "' value='-' style='width: 40px' onclick='remove_more_upload(" + id + ")' title='' />
______________________________

Image

Image

Just an idea. :geek: