vBulletin Modifications

Different registration requirements for IPs?

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Discussion

Reply
 
LinkBack Thread Tools
Old 08-28-2006, 08:31 AM   #11
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Quote:
Originally Posted by deadhobo
Thanks to both of you for restarting the discussion. I was turned off the idea after asking on another vB site which basically turned out that I would need to hire a coder if I wanted it done (not going to happen).

I looked into the register template and register.php, but I can't find where the actual email verification is setup; I found this which informed me of the "$vbphrase[ip]: $post[ip]" phrase, which I think would work perfectly with an if statement... if I can just find where to put it.
No it won't, the $post array variable is for each of the postbits. If you are not in a post it's not going to work. $bbuserinfo['userid'] should work if there members but they are not yet so you actually want: $_SERVER['REMOTE_ADDR']
If you wanted to set up a range then first of all you would have to split the ip address into chunks, lets say the ip is 192.168.0.1 in a php script you need to put:
You must first be a registered member to view any code.
now $ipsplit[0] = 192
$ipsplit[1] = 168
$ipsplit[2] = 0
$ipsplit[3] = 1




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-28-2006, 11:17 AM   #12
vB Newbie
Join Date: Jul 2006
deadhobo is on a distinguished road

Default

Ok, here is what I wrote up... I'm a PHP noob, but I gave it a shot. Testing now.

You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2006, 11:27 AM   #13
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

try:
Quote:
// assign user to usergroup 3 if email needs verification
if ($vbulletin->options['verifyemail'] AND $_SERVER['REMOTE_ADDR'] != 165.161.3.12)
{
$newusergroupid = 3;
}
elseif ($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
{
$newusergroupid = 4;
}
else
{
$newusergroupid = 2;
}
i am not sure if the newusergroupid variable will work but you can try it.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-28-2006, 08:46 PM   #14
vB Newbie
Join Date: Jul 2006
deadhobo is on a distinguished road

Default

Hm... I can't get it to work... Here is the error I get:
Quote:
Parse error: syntax error, unexpected T_DNUMBER in /hsphere/local/home/register2.php on line 277




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-29-2006, 06:02 AM   #15
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

oops, try this:
Quote:
// assign user to usergroup 3 if email needs verification
if ($vbulletin->options['verifyemail'] AND $_SERVER['REMOTE_ADDR'] != '165.161.3.12')
{
$newusergroupid = 3;
}
elseif ($vbulletin->options['moderatenewmembers'] OR $vbulletin->GPC['coppauser'])
{
$newusergroupid = 4;
}
else
{
$newusergroupid = 2;
}




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-29-2006, 12:26 PM   #16
vB Newbie
Join Date: Jul 2006
deadhobo is on a distinguished road

Default

Quote:
Originally Posted by rogersnm
oops, try this:
It works

I had to add the AND to another section of code; I'll post it as a hack as soon as I can.

Thanks rogersnm




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit age registration xfile vBulletin 3.5 / 3.6 Hack Releases 8 06-24-2008 07:06 PM
New coder requirements and more gio~logist Announcements 85 08-09-2006 09:58 AM
Slim Registration Page Rex vBulletin Modification Requests 4 06-06-2006 04:29 PM
New user registration suspended. Paul Announcements 0 12-01-2004 04:12 AM


All times are GMT -3. The time now is 12:06 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)