forked from GithubBackups/tinyib
Minor tweaks to TINYIB_DEFAULTSTYLE
This commit is contained in:
parent
32ae4efbcf
commit
2f900306cb
@ -153,8 +153,10 @@ if (!defined('TINYIB_DEFAULTSTYLE')) {
|
|||||||
define('TINYIB_DEFAULTSTYLE', 'futaba');
|
define('TINYIB_DEFAULTSTYLE', 'futaba');
|
||||||
}
|
}
|
||||||
if (!isset($tinyib_stylesheets)) {
|
if (!isset($tinyib_stylesheets)) {
|
||||||
$tinyib_stylesheets = array('futaba' => 'Futaba',
|
$tinyib_stylesheets = array(
|
||||||
'burichan' => 'Burichan');
|
'futaba' => 'Futaba',
|
||||||
|
'burichan' => 'Burichan'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (!isset($tinyib_hidefieldsop)) {
|
if (!isset($tinyib_hidefieldsop)) {
|
||||||
$tinyib_hidefieldsop = array();
|
$tinyib_hidefieldsop = array();
|
||||||
|
28
inc/html.php
28
inc/html.php
@ -50,19 +50,15 @@ function pageStylesheets() {
|
|||||||
$return = '<link rel="stylesheet" type="text/css" href="css/global.css">';
|
$return = '<link rel="stylesheet" type="text/css" href="css/global.css">';
|
||||||
|
|
||||||
// Default stylesheet
|
// Default stylesheet
|
||||||
$default_style_value = htmlentities(TINYIB_DEFAULTSTYLE, ENT_QUOTES);
|
$return .= '<link rel="stylesheet" type="text/css" href="css/' . htmlentities(TINYIB_DEFAULTSTYLE, ENT_QUOTES) . '.css" title="' . htmlentities($tinyib_stylesheets[TINYIB_DEFAULTSTYLE], ENT_QUOTES) . '" id="mainStylesheet">';
|
||||||
$default_style_name = htmlentities($tinyib_stylesheets[TINYIB_DEFAULTSTYLE]);
|
|
||||||
$return .= '<link rel="stylesheet" type="text/css" href="css/' . 'test' . '.css" title="' . $default_style_name . '" id="mainStylesheet">';
|
|
||||||
|
|
||||||
// Additional stylesheets
|
// Additional stylesheets
|
||||||
foreach($tinyib_stylesheets as $value => $display_name) {
|
foreach($tinyib_stylesheets as $filename => $title) {
|
||||||
if ($value === TINYIB_DEFAULTSTYLE) {
|
if ($filename === TINYIB_DEFAULTSTYLE) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value_html = htmlentities($value, ENT_QUOTES);
|
$return .= '<link rel="alternate stylesheet" type="text/css" href="css/' . htmlentities($filename, ENT_QUOTES) . '.css" title="' . htmlentities($title, ENT_QUOTES) . '">';
|
||||||
$name_html = htmlentities($display_name, ENT_QUOTES);
|
|
||||||
$return .= '<link rel="alternate stylesheet" type="text/css" href="css/' . $value_html . '.css" title="' . $name_html . '">';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
@ -653,18 +649,16 @@ EOF;
|
|||||||
$txt_delete = __('Delete');
|
$txt_delete = __('Delete');
|
||||||
$txt_delete_post = __('Delete Post');
|
$txt_delete_post = __('Delete Post');
|
||||||
|
|
||||||
$style_select = '';
|
$select_style = '';
|
||||||
|
|
||||||
if (count($tinyib_stylesheets) > 1) {
|
if (count($tinyib_stylesheets) > 1) {
|
||||||
$options = '<option value="">' . $txt_style . '</option>';
|
$select_style = '<select id="switchStylesheet">';
|
||||||
|
|
||||||
foreach($tinyib_stylesheets as $value => $display_name) {
|
$select_style .= '<option value="">' . $txt_style . '</option>';
|
||||||
$value_html = htmlentities($value, ENT_QUOTES);
|
foreach($tinyib_stylesheets as $filename => $title) {
|
||||||
$name_html = htmlentities($display_name);
|
$select_style .= '<option value="' . htmlentities($filename, ENT_QUOTES) . '">'. htmlentities($title) . '</option>';
|
||||||
$options .= '<option value="' . $value . '">'. $display_name . '</option>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$style_select = '<select id="switchStylesheet">'. $options . '</select>';
|
$select_style .= '</select>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = <<<EOF
|
$body = <<<EOF
|
||||||
@ -672,7 +666,7 @@ EOF;
|
|||||||
<div class="adminbar">
|
<div class="adminbar">
|
||||||
$cataloglink
|
$cataloglink
|
||||||
$managelink
|
$managelink
|
||||||
$style_select
|
$select_style
|
||||||
</div>
|
</div>
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
EOF;
|
EOF;
|
||||||
|
@ -48,11 +48,18 @@ define('TINYIB_EXPANDWIDTH', 85); // Expanded content size as a percentage o
|
|||||||
define('TINYIB_TIMEZONE', 'UTC'); // See https://secure.php.net/manual/en/timezones.php - e.g. America/Los_Angeles
|
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_CATALOG', true); // Generate catalog page
|
||||||
define('TINYIB_JSON', true); // Generate JSON files
|
define('TINYIB_JSON', true); // Generate JSON files
|
||||||
|
define('TINYIB_DEFAULTSTYLE', 'futaba'); // Default page style
|
||||||
define('TINYIB_DATEFMT', '%g/%m/%d(%a)%H:%M:%S'); // Date and time format (see php.net/strftime)
|
define('TINYIB_DATEFMT', '%g/%m/%d(%a)%H:%M:%S'); // Date and time format (see php.net/strftime)
|
||||||
$tinyib_hidefieldsop = array(); // Fields to hide when creating a new thread - e.g. array('name', 'email', 'subject', 'message', 'file', 'embed', 'password')
|
$tinyib_hidefieldsop = array(); // Fields to hide when creating a new thread - e.g. array('name', 'email', 'subject', 'message', 'file', 'embed', 'password')
|
||||||
$tinyib_hidefields = array(); // Fields to hide when replying
|
$tinyib_hidefields = array(); // Fields to hide when replying
|
||||||
$tinyib_anonymous = array('Anonymous'); // Default name (or names)
|
$tinyib_anonymous = array('Anonymous'); // Default name (or names)
|
||||||
$tinyib_capcodes = array(array('Admin', 'red'), array('Mod', 'purple')); // Administrator and moderator capcode label and color
|
$tinyib_capcodes = array(array('Admin', 'red'), array('Mod', 'purple')); // Administrator and moderator capcode label and color
|
||||||
|
// Stylesheets (located in css)
|
||||||
|
// Format: File name excluding extension => Title
|
||||||
|
$tinyib_stylesheets = array(
|
||||||
|
'futaba' => 'Futaba',
|
||||||
|
'burichan' => 'Burichan'
|
||||||
|
);
|
||||||
|
|
||||||
// Post control
|
// Post control
|
||||||
define('TINYIB_DELAY', 30); // Delay (in seconds) between posts from the same IP address to help control flooding [0 to disable]
|
define('TINYIB_DELAY', 30); // Delay (in seconds) between posts from the same IP address to help control flooding [0 to disable]
|
||||||
@ -89,13 +96,6 @@ $tinyib_embeds = array('SoundCloud' => 'https://soundcloud.com/oembed?format=jso
|
|||||||
'Vimeo' => 'https://vimeo.com/api/oembed.json?url=TINYIBEMBED',
|
'Vimeo' => 'https://vimeo.com/api/oembed.json?url=TINYIBEMBED',
|
||||||
'YouTube' => 'https://www.youtube.com/oembed?url=TINYIBEMBED&format=json');
|
'YouTube' => 'https://www.youtube.com/oembed?url=TINYIBEMBED&format=json');
|
||||||
|
|
||||||
|
|
||||||
// Stylesheets (located in css)
|
|
||||||
// Format: File name excluding extension => Title
|
|
||||||
define('TINYIB_DEFAULTSTYLE', 'futaba');
|
|
||||||
$tinyib_stylesheets = array('futaba' => 'Futaba',
|
|
||||||
'burichan' => 'Burichan');
|
|
||||||
|
|
||||||
// File control
|
// File control
|
||||||
define('TINYIB_MAXKB', 2048); // Maximum file size in kilobytes [0 to disable]
|
define('TINYIB_MAXKB', 2048); // Maximum file size in kilobytes [0 to disable]
|
||||||
define('TINYIB_MAXKBDESC', '2 MB'); // Human-readable representation of the maximum file size
|
define('TINYIB_MAXKBDESC', '2 MB'); // Human-readable representation of the maximum file size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user