summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-01 21:43:23 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-01 21:43:23 +1000
commit0bad03d3a206df230b559112fc78d7417fa26736 (patch)
tree5daac8c55a6660778c6467c89931936bdc3a7e4a /inc
parentcbb1bc10318445fab1ea2933b457c4ee0d1a50b2 (diff)
Disable inline-expanding for non-images
Diffstat (limited to 'inc')
-rw-r--r--inc/display.php36
1 files changed, 29 insertions, 7 deletions
diff --git a/inc/display.php b/inc/display.php
index b63fbbf1..620e0b56 100644
--- a/inc/display.php
+++ b/inc/display.php
@@ -336,7 +336,9 @@
$this->embed;
} elseif(!empty($this->file) && $this->file != 'deleted') {
// File info
- $built .= '<p class="fileinfo">File: <a href="' . $config['uri_img'] . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
+ $built .= '<p class="fileinfo">' .
+ 'File: <a href="' . $config['uri_img'] . $this->file . '">' . $this->file . '</a> ' .
+ '<span class="unimportant">(' .
// Filesize
format_bytes($this->filesize) .
// File dimensions
@@ -355,7 +357,17 @@
$built .= ')</span></p>' .
// Thumbnail
- '<a href="' . $config['uri_img'] . $this->file.'" target="_blank"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
+ '<a href="' .
+ $config['uri_img'] .$this->file .
+ '" target="_blank"' .
+ ($this->thumb == 'file' ? ' class="file"' : '') .
+ '><img src="' .
+ ($this->thumb == 'file' ?
+ $config['file_thumb']
+ :
+ $config['uri_thumb'] . $this->thumb
+ ) .
+ '" style="width:' . $this->thumbx . 'px;height:' . $this->thumby . 'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
$built .= '<img src="' . $config['image_deleted'] . '" alt="" />';
}
@@ -482,10 +494,10 @@
// Actual embedding
$this->embed;
} elseif(!empty($this->file) && $this->file != 'deleted') {
- // Image, not embedded shit
- $built =
- // File link
- '<p class="fileinfo">File: <a href="' . $config['uri_img'] . $this->file .'">' . $this->file . '</a> <span class="unimportant">(' .
+ // File info
+ $built = '<p class="fileinfo">' .
+ 'File: <a href="' . $config['uri_img'] . $this->file . '">' . $this->file . '</a> ' .
+ '<span class="unimportant">(' .
// Filesize
format_bytes($this->filesize) .
// File dimensions
@@ -504,7 +516,17 @@
$built .= ')</span></p>' .
// Thumbnail
- '<a href="' . $config['uri_img'] . $this->file.'" target="_blank"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
+ '<a href="' .
+ $config['uri_img'] .$this->file .
+ '" target="_blank"' .
+ ($this->thumb == 'file' ? ' class="file"' : '') .
+ '><img src="' .
+ ($this->thumb == 'file' ?
+ $config['file_thumb']
+ :
+ $config['uri_thumb'] . $this->thumb
+ ) .
+ '" style="width:' . $this->thumbx . 'px;height:' . $this->thumby . 'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
$built = '<img src="' . $config['image_deleted'] . '" alt="" />';
}