Skip to content

Commit f2e676f

Browse files
author
CleanTalk
committed
Merge pull request #4 from VladCleantalk/master
1.8
2 parents 4c2e054 + 2dbbdeb commit f2e676f

6 files changed

+25
-11
lines changed

CHANGELOG

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 1.80 January 27, 2016
2+
------------------------------
3+
- Fixed "tell others" link output
4+
15
Version 1.70 January 21, 2016
26
------------------------------
37
- Updated base class

CleantalkMod.php

+17-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
require_once(dirname(__FILE__) . '/cleantalk.class.php');
1717

1818
// define same CleanTalk options
19-
define('CT_AGENT_VERSION', 'smf-170');
19+
define('CT_AGENT_VERSION', 'smf-180');
2020
define('CT_SERVER_URL', 'http://moderate.cleantalk.org');
2121
define('CT_DEBUG', false);
2222

@@ -414,13 +414,23 @@ function template_cleantalk_below()
414414
{
415415
}
416416

417-
function cleantalk_buffer($buffer){
417+
function cleantalk_buffer($buffer)
418+
{
418419
global $modSettings, $scripturl, $txt;
420+
421+
if (isset($_REQUEST['xml'])) return $buffer;
422+
423+
424+
if(!empty($modSettings['cleantalk_tell_others']))
425+
{
426+
$search = '';
427+
$replace = '';
419428

420-
$message = isset($txt) && isset($txt['cleantalk_tell_others_footer_message']) ?
421-
$txt['cleantalk_tell_others_footer_message'] :
422-
'<a href="https://cleantalk.org/smf-anti-spam-mod">SMF spam</a> blocked by CleanTalk';
423-
$message = '<div class="cleantalk_tell_others" style="text-align: center;padding:5px 0;">'.$message.'</div>';
429+
$search = '</body>';
430+
$replace = '<div class="cleantalk_tell_others" style="text-align: center; padding:5px 0;">' . $txt['cleantalk_tell_others_footer_message'] . '</div></body>';
431+
432+
return str_replace($search, $replace, $buffer);
433+
}
424434

425-
return isset($_REQUEST['xml']) ? $buffer : $buffer.$message;
435+
return $buffer;
426436
}

RoboFile.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class RoboFile extends \Robo\Tasks
99
{
1010
const PACKAGE = 'antispam_cleantalk_smf';
11-
const VERSION = '1.70';
11+
const VERSION = '1.80';
1212

1313
const SMF_VERSION = '2.0.11'; // for forumPrepare
1414

modification.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
33
<modification xmlns="www.simplemachines.org/xml/modification">
44
<id>cleantalk:antispam</id>
5-
<version>1.70</version>
5+
<version>1.80</version>
66

77
<file name="$sourcedir/Post.php">
88
<operation error="fatal">

package-info.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
44
<id>cleantalk:antispam</id>
55
<name>Anti-spam by CleanTalk</name>
6-
<version>1.70</version>
6+
<version>1.80</version>
77
<type>modification</type>
88
<install for="2.0 - 2.1.99">
99
<readme type="file" parsebbc="true">readme.txt</readme>

readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MOD [b]Anti-spam by CleanTalk[/b]
2-
Version: 1.60
2+
Version: 1.80
33

44
Anti-spam by CleanTalk mod with protection against spam bots and manual spam.
55
No Captcha, no questions, no counting animals, no puzzles, no math.

0 commit comments

Comments
 (0)