The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
]
Quote:
|
#12
|
||||
|
||||
]here's my code
Code:
case "download": echo " <html> <head> <title>File Download</title> </head> <body> <center> "; $list = "<table width=400 border=0 bordercolor=#5A0202 style=\"border-collapse: collapse\">"; $list .= "<tr><td width=400><center>Click To Download</td></tr>"; $dir = opendir($absolute_path); function rendersize($size) { $type = 'bytes'; if ($size > '1023') { $size = $size/1024; $type = 'KB'; } if ($size > '1023') { $size = $size/1024; $type = 'MB'; } if ($size > '1023') { $size = $size/1024; $type = 'GB'; } if ($size > '1023') { $size = $size/1024; $type = 'TB'; } // Fix decimals and stuff if ($size < '10') $size = intval($size*100)/100; else if ($size < '100') $size = intval($size*10)/10; else $size = intval($size); // Comment the following line if you want X.XX KB displayed instead of X,XX KB $size = str_replace("." , "," , $size); } while (false !== ($file = readdir($dir))) { if (($file != "..") and ($file != ".")) { $list .= "<tr><td width=400><a href=$dl/$file>$file</a></td></tr>"; } } $list .= "</table>"; echo $list; echo" </center> </body> </html>"; where line 45 is Code:
function rendersize($size) { |
#13
|
||||
|
||||
First of all, move the rendersize-function out of the switch. Then make sure that there is only one copy of it being loaded on execution. Check to see if it might be present in an include-file or something.
|
#14
|
||||
|
||||
]removed, checked... dupe from config.php (include) deleted...
no errors. good now trying to find out wich variable to insert |
#15
|
||||
|
||||
]got it to work at last used
Code:
$size = rendersize (filesize ($file)); Good luck. |
#16
|
||||
|
||||
Well, I did tell you a few posts up to use that syntax
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|