Avoiding Spam in Joomla

If you own or administer a Joomla/Mambo site and are frequently being attacked by spammers in your forum/guestbook/gallery, com_securityimages may be the solution for you. There are some instructions here to show how to configure it to work with joomlaboard/simpleboard. Basically, you just call the security framework at insertion and validation time. To add anti-spam support for zOOm gallery (com_zoom), just edit the file /components/com_zoom/www/view.php and find the following lines:

<input type="hidden" name="isAdmin" value="<?php echo $zoom->_isAdmin; ?>" />
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value=
"<?php echo _ZOOM_ADD;?>" class="button" /></td>

Replace this lines with:

 


<input type="hidden" name="isAdmin" value=
"<?php echo $zoom->_isAdmin; ?>" />
</td>
</tr>
<?php include ($mosConfig_absolute_path.
'/administrator/components/com_securityimages/client.php'); ?>
<tr>
<td class="sb_leftcolumn">Anti-spam:
</td>
<td>
<?php echo insertSecurityImage("security_refid"); ?><br/>
<?php echo getSecurityImageText("security_try"); ?></td></tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value=
"<?php echo _ZOOM_ADD;?>" class="button" /></td>

Now find the lines:

if ($zoom->_gallery->_images[$key]->isMember($popup)) {
if ($submit === true) {
    $uname = $zoom->getParam($_REQUEST, 'uname');
    $comment = ($zoom->getParam($_REQUEST, 'comment'));
    $zoom->_gallery->_images[$key]->addComment($uname,$comment);
        }

and replace them with:

 

if ($zoom->_gallery->_images[$key]->isMember($popup)) {
include ($mosConfig_absolute_path.
'/administrator/components/com_securityimages/server.php');
$checkSecurity = checkSecurityImage($security_refid, $security_try);
if ($submit === true) {
        if ($checkSecurity==false){
        echo "";} else{ $uname = $zoom->getParam($_REQUEST, 'uname'); $comment = ($zoom->getParam($_REQUEST, 'comment')); $zoom->_gallery->_images[$key]->addComment($uname,$comment); }} 

And that’s it! You should now have captcha images showing up on your zOOm gallery comment boxes, avoind the huge ammount of spam that this component is usually victim.

 

This code was implemented in this website: Carapecos Online – Photo Gallery and is currently using SecurityImages component 4.2.1 

VN:F [1.9.11_1134]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.11_1134]
Rating: 0 (from 0 votes)

Popularity: 17% [?]

Tags: . 

Related Entries:
  • Search keywords
  • Hi Sir, here is my spam
  • Joomla – Enabling registered users do add content


  • 9 Responses to “Avoiding Spam in Joomla”

    1. 3vFGgNO732 Says:

      Hi! Very nice site! Thanks you very much! WkYi7zgWeXt

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    2. Jurgen Says:

      On what ZOOM version is your solution based? In my version the view.php does not contain the code you specify. Instead the following is listed:

      “if ($zoom->_CONFIG['commentsOn']) {$prefix = ZMG_Template_View::createViewBlock(_ZOOM_COMMENTS);
      ZMG_Template_View::showCommentsBox($zoom->_CONFIG['viewtype'], $dir_prefix, $key);
      if (($zoom->_CONFIG['anonymous_comments']) || (!$zoom->_CONFIG['anonymous_comments'] && !empty($my->username))){
      if ($zoom->_CONFIG['popUpImages']) {
      $cmt_action = $url_prefix;}
      else {$cmt_action = sefRelToAbs($url_prefix);}
      ZMG_Template_View::showCommentsForm($zoom->_CONFIG['viewtype'], $cmt_action, $dir_prefix, $popup, $key);}
      ZMG_Template_View::finishViewBlock($zoom->_CONFIG['comments_state'], $prefix);} //END if commentsOn?”

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    3. Jurgen Says:

      Forgot: I use version 2.5.1 RC4 wk08

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    4. dsbzobgshe Says:

      Hello! Good Site! Thanks you! qciluyzicnu

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    5. doubled Says:

      looks good, but that code is not presemnt in my view.php

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    6. fyfkhnmqyt Says:

      Thanks for this site!
      [url=http://qea.com/resources/phentermine_online.html]phentermine online[/url]

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    7. raf Says:

      It’s not working.

      It says the comment has been added but the comment box is empty.

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    8. cheap all inclusive cruises Says:

      I just found your rss page and added it to the Google Reader and voil? – I’m always up-to-date! Well buddy, keep up the good work and make that rss button a little bigger so that other people can enjoy that as well

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)
    9. frenky Says:

      UHRRiQ http://gdjI3b7VaWpU1m0dGpvjRrcu9Fk.com

      VA:F [1.9.11_1134]
      Rating: 0.0/5 (0 votes cast)
      VA:F [1.9.11_1134]
      Rating: 0 (from 0 votes)