forked from GithubBackups/vichan
Top 2k in separate file
This commit is contained in:
parent
ef3c83b53a
commit
3ab6489154
10
boards.php
10
boards.php
@ -115,9 +115,14 @@ $boards = array_values($boards);
|
|||||||
arsort($all_tags);
|
arsort($all_tags);
|
||||||
|
|
||||||
$config['additional_javascript'] = array('js/jquery.min.js', 'js/jquery.tablesorter.min.js');
|
$config['additional_javascript'] = array('js/jquery.min.js', 'js/jquery.tablesorter.min.js');
|
||||||
$body = Element("8chan/boards-tags.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'), 'tags' => $all_tags));
|
$body = Element("8chan/boards-tags.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'), 'tags' => $all_tags, 'top2k' => false));
|
||||||
|
|
||||||
$html = Element("page.html", array("config" => $config, "body" => $body, "title" => "Boards on ∞chan"));
|
$html = Element("page.html", array("config" => $config, "body" => $body, "title" => "Boards on ∞chan"));
|
||||||
|
array_splice($boards, 2000);
|
||||||
|
$boards = array_values($boards);
|
||||||
|
$body = Element("8chan/boards-tags.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'), 'tags' => $all_tags, 'top2k' => true));
|
||||||
|
$html_top2k = Element("page.html", array("config" => $config, "body" => $body, "title" => "Boards on ∞chan"));
|
||||||
|
|
||||||
if ($admin) {
|
if ($admin) {
|
||||||
echo $html;
|
echo $html;
|
||||||
} else {
|
} else {
|
||||||
@ -135,7 +140,8 @@ if ($admin) {
|
|||||||
$boards = array_values($boards);
|
$boards = array_values($boards);
|
||||||
|
|
||||||
file_write("boards-top20.json", json_encode($boards));
|
file_write("boards-top20.json", json_encode($boards));
|
||||||
file_write("boards.html", $html);
|
file_write("boards.html", $html_top2k);
|
||||||
|
file_write("boards_full.html", $html);
|
||||||
echo 'Done';
|
echo 'Done';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user