2008-03-16, 06:08 PM
After allowing external links in MusicalMidget's Downloads Section, by deleting the following code from forums/downloads.php:
Users are no longer required to upload a file, & could just leave the uploading area empty & link to it instead in the Desctription area. Now even if they post links, the size (usually of a few kb's) still displays below them.
My question is this:
What code should I be inserting inorder to avoid displaying the size if there's no uploaded attachment? Something like this?
N.B: I chose the size as 12000, 'cause I don't think a link in the description could exceed 12kb's.
Thanks in advance.
if(!$_FILES['attachment']['size'])
{
error($lang->error_no_file);
}
Users are no longer required to upload a file, & could just leave the uploading area empty & link to it instead in the Desctription area. Now even if they post links, the size (usually of a few kb's) still displays below them.
My question is this:
What code should I be inserting inorder to avoid displaying the size if there's no uploaded attachment? Something like this?
if($_FILES['attachment']['size'] < 12000)
{
not display $download['size'];
}
N.B: I chose the size as 12000, 'cause I don't think a link in the description could exceed 12kb's.
Thanks in advance.