Add IP2Location to Track IP (ver 0.5) -- Requesting critique on my mod package

Started by Deprecated, July 29, 2008, 05:19:38 PM

Previous topic - Next topic

Deprecated

I'm new to writing SMF mods although I'm a veteran programmer. If I told you how long you'd force me to retire! ;) I taught myself PHP early last year and now have one of the most tricked out personal vanity sites on the Internet. I just started my new SMF based forum about a week ago. Being a software developer I couldn't resist tinkering with SMF, I mean it's in PHP, right? :) I got my first custom feature working a couple days ago, and of course it's a PITA to do manual edits, so today I wrote my first mod package. From my readme file:

QuoteModification name: Add_IP2Location_to_Track_IP
Author: LH91325

IP2Location is a commercial service that provides geolocation data based upon IP address information.

http://www.ip2location.com/demo.aspx

"IP2Location™ is an award-winning solution to help you to identify visitor's geographical location ie. country, region, city, latitude, longitude, ZIP code, time zone, connection speed, ISP and domain name using a proprietary ip address lookup database and technology without invading Internet user's privacy."

Free online demonstration access is provided without registration and allows up to 20 queries per day. You may sign up for a free IP2Location Demo Account and get 200 queries per day.

This modification adds IP2Location to the list of regional whois servers on SMF's Track IP page. Their service provides the most accurate IP geolocation information I've found. Most innacuracies resolve to a town nearby the target, close enough for most purposes. On occasion the ISP has provided only general geographic information about their IP structure, so in these cases only a general location may exist, such as the name of the state or province. Nevertheless, most of the time it's pretty damned close! Even better, the service is free for people who only need a few dozen lookups per day.

I haven't tested this mod package yet because I'd rather take the time to set up a test SMF installation, since I don't want to implode my rapidly growing forum and inconvenience my members with possible down time. I expect to set up a test forum in the next few days, but perhaps in the mean time some of you might have a look over what I've done and tell me what you think.

The code has been tested by manual edits, but the mod package has not been tested at all! I don't expect anybody to actually install it, but please tell me if I'm getting near the quality level and comprehensiveness that the SMF developers desire from mod package developers. I'll appreciate any errors you can point out or suggestions for improvement.

Thanks! :)



Edit: deleted obsolete version attachment

Deprecated

Okay, thanks for the huge response!!! ;) ;) ;)

I got my test forum set up, installed my mod, uninstalled it, installed it, uninstalled it, installed it, looked at the modified files, uninstalled it, checked to see the files were restored... Well you get it.

I'm using this mod on my live forum now and so far it hasn't killed any of my members... yet. ;)

So now I'm asking for feedback as far as package style, content or functionality. It's certainly good enough to install/remove on a test system. My test system survived, and my production forum survived. I'm running it now live and have had no problems.

Now I know this isn't a major mod, but it is kind of useful, and it's my first mod package, so I hope I can get some kind of feedback. Unless I get any negative response I plan to submit it for official blessing.

If you want to check out the service the mod adds, just visit the IP 2 Location Demo and check them out before you install the mod. If you like it, back up your files and try the mod.

It modifies only two files: $sourcedir/Profile-View.php and $languagedir/Profile.english.php. There are no settings or added files. Here's the readme.txt:

QuoteModification name: Add_IP2Location_to_Track_IP
Author: Deprecated

Version: 0.5 (beta)
Date: 2008-07-31

Compatibility: SMF 2.0 Beta 3.1 or later


IP2Location is a commercial service that provides geolocation data based upon IP addresses.

http://www.ip2location.com/demo.aspx

"IP2Location™ is an award-winning solution to help you to identify visitor's geographical location i.e. country, region, city, latitude, longitude, ZIP code, time zone, connection speed, ISP and domain name using a proprietary IP address lookup database and technology without invading Internet user's privacy."

Free online demonstration access is provided without registration and allows up to 20 queries per day. You may sign up for a free IP2Location Demo Account and get 200 queries per day.

This modification adds IP2Location to the list of regional whois servers on SMF's Track IP page. Their service provides the most accurate IP geolocation information that I've found. Most innacuracies resolve to a town nearby the target, close enough for most purposes. On occasion the ISP has provided only general geographic information about their IP structure, so in these cases only a general location may exist, such as the name of the state, province or country. Nevertheless, most of the time it's pretty damned close! Even better, the service is free for people who only need a modest number of lookups per day.

I've attached the ZIP if anybody wants to either review it or trial it, you pick. I'll appreciate any feedback before my submission. Again, I realize this mod isn't earth shattering, but it's not bad for a small mod and adds a very handy feature for tracking users.

TIA! :)

Deprecated

Jeez, I must have been overworked and underpaid when I made the post above, because I forgot to attach the latest version of Add_IP2Location_to_Track_IP.

Oh well, it's okay. I think I'll be writing some more significant SMF mods in the future, and decided to get myself a "kewl" name and avatar to fit in with the rest of the kewl dudez and dudettes here on the forum. ;)

So this is the package that I expect to submit for official SMF mod status on the mod site.


Underpaid? Hell, I'm not getting paid anything anywhere...  :'(

Nathaniel

Well, I'm sorry that I didn't notice this thread earlier, but I did a test of your mod and had a look over the source code.

Its very simple but it works perfectly. I actually prefer the www.ip2location.com display to the normal whereis one, because it gives you more useful information, and there is no ambiguity as to which database you have to use... ;D

Anyway, hopefully it will be accepted quickly and you can make some more mods. :D
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Deprecated

Thank you so much LHVWB for having a look. Yeah, I too prefer the display on IP2Location's top page, but that applies only to the IP used to access the page. I think pretty much most of us already know where we are. ;)

My mod links to their Demo page, and that's the only page that allows you to do lookups on other IP numbers. I'm just glad they provided the feature that you can suffix the IP address to their site URL i.e. www.ip2location.com/xxx.xxx.xxx.xxx or it would have not been possible to make my mod work.

I've been using their site for years to track users on forums I've moderated or administered, and they have been very helpful in finding more about my users and especially about my troublesome users. There's nothing like knowing where they live! :D If only there were an IP2RealName.com site. ;)

I'm not too concerned about how long it will take for my mod to be approved, IF it is approved, because I'm done with it. I've already designed the concept for my next mod--shhhh!!! it's a secret--and I know how to implement it, so it's just a matter of writing the code and debugging it. I've already started and I'm not going to wait on this current mod to be accepted or rejected or laughed at and ridiculed. :)

So thanks again, and anybody else if you have a test board and are willing to try my mod I'll appreciate it. It modifies only two files (Profile-View.php and Profile.english.php) so the worst that can happen you just FTP your old files back and post a nasty reply for me. :)

I'm interested in feedback on my format too. I read all the guidelines and think I pretty much got them all, and have a lot of pride about doing the best possible job when I write code, and I always aim to make my work perfect. Even the littlest, most nit picking criticisms will be appreciated.

I'll wait a bit and if nothing heard, or nothing negative heard (in this topic) I'll go ahead and submit my mod. Thank you all!

HR


I can explain this as simply as possible.. If I do it & implement I guarantee it.
If I do it and you implement it its a crap shoot.

Advertisement: