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:
Open: styles/prosilver/template/posting_attach_body.htmlx-fi6 wrote:Can you make a [-] button?
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>
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>
Code: Select all
var panels = new Array('options-panel', 'attach-panel', 'poll-panel');
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 = '';
}
Open: styles/prosilver/template/posting_layout.htmlandrewloh wrote:Cool.. this is what i am looking for since version 2.
How can I change to make it start by 5 upload entries ?
Code: Select all
subPanels(show_panel);
Code: Select all
for(i=0;i < 5;i++){
add_more_upload();
}
Exists in the style Subsilver2 .playerfr wrote:romano for Progress bar is it possible ?
Code: Select all
<a name="FILES">
Code: Select all
<a href="#FILES" onclick="javascript:add_more_upload()">[+]</a>
Code: Select all
<input type='button' class='button2' name='files_' value='+' style='width: 40px' onclick='add_more_upload()' title='' />
Code: Select all
<a href='#FILES' onclick='javascript:remove_more_upload(" + id + ")'>[-]</a>
Code: Select all
<input type='button' class='button2' name='files_" + id + "' value='-' style='width: 40px' onclick='remove_more_upload(" + id + ")' title='' />