mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-18 03:37:35 +01:00
8archive.moe
This commit is contained in:
parent
3f6805d7df
commit
f1c2388840
@ -316,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 = <<<EOT
|
||||
<?php
|
||||
\$config['country_flags'] = $country_flags;
|
||||
@ -349,6 +349,8 @@ $locale
|
||||
$add_to_config
|
||||
EOT;
|
||||
|
||||
$query = query('SELECT `uri`, `title`, `subtitle` FROM ``boards`` WHERE `8archive` = TRUE');
|
||||
file_write('8archive.json', json_encode($query->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'=>'<div class="ban">'.purify($_POST['rules']).'</div>')));
|
||||
|
@ -33,6 +33,7 @@
|
||||
<tr><th>{% trans %}Display SAGE! after saged posts{% endtrans %}</th><td><input type="checkbox" name="show_sages" {% if config.show_sages %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Automatically convert ... to …{% endtrans %}</th><td><input type="checkbox" name="auto_unicode" {% if config.auto_unicode %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}No index{% endtrans %}<br><span class="unimportant">{% trans %}Hide from boards index<br/>and do not index in search engines{% endtrans %}</span></th><td><input type="checkbox" name="meta_noindex" {% if not board.indexed %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Archive my board on 8archive.moe{% endtrans %}<br><span class="unimportant">{% trans %}This archives your board on 8archive.moe if you opt in{% endtrans %}</span></th><td><input type="checkbox" name="8archive" {% if board['8archive'] %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Public bans{% endtrans %}<br><span class="unimportant">{% trans %}Displays your bans for the public{% endtrans %}</span></th><td><input type="checkbox" name="public_bans" {% if board.public_bans %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}[code] tags{% endtrans %}</th><td><input type="checkbox" name="code_tags" {% if 'js/code_tags/run_prettify.js' in config.additional_javascript %}checked{% endif %}></td></tr>
|
||||
<tr><th>{% trans %}Oekaki{% endtrans %}</th><td><input type="checkbox" name="oekaki" {% if 'js/wpaint.js' in config.additional_javascript %}checked{% endif %}></td></tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user