|
#1
|
|||
|
|||
|
Version 1.4.3 spam hack - comments greatly appreciated
I'm trying out something... I've taken the idea from no-refer-spam, and applied it to index.php. I'm not sure how effective this will be, or if it's too inefficient - I'm not a PHP coder by any means...
In the "Save Comments" section, where the existing spam check code is, I moved the initial set statements for $parent_id, $name, $message, $url, $parent_name and $email so that they all appear after "$email_flag=0;". Then, all I did was add the following: Code:
// spam list
$spams = array (
"spamkeyword1",
"spamkeyword2",
);
foreach ($spams as $site) {
if (eregi($site,$parent_id) || eregi($site,$message) || eregi($site,$name) || eregi($site,$url) || eregi($site,$parent_name) || eregi($site,$email)){ die("SPAM Stopped: reason - $site");}
}
|
|
#2
|
|||
|
|||
|
the problem is that
- this should not be done in index.php but in addon - that you did in 1.4.3 - that block lists like this exist in 1.5.1 BETA already ;=) but the main problem is that blocklist should NEVER be written into the main code because of many reasons |
|
#3
|
|||
|
|||
|
Thanks for the comments! I'm just waiting for RC1 before upgrading, so that I only have to upgrade once
![]() I just figured that this would be a quick fix until then, and wanted to make sure I'm not doing anything show-stopping stupid. |
| Post Reply |
| Thread Tools | |
|
|