diff --git a/inc/defines.php b/inc/defines.php index ae52ab4..0f0a355 100644 --- a/inc/defines.php +++ b/inc/defines.php @@ -94,6 +94,9 @@ if (!defined('TINYIB_ALWAYSNOKO')) { if (!defined('TINYIB_WORDBREAK')) { define('TINYIB_WORDBREAK', 0); } +if (!defined('TINYIB_EXPANDWIDTH')) { + define('TINYIB_EXPANDWIDTH', 85); +} if (!defined('TINYIB_TIMEZONE')) { define('TINYIB_TIMEZONE', ''); } diff --git a/inc/html.php b/inc/html.php index 01dafe3..44e7250 100644 --- a/inc/html.php +++ b/inc/html.php @@ -424,6 +424,7 @@ function buildPost($post, $res) { $filesize .= (isEmbed($post['file_hex']) ? __('Embed:') : __('File:')) . ' '; } + $w = TINYIB_EXPANDWIDTH; if (isEmbed($post["file_hex"])) { $expandhtml = $post['file']; } else if (substr($post['file'], -5) == '.webm' || substr($post['file'], -4) == '.mp4') { @@ -432,12 +433,12 @@ function buildPost($post, $res) { $dimensions = 'width="' . $post['image_width'] . '" height="' . $post['image_height'] . '"'; } $expandhtml = << + EOF; } else if (in_array(substr($post['file'], -4), array('.jpg', '.png', '.gif'))) { - $expandhtml = ""; + $expandhtml = ""; } $thumblink = ""; diff --git a/settings.default.php b/settings.default.php index 5859a60..595c387 100644 --- a/settings.default.php +++ b/settings.default.php @@ -41,6 +41,7 @@ define('TINYIB_THREADSPERPAGE', 10); // Amount of threads shown per index page define('TINYIB_PREVIEWREPLIES', 3); // Amount of replies previewed on index pages define('TINYIB_TRUNCATE', 15); // Messages are truncated to this many lines on board index pages [0 to disable] define('TINYIB_WORDBREAK', 80); // Words longer than this many characters will be broken apart [0 to disable] +define('TINYIB_EXPANDWIDTH', 85); // Expanded content size as a percentage of the screen's width define('TINYIB_TIMEZONE', 'UTC'); // See https://secure.php.net/manual/en/timezones.php - e.g. America/Los_Angeles define('TINYIB_CATALOG', true); // Generate catalog page define('TINYIB_JSON', true); // Generate JSON files