summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-06-16 04:03:10 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-06-16 04:03:10 +1000
commitef2e7c616b593e55dcb82b7dc8f2b3b30663ef0e (patch)
treeea903950ed143571483f043fc8f96f2c155f176f
parent0f0660eb614e9dd3a3c37687319c5f4d688f7be1 (diff)
make displaying original filename optional
-rw-r--r--inc/config.php2
-rw-r--r--inc/display.php19
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 . ')</span></p>' .
-
+ if($config['show_filename']) {
+ // Filename
+ $built .= ', ' . $this->filename;
+ }
+
+ $built .= ')</span></p>' .
// Thumbnail
'<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
@@ -498,8 +501,12 @@
$fraction = fraction($this->filex, $this->filey, ':');
$built .= ', ' . $fraction;
}
- // Filename
- $built .= ', ' . $this->filename . ')</span></p>' .
+ if($config['show_filename']) {
+ // Filename
+ $built .= ', ' . $this->filename;
+ }
+
+ $built .= ')</span></p>' .
// Thumbnail
'<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
@@ -585,4 +592,4 @@
return $built;
}
};
-?> \ No newline at end of file
+?>