summaryrefslogtreecommitdiff
path: root/templates/themes/ukko
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-04-25 00:47:14 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-04-25 00:47:14 +0900
commita16122329f77e60568ac2400af9ed00829c31990 (patch)
tree8ba87b5c91ed47739375ebcc68f05d844de3bbfc /templates/themes/ukko
parentbea631d3f5e7d533185187e284cd392da73de325 (diff)
Add ['overboard_post_form'] to allow overboard post forms. Adjustments to ukko theme to support this
Diffstat (limited to 'templates/themes/ukko')
-rw-r--r--templates/themes/ukko/theme.php11
-rw-r--r--templates/themes/ukko/ukko.js2
2 files changed, 8 insertions, 5 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php
index 6c5d5d15..1d98f836 100644
--- a/templates/themes/ukko/theme.php
+++ b/templates/themes/ukko/theme.php
@@ -45,11 +45,13 @@
'title' => sprintf($this->settings['subtitle'], $this->settings['thread_limit'])
);
+ $boardsforukko = array();
$query = '';
foreach($boards as &$_board) {
if(in_array($_board['uri'], explode(' ', $this->settings['exclude'])))
continue;
$query .= sprintf("SELECT *, '%s' AS `board` FROM ``posts_%s`` WHERE `thread` IS NULL UNION ALL ", $_board['uri'], $_board['uri']);
+ array_push($boardsforukko,$_board);
}
$query = preg_replace('/UNION ALL $/', 'ORDER BY `bump` DESC', $query);
$query = query($query) or error(db_error());
@@ -80,8 +82,8 @@
while ($po = $posts->fetch()) {
if ($po['files'])
$num_images++;
-
- $thread->add(new Post($po, $mod ? '?/' : $config['root'], $mod));
+ $post2 = new Post($po, $mod ? '?/' : $config['root'], $mod);
+ $thread->add($post2);
}
if ($posts->rowCount() == ($post['sticky'] ? $config['threads_preview_sticky'] : $config['threads_preview'])) {
@@ -140,11 +142,12 @@
return Element('index.html', array(
'config' => $config,
'board' => $board,
- 'no_post_form' => true,
+ 'no_post_form' => $config['overboard_post_form'] ? false : true,
'body' => $body,
'mod' => $mod,
'boardlist' => createBoardlist($mod),
- ));
+ 'boards' => $boardsforukko )
+ );
}
};
diff --git a/templates/themes/ukko/ukko.js b/templates/themes/ukko/ukko.js
index b2668e0b..deeccfd0 100644
--- a/templates/themes/ukko/ukko.js
+++ b/templates/themes/ukko/ukko.js
@@ -84,7 +84,7 @@ $(document).ready(function() {
$(data).find('div[id*="thread_"]').each(function() {
var checkout = $(this).attr('id').replace('thread_', '');
if ($('div#thread_' + checkout + '[data-board="' + overflow[0].board + '"]').length == 0) {
- $('form[name="postcontrols"]').prepend($(this).css('display', 'none').attr("data-cached", "yes").attr('data-board', overflow[0].board));
+ $('form[name="postcontrols"]').prepend($(this).css('display', 'block').attr("data-cached", "yes").attr('data-board', overflow[0].board));
}
});