|
|
@ -67,7 +67,7 @@ |
|
|
|
/** |
|
|
|
* Build and save the HTML of the catalog for the Ukko theme |
|
|
|
*/ |
|
|
|
public function buildUkko() { |
|
|
|
public function buildUkko($mod = false) { |
|
|
|
global $board, $config; |
|
|
|
|
|
|
|
$ukkoSettings = themeSettings('ukko'); |
|
|
@ -97,7 +97,7 @@ |
|
|
|
return strcmp($b['bump'], $a['bump']); |
|
|
|
}); |
|
|
|
// Generate data for the template |
|
|
|
$recent_posts = $this->generateRecentPosts($threads); |
|
|
|
$recent_posts = $this->generateRecentPosts($threads, $mod); |
|
|
|
|
|
|
|
// Generate board data for building |
|
|
|
$board_original = $board; |
|
|
@ -106,16 +106,18 @@ |
|
|
|
$board['title'] = $ukkoSettings['title']; |
|
|
|
$board['subtitle'] = $ukkoSettings['subtitle']; |
|
|
|
|
|
|
|
$this->saveForBoard($ukkoSettings['uri'], $recent_posts, |
|
|
|
$config['root'] . $ukkoSettings['uri']); |
|
|
|
$ret = $this->saveForBoard($ukkoSettings['uri'], $recent_posts, |
|
|
|
$config['root'] . $ukkoSettings['uri'], $mod); |
|
|
|
|
|
|
|
$board = $board_original; |
|
|
|
|
|
|
|
return $ret; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Build and save the HTML of the catalog for the Rand theme |
|
|
|
*/ |
|
|
|
public function buildRand() { |
|
|
|
public function buildRand($mod = false) { |
|
|
|
global $board, $config; |
|
|
|
|
|
|
|
$randSettings = themeSettings('rand'); |
|
|
@ -143,7 +145,7 @@ |
|
|
|
// Randomize order |
|
|
|
shuffle($threads); |
|
|
|
// Generate data for the template |
|
|
|
$recent_posts = $this->generateRecentPosts($threads); |
|
|
|
$recent_posts = $this->generateRecentPosts($threads, $mod); |
|
|
|
|
|
|
|
// Generate board data for building |
|
|
|
$board_original = $board; |
|
|
@ -152,10 +154,12 @@ |
|
|
|
$board['title'] = $randSettings['title']; |
|
|
|
$board['subtitle'] = $randSettings['subtitle']; |
|
|
|
|
|
|
|
$this->saveForBoard($randSettings['uri'], $recent_posts, |
|
|
|
$config['root'] . $randSettings['uri']); |
|
|
|
$ret = $this->saveForBoard($randSettings['uri'], $recent_posts, |
|
|
|
$config['root'] . $randSettings['uri'], $mod); |
|
|
|
|
|
|
|
$board = $board_original; |
|
|
|
|
|
|
|
return $ret; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|