for All:
find in 'FUDforum/src/post.php.t'
/* newly uploaded files */
if (isset($_FILES['attach_control']) && $_FILES['attach_control']['size']) {
if ($_FILES['attach_control']['size'] > $MAX_F_SIZE) {
$attach_control_error = '{TEMPLATE: post_err_attach_size}';
} else {
if (!($MOD && $frm->forum_opt & 32) && filter_ext($_FILES['attach_control']['name'])) {
$attach_control_error = '{TEMPLATE: post_err_attach_ext}';
} else {
if (($attach_count+1) <= $frm->max_file_attachments) {
$val = attach_add($_FILES['attach_control'], _uid);
$attach_list[$val] = $val;
$attach_count++;
} else {
$attach_control_error = '{TEMPLATE: post_err_attach_filelimit}';
}
}
}
}
$attach_cnt = $attach_count;
} else {
$attach_cnt = 0;
}
and replace with
/* newly uploaded files */
for( $i = 0; $i < 3; $i++ )
{
$attach_filename = 'attach_control'.$i;
if (isset($_FILES[$attach_filename]) && $_FILES[$attach_filename]['size']) {
if ($_FILES[$attach_filename]['size'] > $MAX_F_SIZE) {
$attach_control_error = '{TEMPLATE: post_err_attach_size}';
} else {
if (!($MOD && $frm->forum_opt & 32) && filter_ext($_FILES[$attach_filename]['name'])) {
$attach_control_error = '{TEMPLATE: post_err_attach_ext}';
} else {
if (($attach_count+1) <= $frm->max_file_attachments) {
$val = attach_add($_FILES[$attach_filename], _uid);
$attach_list[$val] = $val;
$attach_count++;
} else {
$attach_control_error = '{TEMPLATE: post_err_attach_filelimit}';
}
}
}
}
}
and find in 'FUDforum/thm/default/tmpl/post_common.tmpl'
{SECTION: upload_file}
<input type="file" name="attach_control"> <input type="submit" class="button" name="attach_control_add" value="{MSG: post_upload_file}">
<input type="hidden" name="tmp_f_val" value="1">
{SECTION: END}
and replace with
{SECTION: upload_file}
<input type="file" name="attach_control0"><br /><input type="file" name="attach_control1"><br /><input type="file" name="attach_control2"> <input type="submit" class="button" name="attach_control_add" value="{MSG: post_upload_file}">
<input type="hidden" name="tmp_f_val" value="1">
{SECTION: END}
[Updated on: Mon, 20 June 2005 09:56]
Report message to a moderator