From ef2e7c616b593e55dcb82b7dc8f2b3b30663ef0e Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 16 Jun 2011 04:03:10 +1000 Subject: [PATCH] make displaying original filename optional --- inc/config.php | 2 ++ inc/display.php | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/inc/config.php b/inc/config.php index c15069ab..dd156c02 100644 --- a/inc/config.php +++ b/inc/config.php @@ -246,6 +246,8 @@ // Display the aspect ratio in a post's file info $config['show_ratio'] = false; + // Display the file's original filename + $config['show_filename']= true; // Directory where temporary files will be created. Not really used much yet except for some experimental stuff. $config['tmp'] = '/tmp'; diff --git a/inc/display.php b/inc/display.php index 763fcd97..f1d3dba4 100644 --- a/inc/display.php +++ b/inc/display.php @@ -351,9 +351,12 @@ $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } - // Filename - $built .= ', ' . $this->filename . ')

' . - + if($config['show_filename']) { + // Filename + $built .= ', ' . $this->filename; + } + + $built .= ')

' . // Thumbnail ''; } elseif($this->file == 'deleted') { @@ -498,8 +501,12 @@ $fraction = fraction($this->filex, $this->filey, ':'); $built .= ', ' . $fraction; } - // Filename - $built .= ', ' . $this->filename . ')

' . + if($config['show_filename']) { + // Filename + $built .= ', ' . $this->filename; + } + + $built .= ')

' . // Thumbnail ''; } elseif($this->file == 'deleted') { @@ -585,4 +592,4 @@ return $built; } }; -?> \ No newline at end of file +?>