Geo Mint

GeoMint has moved! It’s now available at Google Code
Please have a look at the Readme, it contains some important information to make GeoMint work for you.

GeoMint is a spare time project and it’s free (and it will be free in the future too). Although any contribution would certainly be appreciated but is not necessary!


Geo Mint Changelog

GeoMint 0.3

[0.53 - 07.02.2007]
- Added a warning message if Secret Crush is not installed and removed the dependency from XXXStrongMint
- Fixed a bug concerning the ‘Show incomplete datasets’ option

[0.51 - 03.02.2007]
- You now don’t need to edit the display.php anymore, Shaun has integrated a hook for this.

[0.50 - 02.02.2007]
- GeoMint is now compatible with Mint 2.

[0.40 - 03.01.2007]
- You can now define the number of days for the oldest map point which should be displayed
- Fixed some SQL queries

[0.33 - 10.08.2006]
- You can now reload the map, handy if you’re switching from another tab

[0.32 - 14.07.2006]
- Fixed the annoying IE bug

[0.31 - 29.04.2006]
- Modified GeoMint to use Google’s Maps API v2
- Fixed a small display bug in the ‘Country Data’ pane

[0.30 - 15.12.2005]
- Added additional options for the data pane
- Changed some display layouts for the hostname (credits go to Geoffrey Hughes)

[0.25 - 08.12.2005]
- Added some more options (Google Maps starting point, zoom level,…)
- You can now also display Resolved Host Names (XXX Strong Mint required)
- GeoMint won’t overlay all your other peppers anymore by default
- Implemented $manifest to work better with Mint
- Some tweaks

[0.23 - 01.12.2005]
- Added cURL support. Works like a charm now.
- Fixed the GUI problems in the preferences window.
- Optimized the string manipulations, so GeoMint should be a bit faster now.

[0.21 - 30.11.2005]
- Kicked the cURL support again because it wasn’t working the way I wanted it to
- Finally fixed those annoying problems (points not visible, no data,…)

[0.2 - 29.11.2005]
- Added cURL support (cURL only, to be exact).
- Also set a timeout for HostIP.info so GeoMint won’t break Mint when the host is not available.

[0.1 - 26.11.2005]
- GeoMint is now Mint 1.2x ready. - Data-Panel is working correctly.

[0.11a - 15.11.2005]
- Fixes a bug in the install/uninstall function.

[0.1a - 12.11.2005]
- First release of GeoMint. Supports HostIP.info queries and caching.

Geo Mint FAQ

Q: Mint is slow or broken since I’ve installed your Pepper.
A: Mint isn’t actually broken, you just have to take care of your script execution times. Geo Mint queries HostIP.info for its IPs and responding coordinates. That’s because the default number of queries is set to 10 in the preferences section. If the number there is too high and the limit for your php execution time too low, Mint won’t be able to render the end of the script and seems to be broken. Go to your preferences (mint/?preferences) and change the value to a lower one.

Q: What do I need to use GeoMint?
A: Just Mint and an Google API Key.

Q: I uninstalled GeoMint but now I can’t install it anymore.
A: This was a bug in the first release, it’s fixed in version 0.11a

197 comments

Hi there, will you be updating this pepper to work with Mint v1.22?

Of course I will (as soon as I come home today).

I tried to download your plugin but it seems like the file is not on the server

I forgot do disable the dload-plugin and so there was no redirection. Should work now, sorry.

Hi,

I’m loving the Geo Mint, believe me. I’m running Mint 1.23, Geo Mint 0.2, XXX Strong Mint 2.21.

I’m just not getting any pinpoint data to pull in. Map shows up fine, but states zeroes for all three values (points, queries, local queries) on the bottom. I’m probably missing something obvious….help!

First, thank you for sharing with us ;)

I would just like to know, is the Geo Mint gathers data after it is installed or use the existing one? I aske because all I see is empty world map hehehe

Hi, me too. No data coming up even with a page hit…

I also am getting nada, nil, zip. Just a nice pretty empty map. Using Mint 1.23, XXX Strong Mint 2.21, Session tracker and Download Counter

same here a beautiful blank map.

Does your host start with ‘dream’ and end with ‘host’? Dreamhost doesn’t allow the http-protocol in fopen, I will fix this in my next release.

i’m using a virtual dedicated server from godaddy. i’ll see if that protocol is turned on.

Nope. I use Pete99.com

I updated GeoMint to choose between curl (default) and fopen. Try it now.

works like a charm. congratulations :)

Thank you for the excellent Pepper, works great :)

I’ve done some updating and editing of Geo Mint :)

I’ve added preferences for the height and width of the map and also for the starting coords and zoom level.

I’ve also added support for the table prefix if specified in the config file and updated all the necessary calls. To make it a bit cleaner, I’ve called the last part of the table created geomint rather than geo_mint. Also removed is the unsigned option for the ip field.

Finally, I’ve changed the Data view so that it groups common ips together and lists the last time it visited.

If you want me to send the class.php file to look over then just give me an email.

Thanks for a great plugin.

@Geoffrey Hughes Wow, you did everything I wanted to implement in my next release. Would be nice to send my your class.php to make it available to the public (not without mentioning you, of course).

One small addition: I won’t change the database layout to use an int(10) signed. Unsigned is the way to go because then you can use the built-in ip functionality of mysql.

About the script execution time: One can set it to a value a bit higher using the settimelimit() function. http://be.php.net/settimelimit/ for more info.

wbr

B!

But you can’t change the maxexectiontime and this is the limiting factor here in most cases.

Great pepper and thanks again for including my request!

Thank you, this pepper is starting to rock! Its kinda blowing my mind actually, zooming in using satellite view to see individual buildings, cars etc. Mental.

Thanks for the this pepper, I am new to Mint and really appreciate yours and other peoples contributions! Long live collaboration and sharing.

Power to the People!

..Tom

This is great - thanks for all your hard work!

What a great plugin!

I love the concept and the design of this pepper!

Thanks for all the appreciation I received in the last days (here and on other blogs).

…happiness leads to productivity…

Hey, I upgraded from .23 to .30 and can’t get my map to show. Hit me up on ICQ when you get a chance. Thanks Christoph.

I too would love seeing such state breakdowns as countries. Is this possible? thanks.

I’m running GeoMint (lots of fun, thanks!) with 100 points without problems. I’m afraid of trying more. Is there some sort of upper limit one shouldn’t break on a more than solid but otherwise standard hosting account?

You’re welcome. No, actually GeoMint works with fine even with a few hundred points. Once you got the data from HostIp.info, the whole thing is pretty fast. The Google-Map API will clip points which are not visible because of the position on the map and so there may be some display problems, when you move over the map. But after releasing the mouse button, everything should be fine again. :-)

Cool. Thanks. I’ll do the full Monty then. If you hear loud noises from Germany, it was my PC blowing up. :)

Yeah, I know, I’m annoying. ;) Is it actually possible to “externalize” the map with the same IP info, meaning, can I create an HTML page with a large map showing the same info that I could tie into my site instead of just having it visible in Mint?

That would be cool.

BTW: I’m at 150 points and the fuse on my PC hasn’t even been lit. ;)

Sorry, but: No, it isn’t.

Thanks for the lightening-quick answer!

First, thanks for sharing.

Quick question… As I understand it, geomint gathers its data from hostip.info and stores the information for each IP. then, if that IP visits again, it doesn’t have to retrieve it from hostip it gets it from the cache. Well, hostip is constantly updating (and can be manually updated by the public). So, does geomint ever see the updated info on any given IP or does it just keep using the wrong or incomplete data from the cache? and can you clear the cache and make geomint refresh its data?

thanks

Hi Wes,

Principally, that’s true, yes. And no, GeoMint doesn’t refresh its data. Although you can clear the database (drop all rows) and than it will start all over again to get your records (which isn’t quite true, it will only get the last n, n defined as the value you’ve entered in the preferences section under ‘Queries’.

You’re welcome.

when I switch from the data view to map view, the map is not visible, in order for it to return, i have to refresh my browser. Is this normal?

Yes, it is. That’s a bug I still couldn’t locate but I am quite sure that it is the same which makes IE crash on loading the javascript.

im completely missing it… how do i enable curl instead of fopen?

Mint does that for you. Somewhere Shaun checks if curl is available or not.

I just updated to .31 and now the map wont show, saying there’s no data for that zoom level. My zoom value is set to 15. How can I fix this?

OK, so I just reinstalled the whole thing and now it seems to work. Is there a way of forcing it into finding the info for old hits?

@Zoom-level: Google changed the order of the zoom value: 0 stands for overview, e.g. 15 for ultra-super-detail view ;-) They said it’s mainly because now they can add new zoom levels without the need of adjusting all program code.

@Old hits: You can set the amount of queries very high (500 ), view Mint and set it back again.

I just installed the plugin and configured the plugin and mint now gives me this error at the top:

MySQL Error (from Geo Mint): You have an error in your SQL syntax near ‘>Warning: mysqlpconnect() [function.mysq' at line 2. (1064) Query: INSERT INTO mintgeo (ip, country, countryabrv, city, latitude, longitude) VALUES ('-1908691667', '', '', '', >Warning: mysqlpconnect() [function.mysql-pconnect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) in /home/hostip/publichtml/lib/svnphp/dbase.php on line 12 Cannot connect to the, Warning: mysqlpconnect() [function.mysql-pconnect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) in /home/hostip/publichtml/lib/svn_php/dbase.php on line 12 Cannot connect to the database)

Any idea whats wrong?

Marcus (53),

I have the same error, which seems to be related to updating Mint to version 1.29. It’s the only other change I’ve made; Geo Mint 0.31 was working for me with Mint 1.28.

Actually, I’m wondering if it has something to do with the http://www.hostip.info/ website seeing as it’s coming up with a similar database error when I try to view the site: Warning: mysqlpconnect() [function.mysql-pconnect]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111) in /home/hostip/publichtml/lib/svn_php/dbase.php on line 12 Cannot connect to the database

I’m thinking the plugin will work as soon as the hostip site is fixed. It’s too bad there isn’t another geolocating site it could fall back on or at least suppress these errors from the mint page if this does happen. I’d rather see a “geomint not available” graphic than a long string of mysql errors! I hope this isn’t going to be an ongoing issue!

That’s a problem with hostip.info and at the moment I actually don’t know how to catch this exception. The problem is that more and more services are using hostip, sometimes they do not know how to use it or there are simple too much people using it, and so the mysql socket crashes.

Bruce, I got the same error using Mint 1.28. Mint 1.29 coincidentally came out around the same time - so it’s not Mint related.

Oh and by the way: Looks like it’s working again! Hooray!

Thanks Benedikt; I also have it working again with Mint 1.29. So you’re right, the Mint upgrade was coincidence.

Thanks for the kickin mint!

Good stuff man! Keep it up!

Great pepper. However, when accessing Mint via IE/win with Geo Mint installed and enabled, I get an error saying the operation aborted. After clicking OK, it goes to page not found.

I disabled all other peppers and added them back one by one. And Geo Mint is causing the problem. Works fine in other browsers. But my client uses IE/win.

Any thoughts?

I’m aware of this problem. IE doesn’t like linked javascripts outside the head or in the middle of the body tag. But because of the pepper API architecture I can only insert it there where it is now. Sorry.

this isnt compatable with australia

Ok folks, I’ve come up with a workaround fix/hack to get GeoMint to work in IE. There may be a better way, but with my limited JS skills, this works for now! Here’s what you do:

Open up the Geomint class.php and around line 417 after


$html_geo = "
       //some comment

Replace the following:

    <script type=\"text/javascript\">
    //<![CDATA[

with:



   <!--[if IE]>
   map{ width: {$prefs['plotWidth']}; height: {$prefs['plotHeight']}
   </style>


  <div id=\"map\"></div>
  <script type=\"text/javascript\">
  //<![CDATA[



  function showMap()
    {
    if (GBrowserIsCompatible()) {
  

Now go down to around Line 533 after:

    mysql_free_result($result_geo);

Replace the following:

$html_geo .= '//]]>\n';

with:

$html_geo .= '

        }

// display a warning if the browser was not compatible
else {
  alert("Sorry, the Google Maps API is not compatible with this browser");
}

}


//]]>\n';

Alright now the hacking part :( - In your mint installation open mint\app\paths\display\display.php

and replace

<body class="display">

with:



<body class="display" onLoad="showMap();" onUnload="GUnload()">

That should do it! Worked for me anyway. Please feel free to improve this!

Ok, since the comment system totally mucked up my code, you can view it in a readable format at http://www.writely.com/View.aspx?docid=afwh9xn26z7f_0fkc4m5

[Some code, Wordpress swallowed].

This is because changing the onload seems to break the even handler, stopping the sections being resized - adding a call to SI.Mint.sizePanes(); helps rectify that by resizing onload once again :)

There’s other ways to achieve it better, but most people will find that the easiest.

Hope this works this time.

Thanks for the great pepper :)

Streaky, I did notice that my fix was breaking the event handler, but I haven’t yet got around to trying to fix that. I’d love to see your fix ideas, can you email it to me? (marcusv [ a t ] gmail.com)

In display.php change the code in the CDATA section from

window.onload   = function() { SI.Mint.sizePanes();
SI.Mint.onloadScrolls(); };
window.onresize = function() { SI.Mint.sizePanes(); };

to

window.onload   = function() { SI.Mint.sizePanes(); SI.Mint.onloadScrolls(); showMap(); };
window.onresize = function() { SI.Mint.sizePanes();};
window.onunload = function() { GUnload(); };

I don’t seem to have a map ;-)

Everything else appears to be working OK though.. Have I missed something? I’m using the latest Pepper & version of Mint…

I just bought this plugin and I have read here and tried everything, but I cannot get the map to display. All i get is the info about the queries, working with 10 points, and the hostip.info panel. All the other ftuff works fine, but no map.

Did you alter the display.php?

No I have not altered any of the php page. I thought that only needed be done if useing IE and I don’t use IE. What changes do I need to make for this to work. Sorry, if they have already been mentioned here.

You need to perform the steps in comment #71, then GeoMint will work as expected. (Sorry for the troubles, btw)

Me neither, I just downloaded & installed..

I don’t have a display.php - there was only a class.php in your zip file…

OK, sorry - edited the file within Mint - it now works OK.. God job, love the Pepper..

thanks works now, just need to find my center point.

Hello,

I am not entirely familiar with the Pepper process, but I downloaded the file and it only contained a class.php file and a readme file. The readme file said to upload a directory called “clupprich”. Where do I find that directory? I have uploaded other peppers but their zip files included the referenced directory.

Thanks,

Kate

Kate: You might have to create the directory yourself. Every FTP-client would support this.

Just look for a button with the text “create/make directory”. If you can’t find it, search the help file or specify which client you are using and ask here.

Johan.

Mint 1.29

GeoMint 0.32

Firefox 1.5.0.5 IE 6.0

The map works great on first load, but when I click from ‘Map’ to ‘Last Visitors’ or Country Data’, then back to ‘Map’, the Map doesn’t display. No errors or anything, just no map at all. I did note that the ‘# queries from Hostip.info’ line will read 0 queries when the map doesn’t show. When I reload the whole page, it loads just fine again. The behavior is the same in both browser versions listed above.

Any thoughts?

Can you explain why Geo Mint does not render all hits to the site? I have a client who doesn’t understand why all the unique hits are not represented on the map, and I have no answer.

Great pepper by the way.

@Sam Filed under ‘Known Issues’. Once I have the time (maybe this week?) I will fix that, should be easier now with the IE fix.

@Jamin That’s because GeoMint uses the IP of the visitor to lookup the corresponding spatial data (actually it’s done via hostip.info). However, assigning cities/countries to IPs is not always that easy and so not every query yields a valid result. Hope that answers your client’s question.

First of all - awesome Pepper, keep up the great work!

I’m having the same issue as Sam (Post #83).

Thanks for all of your work on this Pepper, i sincerely appreciate it.

I wouldn’t say the problem is completely fixed but I’ve added a ‘Reload’ link at the bottom of the info panel to reload the map. See it as a workaround for the pane-switching problems.

Great Pepper ! thanks

How do I dial in the Starting Lat, Starting Lon and Zoom Value.

Im am in the US (Green Bay WI) can I use Lat: 44 N Lon 88 W ? also can I use 44.5 or 88.5 ?

And the zoom are the values 0 - 15 or 0 and 15 ?

I can’t seem to find the right mix…

You can use decimal point notation for the latitude and longitude, South and East are represented with a negative sign. Zoom levels start from 0 (earth view) to x, so the higher the number, the higher the detail.

@ Christoph

Thank you… I have the map displaying perfectly now using ( Lat -95 Lon 44 Zoom 2) that creates a nice view of North America.

®

Hey!

I downloaded your Pepper weeks ago and tried to install it, but I can’t. My problem is being discussed in the official Mint support forum. Can you look at it and tell me what I’m doing wrong? http://www.haveamint.com/forum/viewtopic.php?id=1563 Thanks!

I seem to have successfully installed the plugin, but its not locating any of my hits.

I’ve confirmed that hostip.info is able to locate the IP in my log, but GeoMint shows only “,” as the location, nothing at all in the country view, and displays no pin-points on the map. Its output reads:

Working with 0 points 0 queries from Hostip.info 0 local queries

The install instructions were very simple, so I’m not at all sure what I missed or didn’t do. :(

Gwen, You have to enter a number for the queries in the preferences section (usually something between 50 and 100, just try).

Do you plan on adding a date filter to Geomint? I still have to send a suggestion to Shaun asking to implement a global date and date-range filter mechanism that any pepper developer can leverage.

Date filtering is probably the biggest thing I find missing from many Peppers. With Geomint for instance, unless I missed it in some doc, I have no idea for what period of time the data is relevant for.

I suppose in Map view it can be said to show the last 50 or 100 visitors, but when you use the Country Data view, then what is the context for that data? The day? All time? There’s just too much ambiguity with a lot of Peppers.

Referrer Aggregator uses a date filter though it is pretty simple. it has fixed filter items for specific number of hours up to days and All Time. This pepper was a must-install because of that feature and the collapsing list.

I’ve been using mint for just over a week and had previously been using Google Analytics. Analytics wasn’t the graceful UI I wanted nor was it real-time. But it did have some nice date filtering. :)

Bruno

I’ve been enjoying your great pepper for many many months now, but I’ve just updated it to the v0.33 and now it no longer functions… doesn’t display the map at all and when I try to ‘Reload’ using the pepper’s link, Firfox 1.5.0.6 crashes. Any ideas?

Hey there,

I really like the look of this pepper - but I can’t get it to display in my preferences. You are saying to upload the /clupprich/ directory to the server but when openning the downloadable zip file I only get one file in there called class.php and am wondering if this could be the problem…

Hope you can help me out!!

Thanks veru much,

Ross

Yeah, my fault. You need to manually create the directories ‘clupprich’ and ‘GeoMint’. I’m sorry.

sorry mate - I got it sorted - the readme says to drop it into the mint/pepper/ directory - doing that didn’t work but dropping it into the mint/perpper/shauninman/ directory did……

either way it seems to be working great now :>

I have the same troubles as Mez in this comment, but in my Opera 9.01. It doesn’t display the map, and link “Reload” just reloads all page. Where can i find 0.31 version?

Does Opera have some debugging tools? Would be pretty helpful for me if you could post the error message(s). Thanks!

Same output here Sorry for spam…

I had a look at this (installed Opera 9.01) and I had no problems viewing my stats (in fact it works better than with FF). Maybe some other plugin is issuing these errors?

Just look at this fresh install of Mint 1.26 with GeoMint 0.33 (only) http://pepelsbey.net/mint/ in Client Mode. Don’t working in FF, Opera & IE.

You need to enter something for the number of queries (currently showing ‘Working with 0 points’), then it will work as expected.

My Prefs: General Settings > Queries 10…

No whitespaces in front or at the end?

Yep. All settings by default, except GMaps Key.

Just tested it on FF 1.5.0.6, IE 6.0 and Opera 8 something, worked with the first two after reloading the map (which is quite strange, no errors at all) and it didn’t with Opera. I’ll have a look at this when I’m back at home (currently sitting in the college’s library). I’m sorry for the troubles.

You did alter your display.php file as described in the readme.txt, didn’t you?

You did alter your display.php?

Oops. Done. But still nothing…

That’s because you’re missing a statement (showMap()).

Yep, sorry. It was my fault :( But look at this in Opera 9.01… (hidden map at bottom)

Well, I’m sorry, but I’m pretty glad that GeoMint works for IE at the moment and I think Mint doesn’t support Opera officially. But one workaround could be to place the GeoMint tab in the middle of the others?!

Thanks a lot ;) Do you have any ideas why 0.31 version was working fine in unsupported Opera 9.01?