Browse Source

Added Functionality - Users can now post from catalog page

Fix multi-image.js is a few commits later
main
PupperWoff 7 years ago
committed by -
parent
commit
5419f49259
  1. 1
      inc/config.php
  2. 1
      inc/functions.php
  3. 8
      templates/themes/catalog/catalog.html
  4. 7
      templates/themes/catalog/theme.php

1
inc/config.php

@ -1246,6 +1246,7 @@
// Location of files.
$config['file_index'] = 'index.html';
$config['file_catalog'] = 'catalog.html'; // Catalog page (used in preg_match for post referer)
$config['file_page'] = '%d.html'; // NB: page is both an index page and a thread
$config['file_page50'] = '%d+50.html';
$config['file_page_slug'] = '%d-%s.html';

1
inc/functions.php

@ -178,6 +178,7 @@ function loadConfig() {
str_replace('%s', $config['board_regex'], preg_quote($config['board_path'], '/')) .
'(' .
preg_quote($config['file_index'], '/') . '|' .
preg_quote($config['file_catalog'], '/') . '|' .
str_replace('%d', '\d+', preg_quote($config['file_page'])) .
')?' .
'|' .

8
templates/themes/catalog/catalog.html

@ -5,18 +5,20 @@
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script type='text/javascript'>
var active_page = "catalog"
, board_name = "{{ board }}";
, board_name = "{{ board_name }}";
</script>
{% include 'header.html' %}
<title>{{ board }} - Catalog</title>
<title>{{ board_name }} - Catalog</title>
</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 %}">
{{ boardlist.top }}
<header>
<h1>{{ settings.title }} (<a href="{{link}}">/{{ board }}/</a>)</h1>
<h1>{{ settings.title }} (<a href="{{link}}">/{{ board_name }}/</a>)</h1>
<div class="subtitle">{{ settings.subtitle }}</div>
</header>
{% include 'post_form.html' %}
<span>{% trans 'Sort by' %}: </span>
<select id="sort_by" style="display: inline-block">
<option selected value="bump:desc">{% trans 'Bump order' %}</option>

7
templates/themes/catalog/theme.php

@ -259,6 +259,9 @@
$config['additional_javascript'][] = $s;
}
$antibot = create_antibot($board_name);
$antibot->reset();
file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', Array(
'settings' => $this->settings,
'config' => $config,
@ -266,7 +269,9 @@
'recent_images' => array(),
'recent_posts' => $recent_posts,
'stats' => array(),
'board' => $board_name,
'board_name' => $board_name,
'board' => $board,
'antibot' => $antibot,
'link' => $board_link
)));

Loading…
Cancel
Save