[BETA] Antispam for all fields (updated: 10-01-2009:V1.3.1)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
3Di
Former Team Member
Posts: 13916
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by 3Di » Sat Mar 24, 2007 10:47 pm

Wicher wrote: When i put lang_antispam.php in language/lang_dutch my board goes blank (totally)

I dont use english language on that particular board.

When i replace in functions_antispam.php:

Code: Select all

if( file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_antispam.' . $phpEx) )
{
   include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_antispam.' . $phpEx);
}
else
{
   include($phpbb_root_path . 'language/lang_english/lang_antispam.' . $phpEx);
}
with:

Code: Select all

   include($phpbb_root_path . 'language/lang_dutch/lang_antispam.' . $phpEx);
It does pick the dutch language file.
The main board language is set to dutch.


That's because that inclusion should be placed in functions.php not functions_antispam.php .. I know that code.

regards
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by Wicher » Sun Mar 25, 2007 12:30 am

i know you know that code 3Di, ;-) , but i believe functions_antispam.php has an include in functions.php.
So would that not be the same as when it was in functions.php itself?

User avatar
3Di
Former Team Member
Posts: 13916
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by 3Di » Sun Mar 25, 2007 12:41 am

Wicher wrote: i know you know that code 3Di, ;-) , but i believe functions_antispam.php has an include in functions.php.
So would that not be the same as when it was in functions.php itself?


I have not yet watched the code of this but the logic of that inclusion speak books, it checks if the so named lang_file lies into the lang folders (based on the board configuration), if fails load the english one. Else none.

The following adds another check (if also the english one fails then DIE with a nice error msg)

From IP Country Flag, fell free to use and modify it to fit your needs).

Code: Select all

// lang file inclusion
if( file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_extend_ip_cf.' . $phpEx) )
{ 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_extend_ip_cf.' . $phpEx); 
} 
elseif ( file_exists($phpbb_root_path . 'language/lang_english/lang_extend_ip_cf.' . $phpEx) )
{ 
	include($phpbb_root_path . 'language/lang_english/lang_extend_ip_cf.' . $phpEx); 
}
else
{
	message_die(GENERAL_ERROR, 'Could not load the <b>IP Country Flag II</b> language file, please check your installation.', 'Problem: File missing.');
}
// end lang file inclusion
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by Wicher » Sun Mar 25, 2007 1:33 pm

This is my situation:

Board default language is set to dutch,
My personal language is set to dutch,
language/lang_english does not exist at all
language/lang_dutch/lang_antispam.php does exist

the code i mentioned in post http://www.phpbb.com/community/viewtopi ... 8#p2903738 cannot find language/lang_dutch/lang_antispam.php, instead it goes for language/lang_english/lang_antispam.php which does not exist.
So i end up with blank forumpages due to not found lang variables.

When i put language/lang_english/lang_antispam.php onto my server, all pages show up correct again.

Also when i comment the language finding code, and replace it with:
include($phpbb_root_path . 'language/lang_dutch/lang_antispam.' . $phpEx);
the file is being found as it should.

It looks like $board_config is not set at this point.

User avatar
3Di
Former Team Member
Posts: 13916
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by 3Di » Sun Mar 25, 2007 1:42 pm

try this:

° remove from functions_antispam.php the lang_ inclusion code (comment it out) and put it into functions.php, right AFTER

Code: Select all

	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
it should work this time.. despite you have english_lang or not, fails if you don't have it also in dutch_lang though.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by Wicher » Sun Mar 25, 2007 4:07 pm

That does the trick, now it dont mather if some one has the english lang dir or not.

User avatar
3Di
Former Team Member
Posts: 13916
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by 3Di » Sun Mar 25, 2007 4:26 pm

Wicher wrote: That does the trick, now it dont mather if some one has the english lang dir or not.


Yes, available also anywhere included ACP in case.

If you also add this code to yours you'll get a nice error msg in case there is not the antispam_lang anywhere available.. (Notice the brackets).

Code: Select all

else
{
   message_die(GENERAL_ERROR, 'Could not load the <b>Antispam</b> language file, please check your installation.', 'Problem: File missing.');
}
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
Wicher
Registered User
Posts: 1806
Joined: Wed May 07, 2003 10:33 pm
Location: Netherlands or Holland, your choice..
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by Wicher » Sun Mar 25, 2007 6:52 pm

Thanks for the reply's 3Di, cleared up a lot.

Think Ramon can use it to.

User avatar
3Di
Former Team Member
Posts: 13916
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by 3Di » Sun Mar 25, 2007 7:29 pm

Wicher wrote: Thanks for the reply's 3Di, cleared up a lot.

Think Ramon can use it to.


you're welcome. :)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
K2
Registered User
Posts: 56
Joined: Fri Jan 03, 2003 5:30 am
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by K2 » Thu Mar 29, 2007 6:07 am

Just wanted to say thank you Ramon for making this script. Spam registrations were slowly but surely becoming an increasingly annoying problem on my msgboard. Havent had any issues since installing this script. Myself and my users thank you.

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Re: [BETA] Antispam for all fields (updated: 07-02-2007:V1.2.5)

Post by Ramon Fincken » Thu Mar 29, 2007 9:48 am

Thank you Marco and Whicher for the new code, I'll implement it in the next version :)

K2, I'm glad it worked out just fine :D
If you have any suggestion of remark, feel free to post it over here or at www.phpbbantispam.com :D
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

upgrade 1.2.5 -> 1.2.6 18042007

Post by Ramon Fincken » Wed Apr 18, 2007 5:26 pm

:!: ** upgrade 1.2.5 -> 1.2.6 18042007
http://phpbbantispam.com/viewtopic.php?t=71
-ACP: Management-
No alterations in functions.
-ACP: Spam Database-
No alterations in functions.
-ACP: Testcenter-
No alterations in functions.
-ACP: Wordlist-
No alterations in functions.
-Core function-
No alterations in functions.
-FieldFest function-
No alterations in functions.
-Lang file-
No alterations in functions.
-Bugfixes-
* Core function: Check for remote include ( thanks to Paul ! )
-Language entries updated-
No new entries.
-Installation-
No alterations in functions.

Upgrade instructions are in the 1.2.6 zipfile
Screenshots + zipfile links are in the first post
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Re: [BETA] Antispam for all fields (updated: 18-04-2007:V1.2.6)

Post by Ramon Fincken » Wed Apr 18, 2007 5:28 pm

Please upgrade ASAP to version 1.2.6 !
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
will_hough
Former Team Member
Posts: 1952
Joined: Mon Feb 06, 2006 8:47 pm
Location: Michigan
Name: Will Hough
Contact:

Re: [BETA] Antispam for all fields (updated: 18-04-2007:V1.2.6)

Post by will_hough » Wed Apr 18, 2007 6:54 pm

Ramon Fincken wrote: Please upgrade ASAP to version 1.2.6 !

ACP / Spam Database still states that the files need to be updated after using the update text file 'upgrades/antispam_1.2.5_to_1.2.6.txt'

Code: Select all

Database version  	1.2.6
File version (hardcoded) 	1.2.5
Version info 	You need to upgrade your: antispam-files!

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 25230
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: [BETA] Antispam for all fields (updated: 18-04-2007:V1.2.6)

Post by Paul » Wed Apr 18, 2007 8:59 pm

ramon:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
common.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/functions.'.$phpEx);

#
#-----[ AFTER ADD ]-----------------------------------
#
// Ramon Fincken, antispam
// V 1.2.6
// Phpbbinstallers.net
include($phpbb_root_path . 'includes/functions_antispam.'.$phpEx);



# 
#-----[ FIND ]------------------------------------------
#
function phpbb_clean_username($username)
{

# 
#-----[ AFTER, ADD ]-----------------------------------
#
   // Ramon Fincken, antispam
   validate_spam($username,'word');
That function doesnt exists in common.php, you should add a second open :).

Also, for everyone, please update, there is a security issue in this mod prior to 1.2.6, be sure you remove the include that has been added by this mod when upgrading to 1.2.6!
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

Locked

Return to “[2.0.x] MODs in Development”