Help - Search - Members - Calendar
Full Version: Forum Spamming...Fixed
BrainMeta.com Forum > Feedback, Announcements & FAQ > Announcements
Shawn
Ok, I have implemented a new filter that requires users to make at least 10 posts before being allowed to post URL's. This should largely solve the forum spam problem.

If you try to post a url and have not made at least 10 posts, you will receive a message like the following: You must make more posts before being allowed to post URL's. If you receive this message in error, or experience any other problems with posting, email brainmaps at gmail dot com
Trip like I do
that's just great shawn. How about uploading images and the like? I still cannot upload any images to change my avatar.
maximus242
Do this http://brainmeta.com/forum/index.php?showtopic=16471&hl= until it gets fixed Trip. Thats how I got mine back.
code buttons
QUOTE(Shawn @ Dec 17, 2006, 11:20 PM) *

Ok, I have implemented a new filter that requires users to make at least 10 posts before being allowed to post URL's. This should largely solve the forum spam problem.

If you try to post a url and have not made at least 10 posts, you will receive a message like the following: You must make more posts before being allowed to post URL's. If you receive this message in error, or experience any other problems with posting, email brainmaps at gmail dot com

Thank you Mr. Mikula, Sir. And happy holidays to you and the whole BM family.
Lao_Tzu
Holy crap Shawn, how did you do that?

Please let me know? I would love to implement the same thing on my own forum.
maximus242
Learn PHP... then all you do is take the number of posts as a variable, do an if function.

Heres an idea of what it would look like.

If (posts > 10 & hyperlink() == True)

Post()

Else: Deny()

Thats not the actual PHP code but its close enough to understand, its easy to do anyways. First you have a function that determines if the user is trying to post a hyperlink, then you check if they have ten posts, if they do you post it, if not you send a message saying they have been denied and need more posts.
lucid_dream
QUOTE(maximus242 @ Dec 21, 2006, 02:59 PM) *

Learn PHP... then all you do is take the number of posts as a variable, do an if function.

Heres an idea of what it would look like.

If (posts > 10 & hyperlink() == True)

Post()

Else: Deny()

Thats not the actual PHP code but its close enough to understand, its easy to do anyways. First you have a function that determines if the user is trying to post a hyperlink, then you check if they have ten posts, if they do you post it, if not you send a message saying they have been denied and need more posts.


so if posts>10 and hyperlink()==False, then Deny()?? That doesn't seem like a desirable thing to do.


I think you mean:

If (hyperlink() == True)

If (posts > 10)

Post()

Else: Deny()

Else: Post()


maximus242
Oh yeah, lol I completly forgot about that, yeah thats much better.
Lao_Tzu
Thanks guys, very helpful.
Shawn
QUOTE(Lao_Tzu @ Dec 22, 2006, 03:28 PM) *

Thanks guys, very helpful.


I'm not sure if you're being facetious because the pseudocode posted above is not very helpful without the PHP/MySQL details. Here is the actual code I am using, suitably touched up to eliminate any sensitive information. You will want to add your MySQL login info to the below script, and modify the SQL call to refer to the relevant table; and then place the code snippet in the appropriate location that deals with posting:



if ( !!stristr($_REQUEST['Post'],"href") or !!stristr($_REQUEST['Post'],"http") ){
$id=$_REQUEST['member_id'];

$conn = mysql_connect("localhost", $DB_USERNAME, $DB_PASSWORD); mysql_select_db($DB_NAME);
$sql = "SELECT posts as posts FROM members WHERE id='$id'";
$row = mysql_query($sql);

$row2=mysql_fetch_array($row);

if ($row2['posts']<=10){
$diemsg="<center><br><br><br><b>You must make more posts before being allowed to post URL's</b>";
die($diemsg);
}
}

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.


Home     |     About     |    Research     |    Forum     |    Feedback  


Copyright © BrainMeta. All rights reserved.
Terms of Use  |  Last Modified Tue Jan 17 2006 12:39 am