forked from leftypol/leftypol
Compare commits
3 commits
config
...
33-overboa
Author | SHA1 | Date | |
---|---|---|---|
![]() |
026a70988c | ||
![]() |
52dd8960a9 | ||
![]() |
a88a2e647e |
1 changed files with 9 additions and 26 deletions
|
@ -29,7 +29,7 @@
|
|||
// Copy the generated board HTML to its place
|
||||
file_write($overboard['uri'] . '/index.html', $overboards->build($overboard));
|
||||
file_write($overboard['uri'] . '/overboard.js',
|
||||
Element('themes/overboards/overboard.js', array()));
|
||||
Element('themes/overboards/overboard.js', []));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@
|
|||
global $config;
|
||||
|
||||
$html = '';
|
||||
$overflow = array();
|
||||
$overflow = [];
|
||||
|
||||
// Fetch threads from all boards and chomp the first 'n' posts, depending
|
||||
// on the setting
|
||||
|
@ -166,7 +166,7 @@
|
|||
// Top threads displayed on load
|
||||
$top_threads = array_splice($threads, 0, $overboard['thread_limit']);
|
||||
// Number of processed threads by board
|
||||
$counts = array();
|
||||
$counts = [];
|
||||
|
||||
// Output threads up to the specified limit
|
||||
foreach ($top_threads as $post) {
|
||||
|
@ -201,35 +201,18 @@
|
|||
$html .= '<script>var ukko_overflow = ' . json_encode($overflow) . '</script>';
|
||||
$html .= '<script type="text/javascript" src="/'.$overboard['uri'].'/overboard.js?=' . $config['resource_version'] . '"></script>';
|
||||
|
||||
return Element('index.html', array(
|
||||
return Element('index.html', [
|
||||
'config' => $config,
|
||||
'board' => array(
|
||||
'board' => [
|
||||
'dir' => $overboard['uri'] . "/",
|
||||
'url' => $overboard['uri'],
|
||||
'title' => $overboard['title'],
|
||||
'subtitle' => str_replace('%s', $overboard['thread_limit'],
|
||||
strval(min($overboard['subtitle'], $total_count))),
|
||||
),
|
||||
'no_post_form' => true,
|
||||
'subtitle' => str_replace('%s', $overboard['thread_limit'], strval(min($overboard['subtitle'], $total_count))),
|
||||
],
|
||||
'no_post_form' => !$config['overboard_post_form'],
|
||||
'body' => $html,
|
||||
'mod' => $mod,
|
||||
'boardlist' => createBoardlist($mod),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (!function_exists('array_column')) {
|
||||
/**
|
||||
* Pick out values from subarrays by given key
|
||||
*/
|
||||
function array_column($array, $key) {
|
||||
$result = [];
|
||||
foreach ($array as $val) {
|
||||
$result[] = $val[$key];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue