From 870a449effd7b1c80b8d7bc5808fad100f21308f Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 12 Oct 2008 17:04:43 +0000 Subject: Downscaled file preview images to 64x64, added the previews to the filehandler. --- forum/utils/file.php | 6 +++--- forum/utils/files.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'forum') diff --git a/forum/utils/file.php b/forum/utils/file.php index b1f4e50..99b8506 100644 --- a/forum/utils/file.php +++ b/forum/utils/file.php @@ -44,18 +44,18 @@ function getFilePreview($fid) switch($file->mimetype) { case "image/png": $image = imagecreatefrompng($filename); - $image = rescale($image); + $image = rescale($image, 64, 64); imagepng($image); break; case "image/jpeg": $image = imagecreatefromjpeg($filename); - $image = rescale($image); + $image = rescale($image, 64, 64); imagejpeg($image); echo "@"; break; case "image/gif": $image = imagecreatefromgif($filename); - $image = rescale($image); + $image = rescale($image, 64, 64); imagegif($image); break; } diff --git a/forum/utils/files.php b/forum/utils/files.php index b9758ae..e17ca8b 100644 --- a/forum/utils/files.php +++ b/forum/utils/files.php @@ -21,6 +21,7 @@ class File { if($current_user->uid == 0) { echo " fid . "\">Delete\n"; } + echo "
fid . "\"
\n"; echo "
Filename: link() . "\">" . $this->name . " (" . $this->mimetype. ")
\n"; echo "
Uploaded by: " . $users->getUser($this->uid)->name . "
\n"; echo "
Size: " . ceil(filesize($PERMSTORE . "/" . $this->fid) / 1024) . "kb
\n"; -- cgit v1.2.3