diff --git a/inc/functions.php b/inc/functions.php index b61f5bb7..b2d945d2 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -680,7 +680,7 @@ function listBoards($just_uri = false, $indexed_only = false) { if (!$just_uri) { $query = query("SELECT ``boards``.`uri` uri, ``boards``.`title` title, ``boards``.`subtitle` subtitle, ``board_create``.`time` time, ``boards``.`indexed` indexed FROM ``boards``" . ( $indexed_only ? " WHERE `indexed` = 1 " : "" ) . "LEFT JOIN ``board_create`` ON ``boards``.`uri` = ``board_create``.`uri` ORDER BY ``boards``.`uri`") or error(db_error()); - $boards = $query->fetchAll(); + $boards = $query->fetchAll(PDO::FETCH_ASSOC); } else { $boards = array(); $query = query("SELECT `uri` FROM ``boards``" . ( $indexed_only ? " WHERE `indexed` = 1" : "" ) . " ORDER BY ``boards``.`uri`") or error(db_error()); diff --git a/inc/instance-config.php b/inc/instance-config.php index 699d1a18..c2df3b5b 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -87,6 +87,7 @@ $config['mod']['modlog'] = SUPERMOD; $config['mod']['editpost'] = MOD; $config['mod']['recent_reports'] = 65535; + $config['mod']['ip_less_recentposts'] = 75; $config['ban_show_post'] = true; // Board shit @@ -145,6 +146,7 @@ $config['markup'][] = array("/^[ |\t]*==(.+?)==[ |\t]*$/m", "\$1"); $config['markup'][] = array("/\[spoiler\](.+?)\[\/spoiler\]/", "\$1"); $config['markup'][] = array("/~~(.+?)~~/", "\$1"); + $config['markup'][] = array("/__(.+?)__/", "\$1"); $config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/bans.html', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array(''=>'https://twitter.com/infinitechan')); //$config['boards'] = array(array('' => '/', '' => '/boards.html', '' => '/faq.html', '' => '/random.php', '' => '/create.php', '' => '/search.php', '' => '/mod.php', '' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('v', 'a', 'tg', 'fit', 'pol', 'tech', 'mu', 'co', 'sp', 'boards'), array(''=>'https://twitter.com/infinitechan')); @@ -314,15 +316,15 @@ OEKAKI; if (!(strlen($subtitle) < 200)) error('Invalid subtitle'); - $query = prepare('UPDATE ``boards`` SET `title` = :title, `subtitle` = :subtitle, `indexed` = :indexed, `public_bans` = :public_bans WHERE `uri` = :uri'); + $query = prepare('UPDATE ``boards`` SET `title` = :title, `subtitle` = :subtitle, `indexed` = :indexed, `public_bans` = :public_bans, `8archive` = :8archive WHERE `uri` = :uri'); $query->bindValue(':title', $title); $query->bindValue(':subtitle', $subtitle); $query->bindValue(':uri', $b); $query->bindValue(':indexed', !isset($_POST['meta_noindex'])); $query->bindValue(':public_bans', isset($_POST['public_bans'])); + $query->bindValue(':8archive', isset($_POST['8archive'])); $query->execute() or error(db_error($query)); - $config_file = <<fetchAll(PDO::FETCH_ASSOC))); file_write($b.'/config.php', $config_file); file_write('stylesheets/board/'.$b.'.css', $_POST['css']); file_write($b.'/rules.html', Element('page.html', array('title'=>'Rules', 'subtitle'=>'', 'config'=>$config, 'body'=>'
'.purify($_POST['rules']).'
'))); file_write($b.'/rules.txt', $_POST['rules']); + + $_config = $config; + openBoard($b); - buildIndex(); - buildJavascript(); - $query = query(sprintf("SELECT `id` FROM ``posts_%s`` WHERE `thread` IS NULL", $b)) or error(db_error()); - while ($post = $query->fetch(PDO::FETCH_ASSOC)) { - buildThread($post['id']); + + // be smarter about rebuilds...only some changes really require us to rebuild all threads + if ($_config['blotter'] != $config['blotter'] || $_config['field_disable_name'] != $config['field_disable_name'] || $_config['show_sages'] != $config['show_sages']) { + buildIndex(); + $query = query(sprintf("SELECT `id` FROM ``posts_%s`` WHERE `thread` IS NULL", $b)) or error(db_error()); + while ($post = $query->fetch(PDO::FETCH_ASSOC)) { + buildThread($post['id']); + } } + + buildJavascript(); + modLog('Edited board settings', $b); } diff --git a/js/katex-enable.js b/js/katex-enable.js index 66749f09..697b5cab 100644 --- a/js/katex-enable.js +++ b/js/katex-enable.js @@ -7,7 +7,7 @@ * $config['additional_javascript'][] = 'js/jquery.min.js'; * $config['additional_javascript'][] = 'js/katex-enable.js'; */ - +/* function render_katex(el) { try { katex.render($(el).text(), el) @@ -32,3 +32,4 @@ if (active_page == 'thread' || active_page == 'index') { }); }); } +*/ diff --git a/templates/8chan/index.html b/templates/8chan/index.html index 459e7e8e..2bad668d 100644 --- a/templates/8chan/index.html +++ b/templates/8chan/index.html @@ -1,13 +1,13 @@ - - - ∞chan - - + + - + -
+
-
+
- + -
- {% trans %}Welcome to ∞chan, the infinitely expanding imageboard.{% endtrans %} -
- {% trans %}Featured boards:{% endtrans %} - -
- {% trans %}Board of the week:{% endtrans %} /cow/, /fringe/, /desu/ -
-
+
+ {% trans %}Welcome to ∞chan, the infinitely expanding imageboard.{% endtrans %} +
+ {% trans %}Featured boards:{% endtrans %} + +
+ + {% trans %}Boards of the week:{% endtrans %} [  + {% for board in config.boards_of_the_week %} + {% if not loop.first %} {% endif %}{{ board }}{% if not loop.last %} /{% endif %} + {% endfor %} +  ] + +
+
- + -
+
- -
-
-

{% trans %}On ∞chan, you can create your own imageboard for free with no experience or programming knowledge needed. As long as the admin logs in once per week and it gets one new post every 72 hours, the board will be hosted forever.{% endtrans %}

-

{% trans %}Warning: Some boards on this site might contain content of an adult or offensive nature. Please cease use of this site if it is illegal for you to view such content. The boards on this site are made entirely by the users and do not represent the opinions of the administration of 8chan.co. In the interest of free speech, only content that directly violates the DMCA or other US laws is deleted.{% endtrans %}

- -
- - - -
-
+
+
+

{% trans %}On ∞chan, you can create your own imageboard for free with no experience or programming knowledge needed. As long as the admin logs in once per week and it gets one new post every 72 hours, the board will be hosted forever.{% endtrans %}

+

{% trans %}Warning: Some boards on this site might contain content of an adult or offensive nature. Please cease use of this site if it is illegal for you to view such content. The boards on this site are made entirely by the users and do not represent the opinions of the administration of 8chan.co. In the interest of free speech, only content that directly violates the DMCA or other US laws is deleted.{% endtrans %}

+ +
+ + + +
+
-
+
-
+
diff --git a/templates/mod/settings.html b/templates/mod/settings.html index 5268d373..3305555e 100644 --- a/templates/mod/settings.html +++ b/templates/mod/settings.html @@ -33,6 +33,7 @@ {% trans %}Display SAGE! after saged posts{% endtrans %} {% trans %}Automatically convert ... to …{% endtrans %} {% trans %}No index{% endtrans %}
{% trans %}Hide from boards index
and do not index in search engines{% endtrans %}
+ {% trans %}Archive my board on 8archive.moe{% endtrans %}
{% trans %}This archives your board on 8archive.moe if you opt in{% endtrans %} {% trans %}Public bans{% endtrans %}
{% trans %}Displays your bans for the public{% endtrans %} {% trans %}[code] tags{% endtrans %} {% trans %}Oekaki{% endtrans %}