image spoilers

This commit is contained in:
Savetheinternet
2011-10-04 02:46:39 +11:00
parent 713c955370
commit 53dce652a8
5 changed files with 37 additions and 12 deletions

View File

@@ -195,7 +195,8 @@
'raw',
'embed',
'recaptcha_challenge_field',
'recaptcha_response_field'
'recaptcha_response_field',
'spoiler'
);
// Custom flood filters. Detect flood attacks and reject new posts if there's a positive match.
@@ -301,6 +302,9 @@
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
// TODO: description
$config['spoiler_images'] = false;
/*
* ====================
* Image settings
@@ -330,6 +334,8 @@
// Thumbnail to use for the downloadable files (not images)
$config['file_thumb'] = 'static/file.png';
// Thumbnail to use for spoiler images
$config['spoiler_image'] = 'static/spoiler.png';
// Thumbnail quality (compression level), from 0 to 9
$config['thumb_quality'] = 7;

View File

@@ -339,6 +339,9 @@
$built .= '<p class="fileinfo">' .
'File: <a href="' . $config['uri_img'] . $this->file . '">' . $this->file . '</a> ' .
'<span class="unimportant">(' .
($this->thumb == 'spoiler' ?
'Spoiler Image, '
: '') .
// Filesize
format_bytes($this->filesize) .
// File dimensions
@@ -372,7 +375,11 @@
($this->thumb == 'file' ?
$config['file_thumb']
:
$config['uri_thumb'] . $this->thumb
($this->thumb == 'spoiler' ?
$config['spoiler_image']
:
$config['uri_thumb'] . $this->thumb
)
) .
'" style="width:' . $this->thumbx . 'px;height:' . $this->thumby . 'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
@@ -505,6 +512,9 @@
$built = '<p class="fileinfo">' .
'File: <a href="' . $config['uri_img'] . $this->file . '">' . $this->file . '</a> ' .
'<span class="unimportant">(' .
($this->thumb == 'spoiler' ?
'Spoiler Image, '
: '') .
// Filesize
format_bytes($this->filesize) .
// File dimensions
@@ -538,7 +548,11 @@
($this->thumb == 'file' ?
$config['file_thumb']
:
$config['uri_thumb'] . $this->thumb
($this->thumb == 'spoiler' ?
$config['spoiler_image']
:
$config['uri_thumb'] . $this->thumb
)
) .
'" style="width:' . $this->thumbx . 'px;height:' . $this->thumby . 'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {