mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-21 13:09:41 +01:00
Top bar blacklist
This commit is contained in:
parent
75a561a81f
commit
1db3bbe201
10
boards.php
10
boards.php
@ -94,7 +94,17 @@ if ($admin) {
|
|||||||
echo $html;
|
echo $html;
|
||||||
} else {
|
} else {
|
||||||
file_write("boards.json", json_encode($boards));
|
file_write("boards.json", json_encode($boards));
|
||||||
|
foreach ($boards as $i => $b) {
|
||||||
|
if (in_array($b['uri'], $config['no_top_bar_boards'])) {
|
||||||
|
unset($boards[$i]);
|
||||||
|
}
|
||||||
|
unset($boards[$i]['img']);
|
||||||
|
}
|
||||||
|
|
||||||
array_splice($boards, 20);
|
array_splice($boards, 20);
|
||||||
|
|
||||||
|
$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);
|
||||||
echo 'Done';
|
echo 'Done';
|
||||||
|
@ -3,7 +3,7 @@ $(document).ready(function(){
|
|||||||
window.boards = new Array();
|
window.boards = new Array();
|
||||||
function handle_boards(data) {
|
function handle_boards(data) {
|
||||||
$.each(data, function(k, v) {
|
$.each(data, function(k, v) {
|
||||||
if (v.uri != 'meta' && v.uri != 'b' && v.uri != 'int') {
|
if (v.uri != 'meta' && v.uri != 'b') {
|
||||||
boards.push('<a href="/'+v.uri+(window.active_page === 'catalog' ? '/catalog.html' : '')+'">'+v.uri+'</a>');
|
boards.push('<a href="/'+v.uri+(window.active_page === 'catalog' ? '/catalog.html' : '')+'">'+v.uri+'</a>');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user