1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00
This commit is contained in:
8chan 2014-10-09 21:40:24 -04:00
commit da0ea45730
7 changed files with 31 additions and 16 deletions

View File

@ -10,9 +10,7 @@ $cbRecaptcha = true;
include "inc/lib/recaptcha/recaptchalib.php";
}
checkBan('*');
$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/', '/^reports$/');
$ayah = (($config['ayah_enabled']) ? new AYAH() : false);
@ -78,7 +76,7 @@ foreach (listBoards() as $i => $board) {
error(_('Board already exists!'));
}
foreach ($bannedWords as $i => $w) {
foreach ($config['banned_boards'] as $i => $w) {
if ($w[0] !== '/') {
if (strpos($uri,$w) !== false)
error(_("Cannot create board with banned word $w"));

15
faq.php
View File

@ -46,18 +46,27 @@ $body = <<<EOT
<li>[tex] tags if enabled by board owner</li>
</ul>
<h2>Are you really a cripple?</h2>
<p>Yes.</p>
<h2>How are featured boards chosen?</h2>
<p>Top fifteen boards excluding /meta/, /b/ and /int/.</p>
<h2>Who owns /meta/, /b/, and /int/?</h2>
<p>No one, so they are <em>de facto</em> property of the administration.</p>
<h2>Where's the mobile app?</h2>
<p>There is no official mobile app, however there is an unofficial Android app at <a href="https://github.com/wingy/Exodus/releases">wingy/Exodus</a>.</p>
<p>I don't provide support for this app, ask the developer of it if you have a problem with it.</p>
<h2>Where's the archive?</h2>
<p>There isn't one yet and there will never be an official archive.</p>
<h2>How do I donate?</h2>
<p>Donations can be sent to 1NpQaXqmCBji6gfX8UgaQEmEstvVY7U32C (Bitcoin) or LUPgSCJt3iGeJXUETVhmnbQ89Riaq1yjZm (Litecoin). PayPal is also accepted @ fredrick.brennan1@gmail.com .</p>
<p>You may also donate monthly via Patreon at <a href="http://www.patreon.com/user?u=162165">http://www.patreon.com/user?u=162165</a>.
<h2>Are you really a cripple?</h2>
<p>Yes.</p>
</div>
EOT;

View File

@ -219,7 +219,7 @@ class Bans {
$ban['mask'] = preg_split("/[\.:]/", $ban['mask']);
$ban['mask'] = array_slice($ban['mask'], 0, 2);
$ban['mask'] = implode(".", $ban['mask']);
$ban['mask'] .= ".*";
$ban['mask'] .= ".x.x";
if (isset ($subnet)) {
$ban['mask'] .= "/$subnet";
}

View File

@ -111,8 +111,6 @@
$config['additional_javascript'][] = 'js/webm-settings.js';
$config['additional_javascript'][] = 'js/expand-video.js';
$config['additional_javascript'][] = 'js/treeview.js';
$config['additional_javascript'][] = 'js/download-all.js';
$config['additional_javascript'][] = 'js/jszip.min.js';
$config['additional_javascript'][] = 'js/quick-post-controls.js';
$config['additional_javascript'][] = 'js/expand-too-long.js';
$config['additional_javascript'][] = 'js/settings.js';
@ -134,8 +132,10 @@
$config['additional_javascript'][] = 'js/id_highlighter.js';
$config['additional_javascript'][] = 'js/id_colors.js';
$config['additional_javascript'][] = 'js/inline.js';
$config['additional_javascript'][] = 'js/infinite-scroll.js';
$config['additional_javascript'][] = 'js/download-original.js';
$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css';
//$config['font_awesome_css'] = '/netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css';
$config['stylesheets']['Dark'] = 'dark.css';
$config['stylesheets']['Photon'] = 'photon.css';
@ -145,7 +145,7 @@
$config['markup'][] = array("/\[spoiler\](.+?)\[\/spoiler\]/", "<span class=\"spoiler\">\$1</span>");
$config['markup'][] = array("/~~(.+?)~~/", "<s>\$1</s>");
$config['boards'] = array(array('<i class="fa fa-home" title="Home"></i>' => '/', '<i class="fa fa-tags" title="Boards"></i>' => '/boards.html', '<i class="fa fa-question" title="FAQ"></i>' => '/faq.html', '<i class="fa fa-random" title="Random"></i>' => '/random.php', '<i class="fa fa-plus" title="New board"></i>' => '/create.php', '<i class="fa fa-search" title="Search"></i>' => '/search.php', '<i class="fa fa-cog" title="Manage board"></i>' => '/mod.php', '<i class="fa fa-quote-right" title="Chat"></i>' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('<i class="fa fa-twitter" title="Twitter"></i>'=>'https://twitter.com/infinitechan'));
$config['boards'] = array(array('<i class="fa fa-home" title="Home"></i>' => '/', '<i class="fa fa-tags" title="Boards"></i>' => '/boards.html', '<i class="fa fa-question" title="FAQ"></i>' => '/faq.html', '<i class="fa fa-random" title="Random"></i>' => '/random.php', '<i class="fa fa-plus" title="New board"></i>' => '/create.php', '<i class="fa fa-ban" title="Public ban list"></i>' => '/bans.html', '<i class="fa fa-search" title="Search"></i>' => '/search.php', '<i class="fa fa-cog" title="Manage board"></i>' => '/mod.php', '<i class="fa fa-quote-right" title="Chat"></i>' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('<i class="fa fa-twitter" title="Twitter"></i>'=>'https://twitter.com/infinitechan'));
//$config['boards'] = array(array('<i class="fa fa-home" title="Home"></i>' => '/', '<i class="fa fa-tags" title="Boards"></i>' => '/boards.html', '<i class="fa fa-question" title="FAQ"></i>' => '/faq.html', '<i class="fa fa-random" title="Random"></i>' => '/random.php', '<i class="fa fa-plus" title="New board"></i>' => '/create.php', '<i class="fa fa-search" title="Search"></i>' => '/search.php', '<i class="fa fa-cog" title="Manage board"></i>' => '/mod.php', '<i class="fa fa-quote-right" title="Chat"></i>' => 'https://qchat.rizon.net/?channels=#8chan'), array('b', 'meta', 'int'), array('v', 'a', 'tg', 'fit', 'pol', 'tech', 'mu', 'co', 'sp', 'boards'), array('<i class="fa fa-twitter" title="Twitter"></i>'=>'https://twitter.com/infinitechan'));
$config['footer'][] = 'Contribute to 8chan.co development at <a href="https://github.com/ctrlcctrlv/8chan">github</a>';

View File

@ -138,8 +138,16 @@ $(document).ready(function() {
// don't attach to outbound links
if (App.options.get('useInlining')) {
$('.body a:not([rel]), .mentioned a')
.attr('onclick', null)// XXX disable highlightReply
.click(inline)
var assign_inline = function() {
$('.body a:not([rel]), .mentioned a')
.attr('onclick', null)// XXX disable highlightReply
.click(inline)
}
assign_inline();
$(document).on('new_post', function(e, post) {
assign_inline();
});
}
});

View File

@ -32,7 +32,7 @@
<tr><th>Poster ID's</th><td><input type="checkbox" name="poster_ids" {% if config.poster_ids %}checked{% endif %}></td></tr>
<tr><th>Display SAGE! after saged posts</th><td><input type="checkbox" name="show_sages" {% if config.show_sages %}checked{% endif %}></td></tr>
<tr><th>Automatically convert ... to …</th><td><input type="checkbox" name="auto_unicode" {% if config.auto_unicode %}checked{% endif %}></td></tr>
<tr><th>No index<br><span class="unimportant">Hide from boards index<br/>and do not index in search engines</span></th><td><input type="checkbox" name="meta_noindex" {% if not board_indexed %}checked{% endif %}></td></tr>
<tr><th>No index<br><span class="unimportant">Hide from boards index<br/>and do not index in search engines</span></th><td><input type="checkbox" name="meta_noindex" {% if not board.indexed %}checked{% endif %}></td></tr>
<tr><th>Public bans<br><span class="unimportant">Displays your bans for the public</span></th><td><input type="checkbox" name="public_bans" {% if board.public_bans %}checked{% endif %}></td></tr>
<tr><th>[code] tags</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>Oekaki</th><td><input type="checkbox" name="oekaki" {% if 'js/wpaint.js' in config.additional_javascript %}checked{% endif %}></td></tr>

View File

@ -16,7 +16,7 @@
public static function build($action, $settings) {
global $config;
if ($action == 'all')
if ($action == 'all' || $action == 'bans.html')
file_write($config['dir']['home'] . $settings['file_bans'], PBanlist::homepage($settings));
if ($action == 'all' || $action == 'bans')