summaryrefslogtreecommitdiff
path: root/templates/themes
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2017-05-11 21:10:24 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2017-05-11 21:10:24 +0900
commita83a284e1d5af3b1f9794822bea8bb6ea26c1d75 (patch)
tree32d49ec7c698cd212f15aa77e9c31028cbbd82b8 /templates/themes
parentfef6f0bef93647d27224fa4c96589b412a8ea708 (diff)
Add antibot to Element constructor in yukko themes, in the hope that posting from overboards as a normal user is not incorrectly blocked as spam / request looks automated.
Diffstat (limited to 'templates/themes')
-rw-r--r--templates/themes/ukko/theme.php9
-rw-r--r--templates/themes/ukko2/theme.php14
-rw-r--r--templates/themes/ukko3/theme.php11
3 files changed, 27 insertions, 7 deletions
diff --git a/templates/themes/ukko/theme.php b/templates/themes/ukko/theme.php
index 6faf7139..d08b6769 100644
--- a/templates/themes/ukko/theme.php
+++ b/templates/themes/ukko/theme.php
@@ -139,6 +139,12 @@
$jsonFilename = $board['dir'] . 'threads.json';
file_write($jsonFilename, $json);
}
+ $antibot = null;
+ if (!$antibot) {
+ $antibot = create_antibot($board['uri']);
+ }
+ $antibot->reset();
+
return Element('index.html', array(
'config' => $config,
'board' => $board,
@@ -146,7 +152,8 @@
'body' => $body,
'mod' => $mod,
'boardlist' => createBoardlist($mod),
- 'boards' => $boardsforukko )
+ 'boards' => $boardsforukko,
+ 'antibot' => $antibot )
);
}
diff --git a/templates/themes/ukko2/theme.php b/templates/themes/ukko2/theme.php
index 76a78caf..bb21caa0 100644
--- a/templates/themes/ukko2/theme.php
+++ b/templates/themes/ukko2/theme.php
@@ -44,7 +44,6 @@
'name' => $this->settings['title'],
'title' => sprintf($this->settings['subtitle'], $this->settings['thread_limit'])
);
-
$boardsforukko2 = array();
$query = '';
foreach($boards as &$_board) {
@@ -138,15 +137,22 @@
$json = json_encode($api->translateCatalog($catalog, true));
$jsonFilename = $board['dir'] . 'threads.json';
file_write($jsonFilename, $json);
- }
+ }
+ $antibot = null;
+ if (!$antibot) {
+ $antibot = create_antibot($board['uri']);
+ }
+ $antibot->reset();
+
return Element('index.html', array(
'config' => $config,
'board' => $board,
- 'no_post_form' => $config['overboard_post_form'] ? false : true,
+ 'no_post_form' => $config['overboard_post_form'] ? false : true,
'body' => $body,
'mod' => $mod,
'boardlist' => createBoardlist($mod),
- 'boards' => $boardsforukko2 )
+ 'boards' => $boardsforukko2,
+ 'antibot' => $antibot )
);
}
diff --git a/templates/themes/ukko3/theme.php b/templates/themes/ukko3/theme.php
index 937a1ef3..53910199 100644
--- a/templates/themes/ukko3/theme.php
+++ b/templates/themes/ukko3/theme.php
@@ -138,7 +138,13 @@
$json = json_encode($api->translateCatalog($catalog, true));
$jsonFilename = $board['dir'] . 'threads.json';
file_write($jsonFilename, $json);
- }
+ }
+ $antibot = null;
+ if (!$antibot) {
+ $antibot = create_antibot($board['uri']);
+ }
+ $antibot->reset();
+
return Element('index.html', array(
'config' => $config,
'board' => $board,
@@ -146,7 +152,8 @@
'body' => $body,
'mod' => $mod,
'boardlist' => createBoardlist($mod),
- 'boards' => $boardsforukko3 )
+ 'boards' => $boardsforukko3,
+ 'antibot' => $antibot )
);
}