Revisiting this topic, because the recent update wiped what I had and I didn't make a backup :nuts:
Here's what I have right now, inserted on line 64 of main.php (right before
<?php tpl_pageinfo() ?>)
<?php
function formatSizeUnits($bytes) {
if ($bytes >= 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . ' GB'; }
elseif ($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . ' MB'; }
elseif ($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . ' kB'; }
elseif ($bytes > 1) { $bytes = $bytes . ' bytes'; }
elseif ($bytes == 1) { $bytes = $bytes . ' byte'; }
else { $bytes = '0 bytes'; }
return $bytes;
}
echo formatSizeUnits(filesize($page));
/* echo filesize_h(filesize($page)); */
echo ' · ';
?>
[/s]
Neither the filesize_h nor formatSizeUnits functions will return anything useful. I can't find anything obviously wrong.
help?