![]() |
Auto-Detect User Location At Registration
Simple hack making use of the Directi Ip-to-Country Database (included).
What it does Auto-detects which country user is from and auto-fills the location field on the registration form using their IP Address. Installing Import the 'ip2country' table attached into your forums database. Either use phpMyAdmin or from ssh. (Make sure your mysql max_packet size is large enough to handle the ~2 Mb file -- otherwise try downloading this split table here) Open up register.php and look for: PHP Code:
PHP Code:
|
Cool! 8-)
Moving servers right now, but I will install this when I am done. :) |
Doesn't work here... Nothing changes at all...
|
didn't work for me on vbulletin 2.3
|
Maybe that is because phpMyAdmin doesn't support files as large as this...?
|
It does, the queries worked eventually. Took a while though. The problem is it's just not working, don't know the reason why though...
|
That sucks. I'll have to keep checking back then. Cause I hate when people leave there Location empty and then it shows up blank in the postbit.
|
Apologies. There are many modifications on my boards, which is why it isn't working on others.
I've installed a vanilla version, and modified the instructions to reflect normal installations. So please try those now :) Also make sure that your mysql max_packet variable is large enough to handle a 2MB file. I would personally recommend importing the table via ssh. |
Great idea but you really need to make the query into a few smaller ones for those of us that don't have SSH. ;)
|
Have you tried importing it from phpMyAdmin? It may be large, but its not impossible.
|
All times are GMT. The time now is 12:34 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|