1
stuie200
Wordbook Module and Spam
  • 2006/4/19 19:59

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Is anybody here aware of a hack or an update to the Wordbook module which can help prevent spam requests being sumitted?

I love this module but im getting fed up of removing submissions about different states in America (about ten submissions per day)which come from what i belive to be dynamic ip addresses

Regards

Stuart
"I'm as confused as a baby in a topless bar."

2
jensclas
Re: Wordbook Module and Spam

I don't know of a hack...but there is a thread in here somewhere on trackback in weblog that has a discussion about the problem. I am still struggling to understand it all and resolve the problem too.

I have reached the point in word press me where I have comments approved and have removed anonymous from seeing it at all. You could try banning the IP's in your general admin which has worked for one I was always getting but I found this one guy 'BOB' - seemed to have the same email address but the spam cam from lots of different ip's. I don't know enough to fully understand it all. I'd like to ban him...but don't know how. A member search didn;t show him up so I am just hoping he was an anonymous user.

let's hope someone can give us more ideas here.

3
philou
Re: Wordbook Module and Spam
  • 2006/4/20 5:14

  • philou

  • Quite a regular

  • Posts: 384

  • Since: 2002/5/6 8


you can add a capcha feature in the module. Have a look at the website of Dugris : http://l.jen.free.fr/modules/smartsection/item.php?itemid=1

It works as well
Resized Image - - Resized Image

4
jensclas
Re: Wordbook Module and Spam

Hi Philou...is there an English version of a description of what it does and how it works...my french is 25 years rusty

5
DuGris
Re: Wordbook Module and Spam
  • 2006/4/23 10:20

  • DuGris

  • Core Developer

  • Posts: 67

  • Since: 2004/3/14


This class display an image with a Security Code and demand the user to enter a Security Code manually before allowing posting.

You can download this class here and the module manager here

You can see the different backgound image here

to use this class you must add in the XOOPS forms of this code before the submit buttons

if (defined('SECURITYIMAGE_INCLUDED')) {
    
$security_image = new SecurityImage_SECURITYIMAGE_GETCODE );
    if (
$security_image->render()) {
        
$form->addElement($security_imagetrue);
    }
}


and you must add this code after the submission for testing the code
include_once(XOOPS_ROOT_PATH "/class/xoopsformloader.php");
if ( 
defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
    
redirect_header('javascript:history.go(-1)' 2_SECURITYIMAGE_ERROR ) ;
exit();
}


here an example with the wordbook module

in the file include/storyform.inc.php to add the lines in red
....
....
if ( 
is_object$xoopsUser ) )
    {
    
$uid $xoopsUser->getVar('uid');
    
$sform -> addElement( new XoopsFormHidden'uid'$uid ) );

    
$notify_checkbox = new XoopsFormCheckBox'''notifypub'$notifypub );
    
$notify_checkbox -> addOption1_MD_WB_NOTIFY );
    
$sform -> addElement$notify_checkbox );
}

[
b][color=CC0000]if (defined('SECURITYIMAGE_INCLUDED')) {
    
$security_image = new SecurityImage_SECURITYIMAGE_GETCODE );
    if (
$security_image->render()) {
        
$sform->addElement($security_imagetrue);
    }
}[/
color][/b]

$button_tray = new XoopsFormElementTray'''' );
$hidden = new XoopsFormHidden'op''post' );
$button_tray -> addElement$hidden );
$button_tray -> addElement( new XoopsFormButton'''post'_MD_WB_CREATE'submit' ) );


in the file submit.php to add the lines in red
switch ( $op )
    {
    case 
'post':
[
b][color=CC0000]    include_once(XOOPS_ROOT_PATH "/class/xoopsformloader.php");
    if ( 
defined('SECURITYIMAGE_INCLUDED') && !SecurityImage::CheckSecurityImage() ) {
        
redirect_header('javascript:history.go(-1)' 2_SECURITYIMAGE_ERROR ) ;
        exit();
    }[/
color][/b]
    ...
    ....

6
jensclas
Re: Wordbook Module and Spam

Hi Again

Quote:
This class display an image with a Security Code and demand the user to enter a Security Code manually before allowing posting.


Is this how it works:
Spammers/Bots etc automatically lay posts everywhere with out ever even visiting your page in person.

However, with this security code added to the module, a person wishing to place a comment on a post would have to do it manually in order to view and type in the security code or else they will be ignored. Correct?

Thanks

7
DuGris
Re: Wordbook Module and Spam
  • 2006/4/23 22:52

  • DuGris

  • Core Developer

  • Posts: 67

  • Since: 2004/3/14


Not, but with the module manager, you can select the groups for which the code will be activated or not.

8
jensclas
Re: Wordbook Module and Spam

Thanks Dugris...I think i understand how it works now. netx step will be to try it

9
stuie200
Re: Wordbook Module and Spam
  • 2006/4/24 9:38

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Thanks for the reply DuGris but no matter what i try to do i cant get this working.

I have noticed that the code on the original site and the code you listed above have slight differences.

I have uploaded all the files as required, ensured my image librarys are configured correctly, added the relevant code where required and pulled all my hair out ;)

Can you please check the examples you listed above to confirm they are correct for me as my PHP skill are quite naff

Regards

Stuart
"I'm as confused as a baby in a topless bar."

10
DuGris
Re: Wordbook Module and Spam
  • 2006/4/24 11:24

  • DuGris

  • Core Developer

  • Posts: 67

  • Since: 2004/3/14


you can find the code here

and you can test the modification of the code here

for information
Xoops 2.0.13
Wordbook 1.16

Login

Who's Online

356 user(s) are online (256 user(s) are browsing Support Forums)


Members: 0


Guests: 356


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits