Go Back   Pligg Forum > Pligg Help > General Help
Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 12-11-2007, 02:46 PM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Thanks I found it.

Greatly Appreciated.

Thanks you!! I'm a noob sorry :)
Reply With Quote
Sponsored Links
  #32 (permalink)  
Old 12-11-2007, 03:02 PM
Divisive Cotton's Avatar
Divisive Cotton Divisive Cotton is offline
Pligg Donor
 
Join Date: Sep 2007
Posts: 221
Downloads: 15
Uploads: 0
Thanks: 2
Thanked 12 Times in 7 Posts
Talking



Quote:
we shall defend our Pligg site, whatever the cost may be, we shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender,
Reply With Quote
The Following User Says Thank You to Divisive Cotton For This Useful Post:
  #33 (permalink)  
Old 12-11-2007, 03:09 PM
JosephK's Avatar
JosephK JosephK is offline
New Pligger
 
Join Date: Jul 2007
Posts: 7
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
To stop spams "xxx@xxx.info" in comments

Edit the story.php file
To the line 183 :
--> if(strlen($_POST['comment_content']) > 0)

Add after "0":
--> && !strstr($_POST['comment_content'], "[site]")

Replace [site] by the url/word of your spammer or "a href=" to disable any link.

Personnally, I have only one spammer (which make lot of damage) on my site and this method stop him absolutely. (but a lot of users are still registred :/)

Something like that could be improved in order to use a black list of spam words...

Last edited by JosephK : 12-11-2007 at 03:28 PM.
Reply With Quote
  #34 (permalink)  
Old 12-11-2007, 03:27 PM
katlis katlis is offline
New Pligger
 
Join Date: Sep 2007
Posts: 28
Downloads: 7
Uploads: 0
Thanks: 0
Thanked 7 Times in 4 Posts
I've added a math question to my registration page. You can see it at luxa.org.

Open register.php and look for this...

Code:
	if($password !== $password2) { // if both passwords do not match
		$main_smarty->assign('register_error_text', "nopassmatch");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
Underneath that, add this:

Code:
	$mynumber = 9;

	if($_POST["addit"] != $mynumber) {
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
Now in your register_step_1.tpl file, add this form field...

Code:
		<label>You're Human Right? What is 8 + 1?</label>
		<input type="text" id="addit" name="addit" size="2" tabindex="5"/>
		<br /><br/>
Hope it works.

Edit: Also add that form field to your sidebar_modules/login.tpl too.

Last edited by katlis : 12-11-2007 at 03:33 PM.
Reply With Quote
The Following 3 Users Say Thank You to katlis For This Useful Post:
  #35 (permalink)  
Old 12-11-2007, 03:29 PM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Very nice katlis I will add this as well!

Cheers, bbrian017
Reply With Quote
  #36 (permalink)  
Old 12-11-2007, 04:42 PM
SportsGuy SportsGuy is offline
New Pligger
 
Join Date: Aug 2007
Posts: 21
Downloads: 5
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Just wanted to say thanks to everyone who has contributed ideas to help stop this rash of spamming.

I suddenly noticed 100 new users today, and having been online for a while, I quickly realized it was bogus. :(

I spent about 30 minutes deleting users one by one to get caught up, then high-tailed it here to learn more. As usual, it was the right move in terms of learning how to deal with things. With randomly generated e-mail addresses, and different IP addresses, it's not as easy to stop this "attack", but it's doable. :)

Big thanks to the devs, admins and everyone else who has posted or is working on solutions. Very much appreciated folks.

Duane
Reply With Quote
  #37 (permalink)  
Old 12-11-2007, 04:54 PM
davemackey's Avatar
davemackey davemackey is offline
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 296
Downloads: 8
Uploads: 0
Thanks: 31
Thanked 24 Times in 18 Posts
Whew. The spammer is really slamming me. Gonna go grab the Akismet module. Thanks for the help Ash and Chuck!
David.
Reply With Quote
  #38 (permalink)  
Old 12-11-2007, 06:15 PM
davemackey's Avatar
davemackey davemackey is offline
Pligg Donor
Pligg Version: 9.9.
Pligg Template: siChunkBlue
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 296
Downloads: 8
Uploads: 0
Thanks: 31
Thanked 24 Times in 18 Posts
I really like what Katlis did, but I think a longer term solution is going to require dynamic numbers. So I tried something like this (can someone explain why it isn't working):
In register.php added:
$number1 = mt_rand(1,10);
$number2 = mt_rand(1,25);
$rnd_smarty = new smarty;
$rnd_smarty->assign('number1', $number1);
$rnd_smarty->assign('number2', $number2);
$rnd_smarty->display('register_step_1.tpl');
$mynumber = $number1+$number2;

if($_POST["addit"] != $mynumber)
Then in register_step_1.tpl:
<label>You're Human Right? What is {$number1} + {$number2}?</label>
<input type="text" id="addit" name="addit" size="2" tabindex="5"/>

Essentially I am:
1. Generating two random numbers.
2. Passing those two random numbers to the register page.
3. Checking that the individual gave the right sum.
Its all the same as katlis' code, except the addition of variables. I think for some reason the variables aren't being passed to the page. I'm not a PHP coder or a Smarty Template designer. Can anyone give me a hand with this?
David.
Reply With Quote
The Following User Says Thank You to davemackey For This Useful Post:
  #39 (permalink)  
Old 12-11-2007, 06:20 PM
bbrian017 bbrian017 is offline
Banned
Pligg Version: 9.9.5
 
Join Date: Oct 2007
Location: Canada
Posts: 917
Downloads: 30
Uploads: 0
Thanks: 171
Thanked 17 Times in 17 Posts
Very nice davemackey thank you for taking the time to add your magic :)

Cheers,

bbrian017
Reply With Quote
  #40 (permalink)  
Old 12-11-2007, 06:27 PM
AshDigg's Avatar
AshDigg AshDigg is offline
Mayor of PliggVille
 
Join Date: Dec 2005
Posts: 1,623
Downloads: 34
Uploads: 10
Thanks: 237
Thanked 346 Times in 207 Posts
Quote:
Originally Posted by davemackey View Post
I really like what Katlis did, but I think a longer term solution is going to require dynamic numbers. So I tried something like this (can someone explain why it isn't working):
In register.php added:
$number1 = mt_rand(1,10);
$number2 = mt_rand(1,25);
$rnd_smarty = new smarty;
$rnd_smarty->assign('number1', $number1);
$rnd_smarty->assign('number2', $number2);
$rnd_smarty->display('register_step_1.tpl');
$mynumber = $number1+$number2;

if($_POST["addit"] != $mynumber)
Then in register_step_1.tpl:
<label>You're Human Right? What is {$number1} + {$number2}?</label>
<input type="text" id="addit" name="addit" size="2" tabindex="5"/>

Essentially I am:
1. Generating two random numbers.
2. Passing those two random numbers to the register page.
3. Checking that the individual gave the right sum.
Its all the same as katlis' code, except the addition of variables. I think for some reason the variables aren't being passed to the page. I'm not a PHP coder or a Smarty Template designer. Can anyone give me a hand with this?
David.

Don't spend too much time on this... I'm working on a module to allow admins to choose what type of captcha system to use. This random number addition method will be one of the options to choose from. I'll be released very soon.
__________________
- Ash
Reply With Quote
The Following 2 Users Say Thank You to AshDigg For This Useful Post:
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Wiki has been spammed... jrothra Suggestions 5 07-14-2007 03:20 PM


LinkBacks Enabled by vBSEO 3.0.0