From 179df591af5aa97652ca5d204edf90e934db2ce7 Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 25 Sep 2014 21:35:17 +0000 Subject: [PATCH 01/16] mobile style in config --- inc/instance-config.php | 4 ++-- inc/secrets.php | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 inc/secrets.php diff --git a/inc/instance-config.php b/inc/instance-config.php index 96f32bb4..96cc3c1c 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -91,7 +91,7 @@ $config['additional_javascript'][] = 'js/favorites.js'; $config['additional_javascript'][] = 'js/show-op.js'; $config['additional_javascript'][] = 'js/hide-threads.js'; - //$config['additional_javascript'][] = 'js/smartphone-spoiler.js'; + $config['additional_javascript'][] = 'js/smartphone-spoiler.js'; $config['additional_javascript'][] = 'js/inline-expanding.js'; $config['additional_javascript'][] = 'js/show-backlinks.js'; $config['additional_javascript'][] = 'js/catalog-link.js'; @@ -100,7 +100,6 @@ $config['additional_javascript'][] = 'js/treeview.js'; $config['additional_javascript'][] = 'js/quick-post-controls.js'; $config['additional_javascript'][] = 'js/expand-too-long.js'; - //$config['additional_javascript'][] = 'js/auto-reload.js'; $config['additional_javascript'][] = 'js/settings.js'; $config['additional_javascript'][] = 'js/fix-report-delete-submit.js'; $config['additional_javascript'][] = 'js/hide-images.js'; @@ -116,6 +115,7 @@ $config['additional_javascript'][] = 'js/forced-anon.js'; $config['additional_javascript'][] = 'js/toggle-locked-threads.js'; $config['additional_javascript'][] = 'js/toggle-images.js'; + $config['additional_javascript'][] = 'js/mobile-style.js'; $config['font_awesome_css'] = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'; diff --git a/inc/secrets.php b/inc/secrets.php deleted file mode 100644 index b5d51a7c..00000000 --- a/inc/secrets.php +++ /dev/null @@ -1,4 +0,0 @@ - Date: Thu, 25 Sep 2014 22:53:56 +0000 Subject: [PATCH 02/16] I don't know what I did. --- create.php | 63 +++++++++++++++++++++++++++++------- expire.php | 4 +++ inc/api.php | 5 +-- inc/config.php | 19 +++++++++++ inc/functions.php | 20 ++++++------ inc/instance-config.php | 1 + inc/mod/pages.php | 44 +++++++++++++++++-------- install.sql | 6 ++++ js/auto-reload.js | 9 ++++++ js/quick-post-controls.js | 4 +++ post.php | 8 ++--- random.php | 6 ++-- search.php | 2 +- templates/report_delete.html | 2 +- 14 files changed, 148 insertions(+), 45 deletions(-) diff --git a/create.php b/create.php index 306829fd..41efa666 100644 --- a/create.php +++ b/create.php @@ -3,13 +3,33 @@ include "inc/functions.php"; include "inc/lib/ayah/ayah.php"; include "inc/mod/auth.php"; +$cbRecaptcha = false; +//don't load recaptcha LIB unless its enabled! +if ($config['cbRecaptcha']){ +$cbRecaptcha = true; +include "inc/lib/recaptcha/recaptchalib.php"; +} + + checkBan('*'); $bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/'); -$ayah = new AYAH(); +$ayah = (($config['ayah_enabled']) ? new AYAH() : false); if (!isset($_POST['uri'], $_POST['title'], $_POST['subtitle'], $_POST['username'], $_POST['password'])) { -$publisher_html = $ayah->getPublisherHTML(); +if (!$ayah){ + $game_html = ''; +} else { + $game_html = 'Game' . $ayah->getPublisherHTML() . ''; +} + +if (!$cbRecaptcha){ + $recapcha_html = ''; +} else { + $recapcha_html = 'reCaptcha' . recaptcha_get_html($config['recaptcha_public']) . ''; +} + + $password = base64_encode(openssl_random_pseudo_bytes(9)); $body = <<Subtitle (must be < 200 chars) Username (must contain only alphanumeric, periods and underscores) Password (write this down) -Game{$publisher_html} +{$game_html} +{$recapcha_html}
@@ -38,8 +59,27 @@ $title = $_POST['title']; $subtitle = $_POST['subtitle']; $username = $_POST['username']; $password = $_POST['password']; -$score = $ayah->scoreResult(); + $resp = ($cbRecaptcha) ? recaptcha_check_answer ($config['recaptcha_private'], + $_SERVER["REMOTE_ADDR"], + $_POST["recaptcha_challenge_field"], + $_POST["recaptcha_response_field"]):false; + +if ($resp != false){ +$passedCaptcha = $resp->is_valid; +} else { +$passedCaptcha = true; +} + +if (!$ayah){ +$score = true; +} else { +$score = $ayah->scoreResult(); +} +if (!$score) + error('You failed the game'); +if (!$passedCaptcha) + error('You failed to enter the reCaptcha correctly'); if (!preg_match('/^[a-z0-9]{1,10}$/', $uri)) error('Invalid URI'); if (!(strlen($title) < 40)) @@ -48,8 +88,7 @@ if (!(strlen($subtitle) < 200)) error('Invalid subtitle'); if (!preg_match('/^[a-zA-Z0-9._]{1,30}$/', $username)) error('Invalid username'); -if (!$score) - error('You failed the game'); + foreach (listBoards() as $i => $board) { if ($board['uri'] == $uri) error('Board already exists!'); @@ -64,12 +103,13 @@ foreach ($bannedWords as $i => $w) { error("Cannot create board matching banned pattern $w"); } } -$query = prepare('SELECT * FROM ``mods``'); +$query = prepare('SELECT ``username`` FROM ``mods`` WHERE ``username`` = :username'); +$query->bindValue(':username', $username); $query->execute() or error(db_error($query)); $users = $query->fetchAll(PDO::FETCH_ASSOC); -foreach ($users as $i => $user) { - if ($user['username'] == $username) - error('Username taken!'); + +if (sizeof($users) > 0){ +error('The username you\'ve tried to enter already exists!'); } $salt = generate_salt(); @@ -112,9 +152,10 @@ $body = <<Make sure you don't forget your password, {$_POST['password']}!

-

You can manage your site at http://8chan.co/mod.php?/.

+

You can manage your board at http://8chan.co/mod.php?/.

EOT; echo Element("page.html", array("config" => $config, "body" => $body, "title" => "Success", "subtitle" => "This was a triumph")); } +?> diff --git a/expire.php b/expire.php index 8e822852..17356ac4 100644 --- a/expire.php +++ b/expire.php @@ -130,6 +130,10 @@ foreach($delete as $i => $d){ // Delete entire board directory rrmdir($board['uri'] . '/'); rrmdir('static/banners/' . $board['uri']); + // HAAAAAX + if($config['dir']['img_root'] != '') + rrmdir($config['dir']['img_root'] . $board['uri']); + cache::delete('board_' . $board['uri']); _syslog(LOG_NOTICE, "Board deleted: {$board['uri']}"); diff --git a/inc/api.php b/inc/api.php index a8ae9eed..a140cd7e 100644 --- a/inc/api.php +++ b/inc/api.php @@ -41,8 +41,8 @@ class Api { ); $this->fileFields = array( - 'thumbheight' => 'tn_w', - 'thumbwidth' => 'tn_h', + 'thumbheight' => 'tn_h', + 'thumbwidth' => 'tn_w', 'height' => 'w', 'width' => 'h', 'size' => 'fsize', @@ -113,6 +113,7 @@ class Api { $apiPost['ext'] = substr($file->file, $dotPos); $dotPos = strrpos($file->file, '.'); $apiPost['tim'] = substr($file->file, 0, $dotPos); + //$apiPost['md5'] = base64_encode(md5_file($file->file_path, true)); } return $apiPost; diff --git a/inc/config.php b/inc/config.php index e88f4935..3905f198 100644 --- a/inc/config.php +++ b/inc/config.php @@ -277,8 +277,21 @@ 'no_country' ); + + + /* Uses are you a human to stop automated requests to make boards disabled by default + * if you wish to use 'are you a human' to block automated board creation requests + + * to use AYAH you must enter your 'AYAH_PUBLISHER_KEY' and your 'AYAH_SCORING_KEY' in + * the configuration file for AYAH. The config file for AYAH + * is located in the following directory:'/inc/lib/ayah/ayah_config.php' + */ + $config['ayah_enabled'] = false; + // Enable reCaptcha to make spam even harder. Rarely necessary. $config['recaptcha'] = false; + // Enable reCaptcha on create.php to prevent automated requests. + $config['cbRecaptcha'] = false; // Public and private key pair from https://www.google.com/recaptcha/admin/create $config['recaptcha_public'] = '6LcXTcUSAAAAAKBxyFWIt2SO8jwx4W7wcSMRoN3f'; @@ -1119,6 +1132,12 @@ $config['dir']['thumb'] = 'thumb/'; $config['dir']['res'] = 'res/'; + // Images in a seperate directory - For CDN or media servers + // This is a particularly advanced feature - contact ctrlcctrlv or rails unless you + // really know what you're doing + $config['dir']['img_root'] = ''; + + // For load balancing, having a seperate server (and domain/subdomain) for serving static content is // possible. This can either be a directory or a URL. Defaults to $config['root'] . 'static/'. // $config['dir']['static'] = 'http://static.example.org/'; diff --git a/inc/functions.php b/inc/functions.php index 72c2e974..e127a87d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -425,12 +425,12 @@ function setupBoard($array) { if (!file_exists($board['dir'])) @mkdir($board['dir'], 0777) or error("Couldn't create " . $board['dir'] . ". Check permissions.", true); - if (!file_exists($board['dir'] . $config['dir']['img'])) - @mkdir($board['dir'] . $config['dir']['img'], 0777) - or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); - if (!file_exists($board['dir'] . $config['dir']['thumb'])) - @mkdir($board['dir'] . $config['dir']['thumb'], 0777) - or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); + if (!file_exists($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'])) + @mkdir($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'], 0777) + or error("Couldn't create " . $config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); + if (!file_exists($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'])) + @mkdir($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'], 0777) + or error("Couldn't create " . $config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); if (!file_exists($board['dir'] . $config['dir']['res'])) @mkdir($board['dir'] . $config['dir']['res'], 0777) or error("Couldn't create " . $board['dir'] . $config['dir']['img'] . ". Check permissions.", true); @@ -997,11 +997,11 @@ function deleteFile($id, $remove_entirely_if_already=true, $file=null) { foreach ($files as $i => $f) { if (($file !== false && $i == $file) || $file === null) { // Delete thumbnail - file_unlink($board['dir'] . $config['dir']['thumb'] . $f->thumb); + file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'] . $f->thumb); unset($files[$i]->thumb); // Delete file - file_unlink($board['dir'] . $config['dir']['img'] . $f->file); + file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . $f->file); $files[$i]->file = 'deleted'; } } @@ -1080,8 +1080,8 @@ function deletePost($id, $error_if_doesnt_exist=true, $rebuild_after=true) { // Delete file foreach (json_decode($post['files']) as $i => $f) { if ($f->file !== 'deleted') { - file_unlink($board['dir'] . $config['dir']['img'] . $f->file); - file_unlink($board['dir'] . $config['dir']['thumb'] . $f->thumb); + file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . $f->file); + file_unlink($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'] . $f->thumb); } } } diff --git a/inc/instance-config.php b/inc/instance-config.php index 96cc3c1c..5d7f7823 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -41,6 +41,7 @@ $config['allow_no_country'] = true; $config['thread_subject_in_title'] = true; $config['spam']['hidden_inputs_max_pass'] = 128; + $config['ayah_enabled'] = true; include "secrets.php"; diff --git a/inc/mod/pages.php b/inc/mod/pages.php index f7ccf1a6..21e7c248 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -429,6 +429,9 @@ function mod_edit_board($boardName) { // Delete entire board directory rrmdir($board['uri'] . '/'); + // To reiterate: HAAAAAX + if($config['dir']['img_root'] != '') + rrmdir($config['dir']['img_root'] . $board['uri']); } else { $query = prepare('UPDATE ``boards`` SET `title` = :title, `subtitle` = :subtitle WHERE `uri` = :uri'); $query->bindValue(':uri', $board['uri']); @@ -1121,8 +1124,8 @@ function mod_move_reply($originBoard, $postID) { $post['files'] = json_decode($post['files'], TRUE); $post['has_file'] = true; foreach ($post['files'] as $i => &$file) { - $file['file_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']; - $file['thumb_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']; + $file['file_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']; + $file['thumb_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']; } } else { $post['has_file'] = false; @@ -1140,9 +1143,9 @@ function mod_move_reply($originBoard, $postID) { if ($post['has_file']) { foreach ($post['files'] as $i => &$file) { // move the image - rename($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); + rename($file['file_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']); if ($file['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error - rename($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); + rename($file['thumb_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']); } } } @@ -1222,8 +1225,8 @@ function mod_move($originBoard, $postID) { foreach ($post['files'] as $i => &$file) { if ($file['file'] === 'deleted') continue; - $file['file_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']; - $file['thumb_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']; + $file['file_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']; + $file['thumb_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']; } } else { $post['has_file'] = false; @@ -1242,9 +1245,9 @@ function mod_move($originBoard, $postID) { // copy image foreach ($post['files'] as $i => &$file) { if ($file['file'] !== 'deleted') - $clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); + $clone($file['file_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']); if (isset($file['thumb']) && !in_array($file['thumb'], array('spoiler', 'deleted', 'file'))) - $clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); + $clone($file['thumb_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']); } } @@ -1265,8 +1268,8 @@ function mod_move($originBoard, $postID) { $post['files'] = json_decode($post['files'], TRUE); $post['has_file'] = true; foreach ($post['files'] as $i => &$file) { - $file['file_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']; - $file['thumb_path'] = sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']; + $file['file_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']; + $file['thumb_path'] = sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']; } } else { $post['has_file'] = false; @@ -1305,8 +1308,8 @@ function mod_move($originBoard, $postID) { if ($post['has_file']) { // copy image foreach ($post['files'] as $i => &$file) { - $clone($file['file_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $file['file']); - $clone($file['thumb_path'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $file['thumb']); + $clone($file['file_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['img'] . $file['file']); + $clone($file['thumb_path'], sprintf($config['board_path'], $config['dir']['img_root'] . $board['uri']) . $config['dir']['thumb'] . $file['thumb']); } } // insert reply @@ -1582,7 +1585,7 @@ function mod_spoiler_image($board, $post, $file) { $result = $query->fetch(PDO::FETCH_ASSOC); $files = json_decode($result['files']); - file_unlink($board . '/' . $config['dir']['thumb'] . $files[$file]->thumb); + file_unlink($config['dir']['img_root'] . $board . '/' . $config['dir']['thumb'] . $files[$file]->thumb); $files[$file]->thumb = 'spoiler'; $files[$file]->thumbheight = 128; $files[$file]->thumbwidth = 128; @@ -1799,12 +1802,25 @@ function mod_user($uid) { $log = array(); } + if ($mod['type'] >= ADMIN){ + $boards = listBoards(); + } else { + $boards2 = explode(',', $user['boards']); + + foreach($boards2 as $string){ + + $boards[] = array("uri"=>$string, "title"=>"MY BOARD"); + + } + + + } $user['boards'] = explode(',', $user['boards']); mod_page(_('Edit user'), 'mod/user.html', array( 'user' => $user, 'logs' => $log, - 'boards' => listBoards(), + 'boards' => $boards, 'token' => make_secure_link_token('users/' . $user['id']) )); } diff --git a/install.sql b/install.sql index 969107a2..b8d95444 100644 --- a/install.sql +++ b/install.sql @@ -68,6 +68,11 @@ CREATE TABLE IF NOT EXISTS `boards` ( PRIMARY KEY (`uri`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; +CREATE TABLE IF NOT EXISTS `board_create` ( + `time` text NOT NULL, + `uri` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + -- -- Dumping data for table `boards` -- @@ -220,6 +225,7 @@ CREATE TABLE IF NOT EXISTS `reports` ( `board` varchar(58) CHARACTER SET utf8 DEFAULT NULL, `post` int(11) NOT NULL, `reason` text NOT NULL, + `global` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1 ; diff --git a/js/auto-reload.js b/js/auto-reload.js index 535b9a04..583a43e8 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -16,8 +16,16 @@ * */ + +au = false; auto_reload_enabled = true; // for watch.js to interop +function makeIcon(){ + if(au) return; + au = true; + $("link[rel='icon']").attr("href", "../static/favicon_au.png"); +} + $(document).ready(function(){ if($('div.banner').length == 0) return; // not index @@ -98,6 +106,7 @@ $(document).ready(function(){ if($('#' + id).length == 0) { if (!new_posts) { first_new_post = this; + makeIcon(); } $(this).insertAfter($('div.post:last').next()).after('
'); new_posts++; diff --git a/js/quick-post-controls.js b/js/quick-post-controls.js index 10d74f98..4e8df1cb 100644 --- a/js/quick-post-controls.js +++ b/js/quick-post-controls.js @@ -34,6 +34,10 @@ $(document).ready(function(){ '
' + + '[' + + '' + + '] ' + + ': ' + '' + ' ' + diff --git a/post.php b/post.php index 88189572..87b53fc6 100644 --- a/post.php +++ b/post.php @@ -445,8 +445,8 @@ if (isset($_POST['delete'])) { if (sizeof($_FILES) > 1) $file['file_id'] .= "-$i"; - $file['file'] = $board['dir'] . $config['dir']['img'] . $file['file_id'] . '.' . $file['extension']; - $file['thumb'] = $board['dir'] . $config['dir']['thumb'] . $file['file_id'] . '.' . ($config['thumb_ext'] ? $config['thumb_ext'] : $file['extension']); + $file['file'] = $config['dir']['img_root'] . $board['dir'] . $config['dir']['img'] . $file['file_id'] . '.' . $file['extension']; + $file['thumb'] = $config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'] . $file['file_id'] . '.' . ($config['thumb_ext'] ? $config['thumb_ext'] : $file['extension']); $post['files'][] = $file; $i++; } @@ -771,9 +771,9 @@ if (isset($_POST['delete'])) { foreach ($post['files'] as $key => &$file) { $file['file_path'] = $file['file']; $file['thumb_path'] = $file['thumb']; - $file['file'] = mb_substr($file['file'], mb_strlen($board['dir'] . $config['dir']['img'])); + $file['file'] = mb_substr($file['file'], mb_strlen($config['dir']['img_root'] . $board['dir'] . $config['dir']['img'])); if ($file['is_an_image'] && $file['thumb'] != 'spoiler') - $file['thumb'] = mb_substr($file['thumb'], mb_strlen($board['dir'] . $config['dir']['thumb'])); + $file['thumb'] = mb_substr($file['thumb'], mb_strlen($config['dir']['img_root'] . $board['dir'] . $config['dir']['thumb'])); } } diff --git a/random.php b/random.php index 050b6c82..f930d073 100644 --- a/random.php +++ b/random.php @@ -2,7 +2,9 @@ include "inc/functions.php"; -$boards = listBoards(); +$boards = listBoards(true); $board = array_rand($boards); -header('Location: /'.$boards[$board]["uri"]); +header('Location: /'.$boards[$board]); + +?> diff --git a/search.php b/search.php index 394aa3ff..71f4ae5e 100644 --- a/search.php +++ b/search.php @@ -15,7 +15,7 @@ $boards = listBoards(TRUE); } - $body = Element('search_form.html', Array('boards' => $boards, 'board' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false)); + $body = Element('search_form.html', Array('boards' => $boards, 'b' => isset($_GET['board']) ? $_GET['board'] : false, 'search' => isset($_GET['search']) ? str_replace('"', '"', utf8tohtml($_GET['search'])) : false)); if(isset($_GET['search']) && !empty($_GET['search']) && isset($_GET['board']) && in_array($_GET['board'], $boards)) { $phrase = $_GET['search']; diff --git a/templates/report_delete.html b/templates/report_delete.html index fc3ea8b4..d5d0debe 100644 --- a/templates/report_delete.html +++ b/templates/report_delete.html @@ -9,6 +9,6 @@
- [] + []
From ae183c1c42a570088fb56fd9f62c6cd9a622578f Mon Sep 17 00:00:00 2001 From: Bui Date: Fri, 26 Sep 2014 10:15:17 +0900 Subject: [PATCH 03/16] use country names in boards.html --- boards.php | 5 +- inc/countries.php | 254 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 inc/countries.php diff --git a/boards.php b/boards.php index 46bddb38..187384a6 100644 --- a/boards.php +++ b/boards.php @@ -2,6 +2,8 @@ include "inc/functions.php"; include "inc/mod/auth.php"; +include "inc/countries.php"; + $admin = isset($mod["type"]) && $mod["type"]<=30; if (php_sapi_name() == 'fpm-fcgi' && !$admin) { @@ -84,9 +86,10 @@ foreach ($boards as $i => &$board) { $locale_arr = explode('_', $locale); $locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]); $locale_short = str_replace('.utf-8', '', $locale_short); + $country = get_country($locale_short); if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo';} - $img = "\"$locale\""; + $img = "\"$country\""; if ($showboard || $admin) { if (!$showboard) { diff --git a/inc/countries.php b/inc/countries.php new file mode 100644 index 00000000..68b017ac --- /dev/null +++ b/inc/countries.php @@ -0,0 +1,254 @@ + Date: Fri, 26 Sep 2014 10:17:47 +0900 Subject: [PATCH 04/16] wrong function name --- inc/countries.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/countries.php b/inc/countries.php index 68b017ac..4a872d88 100644 --- a/inc/countries.php +++ b/inc/countries.php @@ -1,6 +1,6 @@ Date: Fri, 26 Sep 2014 10:38:23 +0900 Subject: [PATCH 05/16] only use 8chan locales --- boards.php | 2 +- inc/countries.php | 269 ++++------------------------------------------ 2 files changed, 23 insertions(+), 248 deletions(-) diff --git a/boards.php b/boards.php index 187384a6..eb567068 100644 --- a/boards.php +++ b/boards.php @@ -87,7 +87,7 @@ foreach ($boards as $i => &$board) { $locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]); $locale_short = str_replace('.utf-8', '', $locale_short); $country = get_country($locale_short); - if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo';} + if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo'; $country = 'Esperanto';} $img = "\"$country\""; diff --git a/inc/countries.php b/inc/countries.php index 4a872d88..e9e0fd60 100644 --- a/inc/countries.php +++ b/inc/countries.php @@ -1,254 +1,29 @@ Date: Sat, 27 Sep 2014 03:03:54 +0930 Subject: [PATCH 06/16] A quick update to config.php --- inc/config.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/config.php b/inc/config.php index 3905f198..0d66f72d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1136,6 +1136,8 @@ // This is a particularly advanced feature - contact ctrlcctrlv or rails unless you // really know what you're doing $config['dir']['img_root'] = ''; + // DO NOT COMMENT OUT, LEAVE BLANK AND OVERRIDE IN INSTANCE CONFIG + // Though, you shouldnt be editing this file, so what do I know? // For load balancing, having a seperate server (and domain/subdomain) for serving static content is From 1ba6003c812a0b590b60a9b6fa28610766300f6b Mon Sep 17 00:00:00 2001 From: undido Date: Fri, 26 Sep 2014 17:34:34 -0300 Subject: [PATCH 07/16] Fixed bug with webm, image-hover closes when you click an image to expand it to expand it inline --- js/image-hover.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/image-hover.js b/js/image-hover.js index c752a2cf..cebb94d6 100644 --- a/js/image-hover.js +++ b/js/image-hover.js @@ -24,12 +24,22 @@ $(document).ready(function(){ imageHover = !imageHover; var imageEnter = function(){ + if (!imageHover) return; + //don't hover-image if image expanded + if ($(this).parent().attr("data-expanded") == "true") + return; + mouseexitedImage = false; mouseisOnImage = false; - + //remove hover-image if user clicks on image to expand it + $(this).click(function(){ + mouseexitedImage = false; + mouseisOnImage = false; + $("#hover-image").remove(); + }); isVideo = (($(this).prop("tagName") == "VIDEO") ? true:($(this).parent().attr("href").indexOf("player.php?v=") > -1) ? true:false); maxWidth = document.body.offsetWidth-(document.body.offsetWidth * 0.25); maxHeight = document.documentElement.clientHeight; From c599bbb4bca271124ba7bb93ccc3983d4779bff7 Mon Sep 17 00:00:00 2001 From: undido Date: Fri, 26 Sep 2014 18:08:11 -0300 Subject: [PATCH 08/16] only append hover-toggle element to first options_tab class --- js/image-hover.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/image-hover.js b/js/image-hover.js index cebb94d6..18662c0a 100644 --- a/js/image-hover.js +++ b/js/image-hover.js @@ -88,7 +88,7 @@ $(document).ready(function(){ $mrCheckie = $('
'); - $(".options_tab").append($mrCheckie); + $(".options_tab:first").append($mrCheckie); $("#toggle-hover").prop("checked", imageHover); $("#toggle-hover").on("click", function(){ if ($(this).prop("checked")){ @@ -100,7 +100,7 @@ $(document).ready(function(){ } }); - $(".options_tab").append(); + $(document).on("new_post", function(e, post) { $(post).hover(imageEnter(),imageLeave()); From d5c975622e4fda9fd8538c33916d3c0b89f14fe7 Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 26 Sep 2014 23:52:02 +0000 Subject: [PATCH 09/16] Use templates for more pages, i18n --- boards.php | 72 +------ create.php | 58 ++--- index.php | 323 +--------------------------- templates/8chan/boards.html | 55 +++++ templates/8chan/create.html | 15 ++ templates/8chan/create_success.html | 5 + templates/8chan/index.html | 311 ++++++++++++++++++++++++++ 7 files changed, 410 insertions(+), 429 deletions(-) create mode 100644 templates/8chan/boards.html create mode 100644 templates/8chan/create.html create mode 100644 templates/8chan/create_success.html create mode 100644 templates/8chan/index.html diff --git a/boards.php b/boards.php index 22a76816..f38c0185 100644 --- a/boards.php +++ b/boards.php @@ -9,31 +9,6 @@ if (php_sapi_name() == 'fpm-fcgi' && !$admin) { } $boards = listBoards(); -$body = << -th.header { - background-image: url(/static/bg.gif); - cursor: pointer; - background-repeat: no-repeat; - background-position: center right; - padding-left: 20px; - margin-left: -1px; -} -th.headerSortUp { - background-image: url(/static/asc.gif); -} -th.headerSortDown { - background-image: url(/static/desc.gif); -} -.flag-eo { - background-image: url(/static/eo.png); -} -.flag-en { - background-image: url(/static/en.png); -} - -CSS; -$body .= ''; $total_posts_hour = 0; $total_posts = 0; @@ -69,6 +44,7 @@ function ($a, $b) { }); $hidden_boards_total = 0; +$rows = array(); foreach ($boards as $i => &$board) { $board_config = @file_get_contents($board['uri'].'/config.php'); $boardCONFIG = array(); @@ -86,7 +62,7 @@ foreach ($boards as $i => &$board) { $locale_short = str_replace('.utf-8', '', $locale_short); if ($board['uri'] === 'int') {$locale_short = 'eo'; $locale = 'eo';} - $img = "\"$locale\""; + $board['img'] = "\"$locale\""; if ($showboard || $admin) { if (!$showboard) { @@ -95,58 +71,18 @@ foreach ($boards as $i => &$board) { $lock = ''; } $board['ago'] = human_time_diff(strtotime($board['time'])); - $body .= ""; - $body .= ""; - $body .= ""; - $body .= ""; - $body .= ""; - $body .= ""; - $body .= ""; } else { unset($boards[$i]); $hidden_boards_total += 1; } } -$body .= <<
LBoardBoard titlePosts in last hourTotal postsCreated
$img/{$board['uri']}/$lock{$board['title']}{$board['pph']}{$board['max']}{$board['time']} ({$board['ago']} ago)
-FOOTER; - $n_boards = sizeof($boards); $t_boards = $hidden_boards_total + $n_boards; -$body = "

There are currently {$n_boards} boards + $hidden_boards_total unindexed boards = $t_boards total boards. Site-wide, {$total_posts_hour} posts have been made in the last hour, with {$total_posts} being made on all active boards since October 23, 2013.

" . $body; - -//date_default_timezone_set('UTC'); -$body .= "

Page last updated: ".date('r')."

"; -$body .= "

".shell_exec('uptime -p')." without interruption

"; - $config['additional_javascript'] = array('js/jquery.min.js', 'js/jquery.tablesorter.min.js'); +$body = Element("8chan/boards.html", array("config" => $config, "n_boards" => $n_boards, "t_boards" => $t_boards, "hidden_boards_total" => $hidden_boards_total, "total_posts" => $total_posts, "total_posts_hour" => $total_posts_hour, "boards" => $boards, "last_update" => date('r'), "uptime_p" => shell_exec('uptime -p'))); + $html = Element("page.html", array("config" => $config, "body" => $body, "title" => "Boards on ∞chan")); if ($admin) { echo $html; diff --git a/create.php b/create.php index 41efa666..88f3952e 100644 --- a/create.php +++ b/create.php @@ -20,7 +20,7 @@ if (!isset($_POST['uri'], $_POST['title'], $_POST['subtitle'], $_POST['username' if (!$ayah){ $game_html = ''; } else { - $game_html = 'Game' . $ayah->getPublisherHTML() . ''; + $game_html = ''._('Game').'' . $ayah->getPublisherHTML() . ''; } if (!$cbRecaptcha){ @@ -32,25 +32,9 @@ if (!$cbRecaptcha){ $password = base64_encode(openssl_random_pseudo_bytes(9)); -$body = << - - - - - - - -{$game_html} -{$recapcha_html} - -
URI// (must be all lowercase or numbers and < 10 chars)
Title (must be < 40 chars)
Subtitle (must be < 200 chars)
Username (must contain only alphanumeric, periods and underscores)
Password (write this down)
-
- +$body = Element("8chan/create.html", array("config" => $config, "password" => $password, "game_html" => $game_html, "recapcha_html" => $recapcha_html)); -EOT; - -echo Element("page.html", array("config" => $config, "body" => $body, "title" => "Create your board", "subtitle" => "before someone else does")); +echo Element("page.html", array("config" => $config, "body" => $body, "title" => _("Create your board"), "subtitle" => _("before someone else does"))); } else { @@ -77,30 +61,30 @@ $score = true; $score = $ayah->scoreResult(); } if (!$score) - error('You failed the game'); + error(_('You failed the game')); if (!$passedCaptcha) - error('You failed to enter the reCaptcha correctly'); + error(_('You failed to enter the reCaptcha correctly')); if (!preg_match('/^[a-z0-9]{1,10}$/', $uri)) - error('Invalid URI'); + error(_('Invalid URI')); if (!(strlen($title) < 40)) - error('Invalid title'); + error(_('Invalid title')); if (!(strlen($subtitle) < 200)) - error('Invalid subtitle'); + error(_('Invalid subtitle')); if (!preg_match('/^[a-zA-Z0-9._]{1,30}$/', $username)) - error('Invalid username'); + error(_('Invalid username')); foreach (listBoards() as $i => $board) { if ($board['uri'] == $uri) - error('Board already exists!'); + error(_('Board already exists!')); } foreach ($bannedWords as $i => $w) { if ($w[0] !== '/') { if (strpos($uri,$w) !== false) - error("Cannot create board with banned word $w"); + error(_("Cannot create board with banned word $w")); } else { if (preg_match($w,$uri)) - error("Cannot create board matching banned pattern $w"); + error(_("Cannot create board matching banned pattern $w")); } } $query = prepare('SELECT ``username`` FROM ``mods`` WHERE ``username`` = :username'); @@ -109,7 +93,7 @@ $query->execute() or error(db_error($query)); $users = $query->fetchAll(PDO::FETCH_ASSOC); if (sizeof($users) > 0){ -error('The username you\'ve tried to enter already exists!'); +error(_('The username you\'ve tried to enter already exists!')); } $salt = generate_salt(); @@ -142,20 +126,14 @@ buildIndex(); rebuildThemes('boards'); -query("INSERT INTO ``board_create``(uri) VALUES('$uri')") or error(db_error()); +$query = prepare("INSERT INTO ``board_create``(uri) VALUES(:uri)"); +$query->bindValue(':uri', $uri); +$query->execute() or error(db_error()); _syslog(LOG_NOTICE, "New board: $uri"); -$body = << $config, "password" => $_POST['password'], "uri" => $uri)); -

Your new board is created and is live at /{$uri}/.

- -

Make sure you don't forget your password, {$_POST['password']}!

- -

You can manage your board at http://8chan.co/mod.php?/.

- -EOT; - -echo Element("page.html", array("config" => $config, "body" => $body, "title" => "Success", "subtitle" => "This was a triumph")); +echo Element("page.html", array("config" => $config, "body" => $body, "title" => _("Success"), "subtitle" => _("This was a triumph"))); } ?> diff --git a/index.php b/index.php index 83a6451b..1aa350c6 100644 --- a/index.php +++ b/index.php @@ -1,323 +1,4 @@ +include 'inc/functions.php'; - - - - - ∞chan - - - - - -
- -
- - - -
- Welcome to ∞chan, the infinitely expanding imageboard. -
- Featured boards: - [ v / a / tg / fit / pol / tech / mu / co / sp / boards ] -
-
- - - -
- - - -
-
-

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.

- -
- - - -
-
- -
- - - - -
- - - - - +echo Element("8chan/index.html", array("config" => $config)); diff --git a/templates/8chan/boards.html b/templates/8chan/boards.html new file mode 100644 index 00000000..3e7c402d --- /dev/null +++ b/templates/8chan/boards.html @@ -0,0 +1,55 @@ + + +

{% trans %}There are currently {{n_boards}} boards + {{hidden_boards_total}} unindexed boards = {{t_boards}} total boards. Site-wide, {{total_posts_hour}} posts have been made in the last hour, with {{total_posts}} being made on all active boards since October 23, 2013.{% endtrans %}

+ + +{% for board in boards %} + + + + + + + +{% endfor %} +
L{% trans %}Board{% endtrans %}{% trans %}Board title{% endtrans %}{% trans %}Posts in last hour{% endtrans %}{% trans %}Total posts{% endtrans %}{% trans %}Created{% endtrans %}
{{ board.img|raw }}/{{board['uri']}}/{{lock|raw}}{{ board['title'] }}{{board['pph']}}{{board['max']}}{{board['time']}} ({{board['ago']}} ago)
+

Page last updated: {{last_update}}

+

{{uptime_p}} without interruption

+ + diff --git a/templates/8chan/create.html b/templates/8chan/create.html new file mode 100644 index 00000000..668d165a --- /dev/null +++ b/templates/8chan/create.html @@ -0,0 +1,15 @@ +
+ + + + + + + +{{ game_html }} +{{ recapcha_html }} + +
URI// {% trans %}(must be all lowercase or numbers and < 10 chars){% endtrans %}
Title {% trans %}(must be < 40 chars){% endtrans %}
Subtitle {% trans %}(must be < 200 chars){% endtrans %}
{% trans %}Username{% endtrans %} {% trans %}(must contain only alphanumeric, periods and underscores){% endtrans %}
{% trans %}Password{% endtrans %} {% trans %}(write this down){% endtrans %}
+
+
+ diff --git a/templates/8chan/create_success.html b/templates/8chan/create_success.html new file mode 100644 index 00000000..b129787c --- /dev/null +++ b/templates/8chan/create_success.html @@ -0,0 +1,5 @@ +

{% trans %}Your new board is created and is live at{% endtrans %} /{{ uri }}/.

+ +

{% trans %}Make sure you don't forget your password, {{ password }}!{% endtrans %}

+ +

{% trans %}You can manage your board at http://8chan.co/mod.php?/.{% endtrans %}

diff --git a/templates/8chan/index.html b/templates/8chan/index.html new file mode 100644 index 00000000..54ceae28 --- /dev/null +++ b/templates/8chan/index.html @@ -0,0 +1,311 @@ + + + + + ∞chan + + + + + +
+ +
+ + + +
+ {% trans %}Welcome to ∞chan, the infinitely expanding imageboard.{% endtrans %} +
+ {% trans %}Featured boards:{% endtrans %} + [ v / a / tg / fit / pol / tech / mu / co / sp / boards ] +
+
+ + + +
+ + + +
+
+

{% 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 %}

+ +
+ + + +
+
+ +
+ + + + From d5b551e68292620e0480ef5c7e85f91e6af6f8a8 Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 26 Sep 2014 23:53:25 +0000 Subject: [PATCH 10/16] Disable hash antispam (lazy - need to add an option later) --- post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post.php b/post.php index 87b53fc6..b8996fac 100644 --- a/post.php +++ b/post.php @@ -239,11 +239,11 @@ if (isset($_POST['delete'])) { error($config['error']['noaccess']); } - if (!$post['mod']) { + /*if (!$post['mod']) { $post['antispam_hash'] = checkSpam(array($board['uri'], isset($post['thread']) ? $post['thread'] : ($config['try_smarter'] && isset($_POST['page']) ? 0 - (int)$_POST['page'] : null))); if ($post['antispam_hash'] === true) error($config['error']['spam']); - } + }*/ if ($config['robot_enable'] && $config['robot_mute']) { checkMute(); From 88e7b239e818847912e6af76fd36e9905cd89874 Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 26 Sep 2014 23:53:52 +0000 Subject: [PATCH 11/16] threadscroll was in template for no reason --- templates/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 6c89bb0e..9f9a6117 100644 --- a/templates/index.html +++ b/templates/index.html @@ -95,6 +95,5 @@ ready(); {% endraw %} - From 992d2472c9556894ea280e11a44640f1e566f0cc Mon Sep 17 00:00:00 2001 From: anonfagola Date: Fri, 26 Sep 2014 16:55:16 -0700 Subject: [PATCH 12/16] Updated threadscroll.js with bettter compatibility --- js/threadscroll.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/threadscroll.js b/js/threadscroll.js index c3c6deef..0a233f58 100644 --- a/js/threadscroll.js +++ b/js/threadscroll.js @@ -16,7 +16,7 @@ if(active_page == "index" || active_page == "ukko"){ if(par.length == 1){ if(par.prev().attr("id") != null){ if(par.prev().attr("id").match("^thread")){ - window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.prev().attr("id"); + par.prev()[0].scrollIntoView(true); } } } @@ -28,7 +28,7 @@ if(active_page == "index" || active_page == "ukko"){ if(par.length == 1){ if(par.next().attr("id") != null){ if(par.next().attr("id").match("^thread")){ - window.location.href = window.location.protocol+"//"+window.location.host+window.location.pathname+"#"+par.next().attr("id"); + par.next()[0].scrollIntoView(true); } } } From 695a8a3aaf11ccf0526d7b9887519e5a5b9dfe72 Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 26 Sep 2014 23:54:53 +0000 Subject: [PATCH 13/16] Update instance config --- inc/instance-config.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/instance-config.php b/inc/instance-config.php index 1e5081b5..820d8176 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -22,6 +22,9 @@ $config['cookies']['mod'] = 'mod'; $config['cookies']['salt'] = ''; + $config['spam']['hidden_inputs_max_pass'] = 128; + $config['spam']['hidden_inputs_expire'] = 60 * 60 * 4; // three hours + $config['flood_time'] = 5; $config['flood_time_ip'] = 2; $config['flood_time_same'] = 2; @@ -42,6 +45,7 @@ $config['thread_subject_in_title'] = true; $config['spam']['hidden_inputs_max_pass'] = 128; $config['ayah_enabled'] = true; + $config['dnsbl'] = array(); include "secrets.php"; @@ -93,7 +97,6 @@ $config['additional_javascript'][] = 'js/favorites.js'; $config['additional_javascript'][] = 'js/show-op.js'; $config['additional_javascript'][] = 'js/hide-threads.js'; - $config['additional_javascript'][] = 'js/mobile-style.js' $config['additional_javascript'][] = 'js/smartphone-spoiler.js'; $config['additional_javascript'][] = 'js/inline-expanding.js'; $config['additional_javascript'][] = 'js/show-backlinks.js'; @@ -119,7 +122,6 @@ $config['additional_javascript'][] = 'js/toggle-locked-threads.js'; $config['additional_javascript'][] = 'js/toggle-images.js'; $config['additional_javascript'][] = 'js/mobile-style.js'; - $config['additional_javascript'][] = 'js/threadscroll.js'; $config['font_awesome_css'] = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css'; @@ -389,3 +391,5 @@ EOT; ); $config['gzip_static'] = false; + +require_once "dnsbls.php"; From f16f88966c605fd12cec7b6aaf8e95ec0d9b7191 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 27 Sep 2014 00:44:41 +0000 Subject: [PATCH 14/16] Fix multi image from quick reply --- js/multi-image.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/multi-image.js b/js/multi-image.js index 10c28557..77c3f766 100644 --- a/js/multi-image.js +++ b/js/multi-image.js @@ -18,7 +18,10 @@ function multi_image() { var images_len = $('form:not([id="quick-reply"]) [type=file]').length; if (!(images_len >= max_images)) { - $('[type=file]:last').after('
'); + var new_file = '
'; + + $('[type=file]:last').after(new_file); + $('form:not([id="quick-reply"]) [type=file]:last').after(new_file); if (typeof setup_form !== 'undefined') setup_form($('form[name="post"]')); } }) From 5e62e7a143dda6d370129c22aebe66608757a490 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 27 Sep 2014 00:44:55 +0000 Subject: [PATCH 15/16] Disallow multiple Shrink all images appearing --- js/expand-all-images.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/expand-all-images.js b/js/expand-all-images.js index fc273e5e..5545045c 100644 --- a/js/expand-all-images.js +++ b/js/expand-all-images.js @@ -27,7 +27,10 @@ onready(function(){ $(this).parent().click(); }); - $('hr:first').before('
'); + if (!$('#shrink-all-images').length) { + $('hr:first').before('
'); + } + $('div#shrink-all-images a') .text(_('Shrink all images')) .click(function(){ From 24caf95f20522dc1832c9be65b44494c96915af5 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 27 Sep 2014 00:52:21 +0000 Subject: [PATCH 16/16] Fix mod.php catalog 404 bug --- inc/instance-config.php | 1 - templates/index.html | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/instance-config.php b/inc/instance-config.php index 820d8176..7ab9dfdc 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -100,7 +100,6 @@ $config['additional_javascript'][] = 'js/smartphone-spoiler.js'; $config['additional_javascript'][] = 'js/inline-expanding.js'; $config['additional_javascript'][] = 'js/show-backlinks.js'; - $config['additional_javascript'][] = 'js/catalog-link.js'; $config['additional_javascript'][] = 'js/webm-settings.js'; $config['additional_javascript'][] = 'js/expand-video.js'; $config['additional_javascript'][] = 'js/treeview.js'; diff --git a/templates/index.html b/templates/index.html index 9f9a6117..8bdd26fa 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,6 +31,7 @@ {% endif %} {% endif %} {% if mod %}

{% trans %}Return to dashboard{% endtrans %}

{% endif %} +

Catalog