phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Unique Registration Hash

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Security
::  
Author Message
JanoF



Joined: 30 May 2006
Posts: 43

Unique Registration HashPosted: Thu Oct 19, 2006 7:12 pm    Post subject: Unique Registration Hash

Code:
##############################################################
## MOD Title: Unique Registration Hash
## MOD Author: pentapenguin < n/a > (Jeremy Conley) http://www.pentapenguin.com
## MOD Description: This MOD changes the "agreed=true" part of the registration
## form to a unique identifier to help stop spam bots from registering.
##
## MOD Version: 0.1.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 1
## includes/usercp_register.php
##
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## Support for this MOD may be found at http://www.pentapenguin.com
## This MOD is EasyMOD friendly! (http://area51.phpbb.com/phpBB/viewforum.php?f=17)
##
##############################################################
## MOD History:
##
##   2006-08-19 - Version 0.1.0
##   - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php


#
#-----[ FIND ]------------------------------------------
#
$unhtml_specialchars_replace = array('>', '<', '"', '&');


#
#-----[ AFTER, ADD ]------------------------------------------
#

// Begin Unique Registration Hash MOD by pentapenguin (http://www.pentapenguin.com)
$registration_hash = md5($userdata['session_ip'] . $userdata['session_id']);
// End Unique Registration Hash MOD by pentapenguin


#
#-----[ FIND ]------------------------------------------
#
   global $userdata, $template, $lang


#
#-----[ IN-LINE FIND ]------------------------------------------
#
$phpEx


#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $registration_hash


#
#-----[ FIND ]------------------------------------------
#
      "U_AGREE_OVER13" => append_sid("profile.$phpEx


#
#-----[ IN-LINE FIND ]------------------------------------------
#
agreed=true


#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
agreed=$registration_hash


#
#-----[ FIND ]------------------------------------------
#
      "U_AGREE_UNDER13" => append_sid("profile.$phpEx


#
#-----[ IN-LINE FIND ]------------------------------------------
#
agreed=true


#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
agreed=$registration_hash


#
#-----[ FIND ]------------------------------------------
#
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )


#
#-----[ IN-LINE FIND ]------------------------------------------
#
!isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed'])


#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
$HTTP_POST_VARS['agreed'] != $registration_hash && $HTTP_GET_VARS['agreed'] != $registration_hash


#
#-----[ FIND ]------------------------------------------
#
   $s_hidden_fields = '<input type="hidden"


#
#-----[ IN-LINE FIND ]------------------------------------------
#
name="agreed" value="true"


#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
name="agreed" value="' . $registration_hash . '"


#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
If you have CyberAlien's eXtreme Styles MOD (http://www.phpbb.com/phpBB/viewtopic.php?t=125251), you can copy
the file in contrib/admin/xs_unique_registration_hash.cfg to admin/xs_unique_registration_hash.cfg and you will
be automatically notified if there's an update available when you use the "check for updates" function.


#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

_________________
www.pcforum.sk | www.pcforum.cz | jan.fecik.sk
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Unique Registration HashPosted: Fri Oct 20, 2006 10:09 am    Post subject: Re: Unique Registration Hash

Yes, this one is a great addition to fight against spam for phpBB forums.

In case there is an update, please check : http://www.phpbb.com/phpBB/viewtopic.php?t=430710

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
ultimatehandyman
PR2
PR2


Joined: 15 Mar 2007
Posts: 205

Unique Registration HashPosted: Mon Mar 19, 2007 6:40 pm    Post subject: Re: Unique Registration Hash

I have just installed this mod myself Wink I'm not normally any good at installing mods, but I have installed the bots online mod and this one today Shocked

Not sure if it's working or not as nothing seems to have changed, but I'll let you know if it stops the spammers Wink
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Unique Registration HashPosted: Mon Mar 19, 2007 10:56 pm    Post subject: Re: Unique Registration Hash

Good job Very Happy

This one is really easy to install really.

Make sure you try registering to make sure you did not do anything wrong that could break the registering process.

It's not the mod to have any bug, but oh well, the worst mistake we do are always the dumbest so Rolling Eyes

As a good practice, never save a backups, always do full backups (files + db, it's not big deal in this case more is better) before you apply mods, so that you can easily go back to normal if you messed up.

A local test board is wise and fun too Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
ultimatehandyman
PR2
PR2


Joined: 15 Mar 2007
Posts: 205

Unique Registration HashPosted: Mon Mar 19, 2007 11:04 pm    Post subject: Re: Unique Registration Hash

dcz wrote:
Good job Very Happy

This one is really easy to install really.

Make sure you try registering to make sure you did not do anything wrong that could break the registering process.

It's not the mod to have any bug, but oh well, the worst mistake we do are always the dumbest so Rolling Eyes

As a good practice, never save a backups, always do full backups (files + db, it's not big deal in this case more is better) before you apply mods, so that you can easily go back to normal if you messed up.

A local test board is wise and fun too Wink

++


Following your advice by PM the other day- I am going to install a test board and then I can practice Wink

As for backups, I do them regularly but I can not back up my database from the mysql side of the database as I can't seem to do it and so I always use the backup function within phpbb.

I have tried to register and it still works Wink

Thanks

chez
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Security
Page 1 of 1

Navigation Similar Topics

Jump to: