Skip to content

Commit 2bcc9cb

Browse files
author
davydovct
committed
Fix footer link in Joomla 2
1 parent 3f575cf commit 2bcc9cb

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Anti-spam plugin for Joomla 2.5-3.X.
22
============
3-
Version 5.0.1
3+
Version 5.1
44

55
## Simple antispam test
66

antispambycleantalk.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* CleanTalk joomla plugin
55
*
6-
* @version 5.0.1
6+
* @version 5.1
77
* @package Cleantalk
88
* @subpackage Joomla
99
* @author CleanTalk (welcome@cleantalk.org)
@@ -25,7 +25,7 @@ class plgSystemAntispambycleantalk extends JPlugin {
2525
/**
2626
* Plugin version string for server
2727
*/
28-
const ENGINE = 'joomla3-501';
28+
const ENGINE = 'joomla3-51';
2929

3030
/**
3131
* Default value for hidden field ct_checkjs
@@ -889,17 +889,19 @@ public function onAfterRender(){
889889
$code = "<div id='cleantalk_footer_link' style='width:100%;text-align:center;'><a href='https://cleantalk.org/joomla-anti-spam-plugin-without-captcha'>Anti-spam by CleanTalk</a> for Joomla!<br>".$config['spam_count']." spam blocked</div>";
890890
else
891891
$code = "<div id='cleantalk_footer_link' style='width:100%;text-align:center;'><a href='https://cleantalk.org/joomla-anti-spam-plugin-without-captcha'>Anti-spam by CleanTalk</a> for Joomla!<br></div>";
892-
if(!version_compare(JVERSION, '3', 'ge'))
892+
893+
if(version_compare(JVERSION, '3.0', '<') == 1)
893894
{
894895
$documentbody = JResponse::getBody();
895-
$documentbody = str_replace ("</footer>", $code." </footer>", $documentbody);
896+
$documentbody = str_replace ("</body>", $code." </body>", $documentbody);
896897
JResponse::setBody($documentbody);
897898
}
898899
else
899900
{
900901
$documentbody = JFactory::getApplication()->getBody();
901902
$documentbody = str_replace ("</footer>", $code." </footer>", $documentbody);
902-
JFactory::getApplication()->setBody($documentbody);
903+
JFactory::getApplication()->setBody($documentbody);
904+
903905
}
904906
}
905907

antispambycleantalk.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<license>GNU/GPLv2</license>
88
<authorEmail>welcome@cleantalk.org</authorEmail>
99
<authorUrl>cleantalk.org</authorUrl>
10-
<version>5.0.1</version>
10+
<version>5.1</version>
1111
<description>PLG_CLEANTALK_DESCRIPTION</description>
1212
<files>
1313
<filename plugin="antispambycleantalk">antispambycleantalk.php</filename>

plugin-updates.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<folder>system</folder>
99
<client_id>0</client_id>
1010
<client>0</client>
11-
<version>5.0.1</version>
11+
<version>5.1</version>
1212
<infourl title="Antispam by CleanTalk">https://cleantalk.org/joomla-anti-spam-plugin-without-captcha</infourl>
1313
<downloads>
1414
<downloadurl type="full" format="zip">https://github.com/CleanTalk/joomla25-3x-antispam/archive/master.zip</downloadurl>

0 commit comments

Comments
 (0)