News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Ip to Country

Started by SONSiVRi, October 06, 2008, 09:39:46 PM

Previous topic - Next topic

SONSiVRi

Link to Mod

Brief:

  • With this mod you will be able to view country names related to IP you are viewing.
    Normally you should manually check whois-server.
  • Mod is useful only for Administrators (One who can view IPs).
  • Country information of IPs will be included in these places:

    • Posts
    • Track IP
    • Track User
  • 2 letter based country code (GB, IR, CA...) printed in parenthesis next to IP if matches in database (either -- printed).
  • Full name of country popups while you hover the IP.
  • Keep in mind; Mod uses lookup database, so it may doesn't give you exact results (most of times does).

Version Info:

  • Its only working with smf 1.1.x versions.

How To Install:

  • There are two types of installer exist, automated and manual. Difference is laying on IP database installation mechanism. Try automated version first (click install in Package Manager, that's it), if you get 500 internal server error (execution timeout) then use manual version.
  • Here is how to install manual way;

    • Download Ip_to_Country_1.x_manual_package.zip and extract its content according this list;

      • ip-to-country-i.php and ip-to-country.csv into your SMF's main directory (where index.php located).
      • Ip_to_Country_1.x.zip) into your packages folder.
    • After you uploaded those files then you can point ip-to-country-i.php from URL address.
      ie: http://www.site.com/forum/ip-to-country-i.php (bold is your smf's address)
    • When import process is done page says: "It is done. 86392 rows added in total." (86392 depends how many records in IP database)
    • Delete ip-to-country-i.php and ip-to-country.csv against any security hole after your installation is done.
    • Then begin the setup process within admin panel (Package Manager) as always you do.
  • Manually edit your Display.template.php and Profile.template.php if you use custom theme
    (You wont have these files most of custom themes, if so nothing needs change).
    If you have any of these files, use Manual Install Instructions for SMF listbox in the mod download page to manual edit.

How To Upgrade:

  • 1.0 to 1.3 - Just install upgrade package (Ip_to_Country_1.2_to_1.3.zip)
  • 1.2 to 1.3 - Just install upgrade package (Ip_to_Country_1.2_to_1.3.zip)

How To Uninstall:

  • If you installed automated version, use same method as you uninstalling other mods. Nothing special.
  • But if you installed manual version, its time to hard work;

    • Uninstal mod using Package Manager and then you can safely uninstall IP database (mod is first, then ip database).
    • Download Ip_to_Country_1.x_manual_package.zip and extract ip-to-country-u.php into your SMF's main directory (where index.php located).
    • Point ip-to-country-u.php from URL address.
      ie: http://www.site.com/forum/ip-to-country-u.php (bold is your smf's address)
    • Page says: "It is done. IP table dropped."
    • Then delete ip-to-country-u.php and be sure there are no ip-to-country-i.php and ip-to-country.csv either.
Copyright Info:

  • "This script uses the IP-to-Country Database
    provided by WebHosting.Info (http://www.webhosting.info),
    available from http://ip-to-country.webhosting.info."

Version History:

  • v1.3 (04-12-2008)

    • Country information added onto profile summary page besides of last used IP.
  • v1.2 (11-11-2008)

    • There is no major change. Only automated installer included.
  • v1.1 (07-10-2008)

    • Bug fixed in IP Database Installer.
  • v1.0 (05-10-2008)

    • Initial release.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Sakae

Oh, man.

I WAS excited to experiment this mod.

Then I read the instructions.
http://www.tigrelog.com.br
l: simple p: machines

Broc Lee

Cool Program but I have a question....

The latest database has 86,391 rows, however, the program only installs 10,020 lines then redirects back to the index of the forum.

I tried to bump up the line: $processed = 10000;  to $processed = 100000; Bubt still only getting the 10,020 lines from the CVS file.

Any idea what to do to correct this? 

The install of the actual mod was flawless... no manual edits. 

Running SMF 1.1.6 on a windows machine.

Thaks

Broc Lee

Ok, bumped the number to 25,000....

It still redirects to the home page of the forum, but if I run:

ip-to-country-i.php?step=25000 and hit enter, it will do the next 25k,
ip-to-country-i.php?step=50000
ip-to-country-i.php?step=75000
and so on until the database is done.

Just thought you should know. 

Thanks for the mod.... it's pretty cool!!!

SONSiVRi

"Broc Lee"
Thanks for your info. I had doubt about "redirect" while developing this mod. But now I hope it resolved. I changed the function.
Btw $processed is now working also.
Would you try and report it?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

synicfan

GOLLY-GEE, GOSH DARNIT...
I do believe these instructions are too complex for Joe SixPack.

I like to keep it simple for the people.

SONSiVRi

"synicfan"
Thats what I did, I thought Joe SixPack and I wrote step by step.
But it seems I took long way.
Still, I took as a compliment.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Sudhakar Arjunan

Hi SONSiVRi,

Its working perfectly.
Clearly installed as per instructions given. And working good.

But i found the mod is not added in Who's online page and lots of pages too.

Thanks for this excellent mod.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

SONSiVRi

Yeah I didnt hit those pages, cuz its better smf keep clean as much as we can.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Broc Lee

Quote from: SONSiVRi on October 07, 2008, 09:07:26 AM
"Broc Lee"
Thanks for your info. I had doubt about "redirect" while developing this mod. But now I hope it resolved. I changed the function.
Btw $processed is now working also.
Would you try and report it?
Yeah, I can do that....  although I have a real tough week ahead.  I have some re-programming to do on my main site (thrillcycle.com)....  As it grows, I notice things that could be better, and I have a bikini bike wash on the 18th that I am getting ready for.  Time is rough for me at this time.... I will download the new package and see what I can do.

I like the mod.... It's nice to see where people are coming from.

SONSiVRi

Quote from: Broc Lee on October 11, 2008, 01:25:18 AM
Quote from: SONSiVRi on October 07, 2008, 09:07:26 AM
"Broc Lee"
Thanks for your info. I had doubt about "redirect" while developing this mod. But now I hope it resolved. I changed the function.
Btw $processed is now working also.
Would you try and report it?
Yeah, I can do that....  although I have a real tough week ahead.  I have some re-programming to do on my main site (thrillcycle.com)....  As it grows, I notice things that could be better, and I have a bikini bike wash on the 18th that I am getting ready for.  Time is rough for me at this time.... I will download the new package and see what I can do.

I like the mod.... It's nice to see where people are coming from.

Take your time, I await your test.
Good luck with that show ;)
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

PLAYBOY

Really good and useful mod. However i wish that it showed the city too. :)

stonki

it would be great if this mod would also work for standard users, which cannot see the IP Address.

SONSiVRi

Quote from: stonki on November 10, 2008, 01:01:50 PM
it would be great if this mod would also work for standard users, which cannot see the IP Address.

Its not good idea to reveal users IP to public. But if you insist, you can use my "IP View Permission" mod and grant "registered users" group with this mod. Then every registered member can see each others IP and country.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

SONSiVRi

Automated installer has released and also 1.1.7 compatibility.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

stonki

Quote from: SONSiVRi on November 10, 2008, 01:22:57 PM
Quote from: stonki on November 10, 2008, 01:01:50 PM
it would be great if this mod would also work for standard users, which cannot see the IP Address.

Its not good idea to reveal users IP to public. But if you insist, you can use my "IP View Permission" mod and grant "registered users" group with this mod. Then every registered member can see each others IP and country.

well, the registered users should only see the country, not the IP.

SONSiVRi

Quote from: stonki on December 04, 2008, 06:13:21 AM
well, the registered users should only see the country, not the IP.

As I said above "Its not good idea to reveal users IP to public". And for the country info, I dunno why you want to show it everyone. It should be only administration purposes.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

SONSiVRi

Version updated to 1.3.
It's only addition of "Country information added onto profile summary page besides of last used IP".
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

villasg

I try to install in 1.1.7
Test OK

but i take this in install

Fatal error: Cannot redeclare ssi_shutdown() (previously declared in /xxx/xxx/xxxx/forum/SSI.php:193) in /home/thai.gr/www/forum/SSI.php on line 195

line 195 = }

SONSiVRi

Which file you used for installation?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Advertisement: