Browse Source

Resolve blank TINYIB_BOARDDESC auto-refresh issue

Resolves #185.
merge-requests/67/head
Trevor Slocum 1 year ago
parent
commit
68012f8c31
  1. 3
      inc/defines.php
  2. 16
      inc/html.php
  3. 3
      settings.default.php

3
inc/defines.php

@ -13,6 +13,9 @@ define('TINYIB_WORDBREAK_IDENTIFIER', '@!@TINYIB_WORDBREAK@!@');
if (!defined('TINYIB_LOCALE')) {
define('TINYIB_LOCALE', '');
}
if (!defined('TINYIB_BOARDTITLE')) {
define('TINYIB_BOARDTITLE', '');
}
if (!defined('TINYIB_MANAGEKEY')) {
define('TINYIB_MANAGEKEY', '');
}

16
inc/html.php

@ -4,6 +4,14 @@ if (!defined('TINYIB_BOARD')) {
}
function pageHeader() {
if (TINYIB_BOARDTITLE != '') {
$title = TINYIB_BOARDTITLE;
} else if (TINYIB_BOARDDESC != '') {
$title = TINYIB_BOARDDESC;
} else {
$title = 'TinyIB';
}
$js_captcha = '';
if (TINYIB_CAPTCHA === 'hcaptcha' || TINYIB_MANAGECAPTCHA === 'hcaptcha') {
$js_captcha .= '<script src="https://www.hcaptcha.com/1/api.js" async defer></script>';
@ -12,7 +20,7 @@ function pageHeader() {
$js_captcha .= '<script src="https://www.google.com/recaptcha/api.js" async defer></script>';
}
$return = <<<EOF
return <<<EOF
<!DOCTYPE html>
<html>
<head>
@ -23,10 +31,7 @@ function pageHeader() {
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>
EOF;
$return .= TINYIB_BOARDDESC . <<<EOF
</title>
<title>$title</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="css/global.css">
<link rel="stylesheet" type="text/css" href="css/futaba.css" title="Futaba" id="mainStylesheet">
@ -36,7 +41,6 @@ EOF;
$js_captcha
</head>
EOF;
return $return;
}
function pageFooter() {

3
settings.default.php

@ -28,7 +28,8 @@ define('TINYIB_MODPASS', ''); // Moderators only have access to delete (
// Board description and behavior
// Warning: Enabling reCAPTCHA will cause all visitors to be tracked by Google. See https://nearcyan.com/you-probably-dont-need-recaptcha/
define('TINYIB_BOARD', 'b'); // Unique identifier for this board using only letters and numbers
define('TINYIB_BOARDDESC', 'TinyIB'); // Displayed at the top of every page
define('TINYIB_BOARDDESC', 'TinyIB'); // Displayed below logo in page headers
define('TINYIB_BOARDTITLE', ''); // Title of board pages. When blank, defaults to TINYIB_BOARDDESC (when set) or "TinyIB"
define('TINYIB_ALWAYSNOKO', false); // Redirect to thread after posting
define('TINYIB_CAPTCHA', ''); // Reduce spam by requiring users to pass a CAPTCHA when posting: simple / hcaptcha / recaptcha ['' to disable]
define('TINYIB_MANAGECAPTCHA', ''); // Improve security by requiring users to pass a CAPTCHA when logging in to the management panel: simple / hcaptcha / recaptcha ['' to disable]

Loading…
Cancel
Save