Kaynağa Gözat

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.

pull/107/head
Benjamin Southall 7 yıl önce
ebeveyn
işleme
a83a284e1d
3 değiştirilmiş dosya ile 27 ekleme ve 7 silme
  1. +8
    -1
      templates/themes/ukko/theme.php
  2. +10
    -4
      templates/themes/ukko2/theme.php
  3. +9
    -2
      templates/themes/ukko3/theme.php

+ 8
- 1
templates/themes/ukko/theme.php Dosyayı Görüntüle

@@ -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 )
);
}


+ 10
- 4
templates/themes/ukko2/theme.php Dosyayı Görüntüle

@@ -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 )
);
}


+ 9
- 2
templates/themes/ukko3/theme.php Dosyayı Görüntüle

@@ -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 )
);
}


Yükleniyor…
İptal
Kaydet