Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Double Register Mod
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

rasure
Junior Member

289 Posts

Posted - 17 January 2004 :  08:39:51  Show Profile  Visit rasure's Homepage
Double Register Mod
Will work with versions 3.4.03 and 3.4.04
assumes you have the email validation mod installed
(not sure if its included in snitz base code)


This mod will prevent members from registering for different accounts
once they have registered, please bear in mind as this uses cookies
and it will only let one person per pc to register, so people who
share pc`s only one will be able to register once and of course
there are ways around it, Its really just to make that a little more
difficult for troublesome members.

First of all in register.asp just after the includes put this code...

'####### Double Register Mod by Rasure #######
If strDBNTUsername<>"" Then Response.Redirect("default.asp")
If Request.Cookies("forums")("registered")= "yes" then Response.Redirect("default.asp")
'####### End Double Register Mod by Rasure #######


So it looks like this

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp"-->
<!--#include file="inc_profile.asp"-->
<%
'####### Double Register Mod by Rasure #######
If strDBNTUsername<>"" Then Response.Redirect("default.asp")
If Request.Cookies("forums")("registered")= "yes" then Response.Redirect("default.asp")
'####### End Double Register Mod by Rasure #######


Then at about line 202 find this code...

if strAuthType="db" then Response.Write(" using your new UserName and Password")

and just after that code put this code...

'####### Double Register Mod by Rasure #######
Response.Cookies ("forums").Path = strCookieURL
Response.Cookies ("forums")("registered") = "yes"
Response.Cookies ("forums").Expires = Date + 365
'####### End Double Register Mod by Rasure #######


Then find this code in 2 other places about lines 635 and 652

if strAuthType = "db" then Response.Write(" using your new UserName and Password")

and just after those code parts put in this code...

'####### Double Register Mod by Rasure #######
Response.Cookies ("forums").Path = strCookieURL
Response.Cookies ("forums")("registered") = "yes"
Response.Cookies ("forums").Expires = Date + 365
'####### End Double Register Mod by Rasure #######


And that's it, if you wish the members you have already registered
not to be able to register again then just place this code...

'####### Double Register Mod by Rasure #######
Response.Cookies ("forums").Path = strCookieURL
Response.Cookies ("forums")("registered") = "yes"
Response.Cookies ("forums").Expires = Date + 365
'####### End Double Register Mod by Rasure #######


in topic.asp after this code near the top...

%>
<!--#INCLUDE FILE="config.asp"-->
<%


So it looks like this...

%>
<!--#INCLUDE FILE="config.asp"-->
<%
'####### Double Register Mod by Rasure #######
Response.Cookies ("forums").Path = strCookieURL
Response.Cookies ("forums")("registered") = "yes"
Response.Cookies ("forums").Expires = Date + 365
'####### End Double Register Mod by Rasure #######


Only place that code in topic.asp if your forums require registration
to gain access to all forums. The topic.asp code will only work for
previously registered members if they login an view a topic, after that
they will have the cookie in place to stop them registering again.
And of course always backup your original files first.

You change the cookie values and the redirect page to suit your own needs.

If you wish to test it then you can register at my forums, but so I know who is testing from here, just use numbers in your username

Psychic & Spiritual Development Resources

Edited by - rasure on 17 January 2004 17:19:08

rasure
Junior Member

289 Posts

Posted - 17 January 2004 :  09:16:40  Show Profile  Visit rasure's Homepage
Cookie problem now fixed in above code

Psychic & Spiritual Development Resources

Edited by - rasure on 17 January 2004 15:56:05
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07