Groudspeak offers a statistics (statbar) image, showing your username and the number of caches you have found and hidden. However, cutomisation of this image is very limited. You can choose between “signal the frog” and the geocaching.com logo and you can add a small text below your stats, but further than that, nothing more can be changed.
So I decided to write a little PHP script which grabs the original statbar image from geocaching.com and even saves resources, as it does so, only once a day. It changes the logo and some of the text and creates a new image. The only thing that is not changed, is the line showing the number of finds and hides. As PHP does not have any usable OCR capability it's near to impossible to modify the look of this line in the statbar.
Here the zip file to download. It includes the PHP script, a blank background image (change it to your liking) and a samle free font. newstatbar.zip
Log into your geocaching.com account. In the menu click on "Your Profile" and select "Quick View". On the right click on the geocaching.com statbar. In your browser address bar in your browser you will see a URL ending with guid=5fexxxx84-7xx2-4x03-b141-cexxxxxd9. Copy that long number with the dashes. That's your UID.
The original statbar image from geocaching.com is only downloaded once a day. This saves your resources and those of geocaching.com. You can reduce this time, but I don't recommend doing so. The new image that will be created is also a PNG. You could change it to JPG or GIF, but I would recomment staying with PNG, as this is the format of the original image too and it's easier to get good transparency. Make sure to set the font name exactly as it is, e.g. if it's capitalized, enter it that way into the script.
After unpacking the downloaded zip file, edit the newstatbar.php with a text editor and enter your personal UID. Upload the folder newstatbar to your webserver. You may have to chmod the folder to 777. You can call the new statbar in your browser like this: http://mysite.com/newstatbar/newstatbar.php. This is also the URL you would include in an image tag in your html code.
A service from Ranger Fox allows you to customize the geocaching.com statbar, but unfortunately it does not give you full control. It's an alternative if you don't have your own web space or your site does not have PHP. You can request to include you own logo or image on the site, but I didn't fancy having our logo selectable for anyone using that service.
Another alternative, just discovered today (22.09.2011) is the service from Gummiseele. Different to Ranger Fox you can change the logo to what ever you want, and this image can be hosted on your own server or where ever you want. He also provides Top-Cacher statbars for various cities in Germany. Well worth a look.
0 Kommentare