Out with the old and in with the new.. I guess?

This commit is contained in:
Daniel Saunders 2018-11-01 21:12:26 -04:00
parent 02abee7304
commit 209ba201b6
23 changed files with 87 additions and 126 deletions

View File

@ -952,24 +952,18 @@
$config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css'; $config['font_awesome_css'] = 'stylesheets/font-awesome/css/font-awesome.min.css';
/* /*
* For lack of a better name, “boardlinks” are those sets of navigational links that appear at the top * Tinyboard allows the creation of a menu for boards and other links you may want on your site.
* and bottom of board pages. They can be a list of links to boards and/or other pages such as status * Categories are used for organizing your menu items into sections.
* blogs and social network profiles/pages.
*
* "Groups" in the boardlinks are marked with square brackets. Tinyboard allows for infinite recursion
* with groups. Each array() in $config['boards'] represents a new square bracket group.
*/ */
// $config['boards'] = array( // $config['menu'] = [
// array('a', 'b'), // 'Japan' => ['a', 'd', 'h', 'm'],
// array('c', 'd', 'e', 'f', 'g'), // 'General' => ['b', 'f', 'k'],
// array('h', 'i', 'j'), // 'Site' => [
// array('k', array('l', 'm')), // 'news' => 'https://example.org/news',
// array('status' => 'http://status.example.org/') // 'status' => 'https://status.example.org'
// ); // ]
// ];
// Whether or not to put brackets around the whole board list
$config['boardlist_wrap_bracket'] = false;
// Show page navigation links at the top as well. // Show page navigation links at the top as well.
$config['page_nav_top'] = false; $config['page_nav_top'] = false;
@ -977,11 +971,6 @@
// Show "Catalog" link in page navigation. Use with the Catalog theme. Set to false to disable. // Show "Catalog" link in page navigation. Use with the Catalog theme. Set to false to disable.
$config['catalog_link'] = 'catalog.html'; $config['catalog_link'] = 'catalog.html';
// Board categories. Only used in the "Categories" theme.
// $config['categories'] = array(
// 'Group Name' => array('a', 'b', 'c'),
// 'Another Group' => array('d')
// );
// Optional for the Categories theme. This is an array of name => (title, url) groups for categories // Optional for the Categories theme. This is an array of name => (title, url) groups for categories
// with non-board links. // with non-board links.
// $config['custom_categories'] = array( // $config['custom_categories'] = array(

View File

@ -19,56 +19,38 @@ function format_bytes($size) {
return round($size, 2).$units[$i]; return round($size, 2).$units[$i];
} }
function doBoardListPart($list, $root, &$boards) { function createMenu($mod=false) {
global $config; global $config;
$body = '';
foreach ($list as $key => $board) {
if (is_array($board))
$body .= ' <span class="sub" data-description="' . $key . '">[' . doBoardListPart($board, $root, $boards) . ']</span> ';
else {
if (gettype($key) == 'string') {
$body .= ' <a href="' . $board . '">' . $key . '</a> /';
} else {
$title = '';
if (isset ($boards[$board])) {
$title = ' title="'.$boards[$board].'"';
}
$body .= ' <a href="' . $root . $board . '/' . $config['file_index'] . '"'.$title.'>' . $board . '</a> /';
}
}
}
$body = preg_replace('/\/$/', '', $body);
return $body;
}
function createBoardlist($mod=false) {
global $config;
if (!isset($config['boards'])) return array('top'=>'','bottom'=>'');
$xboards = listBoards(); $xboards = listBoards();
$boards = array(); $boards = [];
$menu = [];
foreach ($xboards as $val) { foreach ($xboards as $val) {
$boards[$val['uri']] = $val['title']; $boards[$val['uri']] = $val['title'];
} }
$body = doBoardListPart($config['boards'], $mod?'?/':$config['root'], $boards); foreach ($config['menu'] as $category => $items) {
$menu[$category] = [];
if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body)) foreach ($items as $title => $uri) {
$body = '[' . $body . ']'; if (gettype($title) != 'string' && array_key_exists($uri, $boards)) {
$menu[$category][] = [
$body = trim($body); 'title' => $boards[$uri],
'uri' => ($mod ? '?/' : $config['root']) . $uri . '/' . $config['file_index'],
'is_board' => true
];
} else {
$menu[$category][] = [
'title' => $title,
'uri' => $uri,
'is_board' => false
];
}
}
}
// Message compact-boardlist.js faster, so that page looks less ugly during loading return $menu;
$top = "<script type='text/javascript'>if (typeof do_boardlist != 'undefined') do_boardlist();</script>";
return array(
'top' => '<div class="boardlist">' . $body . '</div>' . $top,
'bottom' => '<div class="boardlist bottom">' . $body . '</div>'
);
} }
function error($message, $priority = true, $debug_stuff = false) { function error($message, $priority = true, $debug_stuff = false) {

View File

@ -886,7 +886,7 @@ function displayBan($ban) {
Element('page.html', array( Element('page.html', array(
'title' => _('Banned!'), 'title' => _('Banned!'),
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist(isset($mod) ? $mod : false), 'menu' => createMenu(isset($mod) ? $mod : false),
'body' => Element('banned.html', array( 'body' => Element('banned.html', array(
'config' => $config, 'config' => $config,
'ban' => $ban, 'ban' => $ban,
@ -1428,7 +1428,7 @@ function index($page, $mod=false, $brief = false) {
'body' => $body, 'body' => $body,
'post_url' => $config['post_url'], 'post_url' => $config['post_url'],
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist($mod), 'menu' => createMenu($mod),
'threads' => $threads, 'threads' => $threads,
); );
} }
@ -2270,7 +2270,7 @@ function buildThread($id, $return = false, $mod = false) {
'hasnoko50' => $hasnoko50, 'hasnoko50' => $hasnoko50,
'isnoko50' => false, 'isnoko50' => false,
'antibot' => $antibot, 'antibot' => $antibot,
'boardlist' => createBoardlist($mod), 'menu' => createMenu($mod),
'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index']) 'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index'])
)); ));
@ -2373,7 +2373,7 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti
'hasnoko50' => $hasnoko50, 'hasnoko50' => $hasnoko50,
'isnoko50' => true, 'isnoko50' => true,
'antibot' => $mod ? false : ($antibot ? $antibot : create_antibot($board['uri'], $id)), 'antibot' => $mod ? false : ($antibot ? $antibot : create_antibot($board['uri'], $id)),
'boardlist' => createBoardlist($mod), 'menu' => createMenu($mod),
'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index']) 'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index'])
)); ));

View File

@ -15,7 +15,7 @@ function mod_page($title, $template, $args, $subtitle = false) {
'hide_dashboard_link' => $template == 'mod/dashboard.html', 'hide_dashboard_link' => $template == 'mod/dashboard.html',
'title' => $title, 'title' => $title,
'subtitle' => $subtitle, 'subtitle' => $subtitle,
'boardlist' => createBoardlist($mod), 'menu' => createMenu($mod),
'body' => Element($template, 'body' => Element($template,
array_merge( array_merge(
array('config' => $config, 'mod' => $mod), array('config' => $config, 'mod' => $mod),

View File

@ -7,7 +7,7 @@
{% endblock %} {% endblock %}
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %} {% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %}
{% if config.url_banner %}<img class="banner" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %} {% if config.url_banner %}<img class="banner" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %}
<header> <header>
@ -34,7 +34,7 @@
<div class="pages">{{ btn.prev }} {% for page in pages %} <div class="pages">{{ btn.prev }} {% for page in pages %}
[<a {% if page.selected %}class="selected"{% endif %}{% if not page.selected %}href="{{ page.link }}"{% endif %}>{{ page.num }}</a>]{% if loop.last %} {% endif %} [<a {% if page.selected %}class="selected"{% endif %}{% if not page.selected %}href="{{ page.link }}"{% endif %}>{{ page.num }}</a>]{% if loop.last %} {% endif %}
{% endfor %} {{ btn.next }}</div> {% endfor %} {{ btn.next }}</div>
{{ boardlist.bottom }} {% include "menu.html" with {"bottom": true} %}
<footer> <footer>
<p class="unimportant" style="margin-top:20px;text-align:center;">- Tinyboard + <p class="unimportant" style="margin-top:20px;text-align:center;">- Tinyboard +
<a href="https://engine.vichan.net/">vichan</a> {{ config.version }} - <a href="https://engine.vichan.net/">vichan</a> {{ config.version }} -
@ -42,8 +42,8 @@
<br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p> <br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p>
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %} {% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
</footer> </footer>
<script type="text/javascript">{% verbatim %} {% verbatim %}<script type="text/javascript">
ready(); ready();
{% endverbatim %}</script> </script>{% endverbatim %}
</body> </body>
</html> </html>

View File

@ -17,7 +17,7 @@
<title>{{ board.url }} - {{ board.title|e }}</title> <title>{{ board.url }} - {{ board.title|e }}</title>
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-{% if not no_post_form %}index{% else %}ukko{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-{% if not no_post_form %}index{% else %}ukko{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %} {% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %}
{% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %} {% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %}
@ -84,7 +84,7 @@
{% endif %} {% endif %}
</div> </div>
{{ boardlist.bottom }} {% include "menu.html" with {"bottom": true} %}
{{ config.ad.bottom }} {{ config.ad.bottom }}

11
templates/menu.html Normal file
View File

@ -0,0 +1,11 @@
<div class="boardlist{% if bottom %} bottom{% endif %}">
{% for category, items in menu %}
<span class="sub" data-description="{{ category }}">[
{% for item in items %}
<a href="{{ item.uri }}"{% if item.is_board %} title="{{ item.title }}"{% endif %}>{% if item.is_board %}{{ item.uri }}{% else %}{{ item.title }}{% endif %}</a>
{% if not loop.last %}/{% endif %}
{% endfor %}
]</span>
{% endfor %}
</div>
{% if not bottom %}<script type='text/javascript'>if (typeof do_boardlist != 'undefined') do_boardlist();</script>{% endif %}

View File

@ -9,7 +9,7 @@
<title>{{ title }}</title> <title>{{ title }}</title>
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-page" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-page" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr>{% endif %} {% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr>{% endif %}
<header> <header>

View File

@ -40,7 +40,7 @@
</div> </div>
<div class="ban boards"> <div class="ban boards">
{% for category, boards in categories %} {% for category, items in menu %}
<div class="category"> <div class="category">
<h2>{{ category }}</h2> <h2>{{ category }}</h2>
<ul> <ul>

View File

@ -43,17 +43,6 @@
$query = query("SELECT * FROM ``news`` ORDER BY `time` DESC" . ($settings['no_recent'] ? ' LIMIT ' . $settings['no_recent'] : '')) or error(db_error()); $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC" . ($settings['no_recent'] ? ' LIMIT ' . $settings['no_recent'] : '')) or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC); $news = $query->fetchAll(PDO::FETCH_ASSOC);
$categories = $config['categories'];
foreach ($categories as &$_boards) {
foreach ($_boards as &$_board) {
$title = boardTitle($_board);
if (!$title)
$title = $_board; // board doesn't exist, but for some reason you want to display it anyway
$_board = ['title' => $title, 'uri' => sprintf($config['board_path'], $_board)];
}
}
$recent_images = []; $recent_images = [];
$recent_posts = []; $recent_posts = [];
@ -168,9 +157,8 @@
return Element('themes/awsumchan/index.html', [ return Element('themes/awsumchan/index.html', [
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist(), 'menu' => createMenu(),
'news' => $news, 'news' => $news,
'categories' => $categories,
'recent_images' => $recent_images, 'recent_images' => $recent_images,
'recent_posts' => $recent_posts, 'recent_posts' => $recent_posts,
'stats' => $stats 'stats' => $stats

View File

@ -12,7 +12,7 @@
{% if config.font_awesome %}<link rel="stylesheet" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %} {% if config.font_awesome %}<link rel="stylesheet" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %}
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %}" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
<header> <header>
<h1>{{ settings.title }}</h1> <h1>{{ settings.title }}</h1>
<div class="subtitle">{{ settings.subtitle }}</div> <div class="subtitle">{{ settings.subtitle }}</div>

View File

@ -31,7 +31,7 @@
return Element('themes/basic/index.html', Array( return Element('themes/basic/index.html', Array(
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist(), 'menu' => createMenu(),
'news' => $news 'news' => $news
)); ));
} }

View File

@ -11,7 +11,7 @@
<title>{{ board }} - Catalog</title> <title>{{ board }} - Catalog</title>
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} theme-catalog active-catalog" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} theme-catalog active-catalog" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
<header> <header>
<h1>{{ settings.title }} (<a href="{{link}}">/{{ board }}/</a>)</h1> <h1>{{ settings.title }} (<a href="{{link}}">/{{ board }}/</a>)</h1>
<div class="subtitle">{{ settings.subtitle }}</div> <div class="subtitle">{{ settings.subtitle }}</div>
@ -78,17 +78,17 @@
<br>Tinyboard Copyright &copy; 2010-2014 Tinyboard Development Group <br>Tinyboard Copyright &copy; 2010-2014 Tinyboard Development Group
<br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p> <br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p>
</footer> </footer>
<script type="text/javascript">{% verbatim %} {% verbatim %}<script type="text/javascript">
var styles = { var styles = {
{% endverbatim %} {% endverbatim %}
{% for name, uri in config.stylesheets %}{% verbatim %}'{% endverbatim %}{{ name|addslashes }}{% verbatim %}' : '{% endverbatim %}/stylesheets/{{ uri|addslashes }}{% verbatim %}', {% for name, uri in config.stylesheets %}{% verbatim %}'{% endverbatim %}{{ name|addslashes }}{% verbatim %}' : '{% endverbatim %}/stylesheets/{{ uri|addslashes }}{% verbatim %}',
{% endverbatim %}{% endfor %}{% verbatim %} {% endverbatim %}{% endfor %}{% verbatim %}
}; onready(init); }; onready(init);
{% endverbatim %}</script> </script>{% endverbatim %}
<script type="text/javascript">{% verbatim %} {% verbatim %}<script type="text/javascript">
ready(); ready();
{% endverbatim %}</script> </script>{% endverbatim %}
</body> </body>
</html> </html>
{% endfilter %} {% endfilter %}

View File

@ -112,7 +112,7 @@
file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', Array( file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', Array(
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist(), 'menu' => createMenu(),
'recent_images' => $recent_images, 'recent_images' => $recent_images,
'recent_posts' => $recent_posts, 'recent_posts' => $recent_posts,
'stats' => $stats, 'stats' => $stats,

View File

@ -58,9 +58,9 @@ Requires $config[\'categories\'].';
function categories_install($settings) { function categories_install($settings) {
global $config; global $config;
if (!isset($config['categories'])) { if (!isset($config['menu'])) {
return Array(false, '<h2>Prerequisites not met!</h2>' . return Array(false, '<h2>Prerequisites not met!</h2>' .
'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.'); 'This theme requires $config[\'menu\'] to be set.');
} }
} }
} }

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/> <link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
</head> </head>
<body> <body>
{{ boardlist.top }} {% include "menu.html" %}
<header> <header>
<h1>{{ settings.title }}</h1> <h1>{{ settings.title }}</h1>
<div class="subtitle">{{ settings.subtitle }}</div> <div class="subtitle">{{ settings.subtitle }}</div>

View File

@ -24,15 +24,17 @@
</ul> </ul>
</fieldset> </fieldset>
{% for category, boards in categories %} {% for category, items in menu %}
<fieldset> <fieldset>
<legend> <legend>
{{ category }} {{ category }}
</legend> </legend>
{% for board in boards %} {% for item in items %}
<li> {% if item.is_board %}
<a href="{{ board.uri }}">{{ board.title|e }}</a> <li>
</li> <a href="{{ item.uri }}">{{ item.title|e }}</a>
</li>
{% endif %}
{% endfor %} {% endfor %}
</fieldset> </fieldset>
{% endfor %} {% endfor %}

View File

@ -43,29 +43,18 @@
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'news' => $news, 'news' => $news,
'boardlist' => createBoardlist(false) 'menu' => createMenu(false)
)); ));
} }
// Build sidebar // Build sidebar
public static function sidebar($settings) { public static function sidebar($settings) {
global $config, $board; global $config;
$categories = $config['categories'];
foreach ($categories as &$boards) {
foreach ($boards as &$board) {
$title = boardTitle($board);
if (!$title)
$title = $board; // board doesn't exist, but for some reason you want to display it anyway
$board = Array('title' => $title, 'uri' => sprintf($config['board_path'], $board));
}
}
return Element('themes/categories/sidebar.html', Array( return Element('themes/categories/sidebar.html', Array(
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'categories' => $categories 'menu' => $menu
)); ));
} }
}; };

View File

@ -12,7 +12,7 @@
{% include 'header.html' %} {% include 'header.html' %}
</head> </head>
<body> <body>
{{ boardlist.top }} {% include "menu.html" %}
<header> <header>
<h1>{{ settings.title }}</h1> <h1>{{ settings.title }}</h1>
<div class="subtitle">{{ settings.subtitle }}</div> <div class="subtitle">{{ settings.subtitle }}</div>

View File

@ -152,7 +152,7 @@
return Element('themes/recent/recent.html', Array( return Element('themes/recent/recent.html', Array(
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
'boardlist' => createBoardlist(), 'menu' => createMenu(),
'recent_images' => $recent_images, 'recent_images' => $recent_images,
'recent_posts' => $recent_posts, 'recent_posts' => $recent_posts,
'stats' => $stats 'stats' => $stats

View File

@ -113,7 +113,7 @@
return Element('themes/rss/rss.xml', Array( return Element('themes/rss/rss.xml', Array(
'settings' => $settings, 'settings' => $settings,
'config' => $config, 'config' => $config,
//'boardlist' => createBoardlist(), //'menu' => createMenu(),
//'recent_images' => $recent_images, //'recent_images' => $recent_images,
'recent_posts' => $recent_posts, 'recent_posts' => $recent_posts,
//'stats' => $stats //'stats' => $stats

View File

@ -107,7 +107,7 @@
'no_post_form' => true, 'no_post_form' => true,
'body' => $body, 'body' => $body,
'mod' => $mod, 'mod' => $mod,
'boardlist' => createBoardlist($mod), 'menu' => createMenu($mod),
)); ));
} }

View File

@ -24,7 +24,7 @@
<title>{{ board.url }} - {{ meta_subject }}</title> <title>{{ board.url }} - {{ meta_subject }}</title>
</head> </head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-thread" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}"> <body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} active-thread" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
{{ boardlist.top }} {% include "menu.html" %}
<a name="top"></a> <a name="top"></a>
{% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %} {% if pm %}<div class="top_notice">You have <a href="?/PM/{{ pm.id }}">an unread PM</a>{% if pm.waiting > 0 %}, plus {{ pm.waiting }} more waiting{% endif %}.</div><hr />{% endif %}
{% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %} {% if config.url_banner %}<img class="board_image" src="{{ config.url_banner }}" {% if config.banner_width or config.banner_height %}style="{% if config.banner_width %}width:{{ config.banner_width }}px{% endif %};{% if config.banner_width %}height:{{ config.banner_height }}px{% endif %}" {% endif %}alt="" />{% endif %}
@ -78,7 +78,7 @@
</form> </form>
<a name="bottom"></a> <a name="bottom"></a>
{{ boardlist.bottom }} {% include "menu.html" with {"bottom": true} %}
{{ config.ad.bottom }} {{ config.ad.bottom }}
@ -89,8 +89,8 @@
<br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p> <br><a href="https://engine.vichan.net/">vichan</a> Copyright &copy; 2012-2016 vichan-devel</p>
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %} {% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
</footer> </footer>
<script type="text/javascript">{% verbatim %} {% verbatim %}<script type="text/javascript">
ready(); ready();
{% endverbatim %}</script> </script>{% endverbatim %}
</body> </body>
</html> </html>