The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
![]()
]
Quote:
I use Code:
$dir = opendir($absolute_path); while($file = readdir($dir)) { if (($file != "..") and ($file != ".")) { $file=str_replace(" ","%20",$file); $list .= "$file" echo $list; Now I tried to add size ( $size ) of the file right after name of the file ( $file ) by using this script: Code:
// $size is the filesize (in bytes) 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); return "$size $type"; } I tried some variants like Code:
$list .= "$file $size $type" I'm sure I'm inserting that script in the wrong place or I have to remove Code:
return "$size $type"; ![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|