Current Location Plugin
Plugin Details:
• Current Version: 1.0
• Last Updated: 06/18/2009
• Wordpress Link (Download Here)
• Got a suggestion?
Description: The plugin uses the Google Badge System and pulls the JSON file. The plugin then parses through the json file and displays your current location. You need to have a Google Account and signed into Google Latitude on your computer/Mobile device. I’m currently using this plugin with my Blackberry World Edition phone and Google Maps on the phone.
Why: I thought it would be really cool to have my blog display my current location without my editing anything. Also I wanted to learn how to write a plugin for WordPress.
Uses: <?php display_current_location(); ?> – This will display the reverse city look up. You can pass “map” / “city” / “coords” / “accuracy” into the () like this. display_current_location(”map”,”coords”);
When you call any of them it will put a <br /> at the end of the output. So the output in the source code would look like this:
Nashville, TN, USA <br /> 3909 meters <br />
FAQ:
Q: Output says this “User ID incorrect. You entered this id: Nothing”
A: You need to visit the Current Location settings page and update the Google Badge UserID.
Q: On the settings page you see this note: “Since you are using an older version of WordPress, the timestamp output will be set to the server.”
A: All that means is your not using Wordpress 2.8, which is fine, but the new TimeZone feature in 2.8 will fix the timestamp to your local blog timezone instead of your server timezone. Example: My server is located in the EST timezone but I want my blog on the CST. This will fix the timestamps for CST not EST.
Pictures:







[...] me while I travel with my new Wordpress Plugin Current Location! Check out the “Where Am I” section on the right side of the page. Something I’ve [...]
lov it
Works great, thank you
[...] there! If you are new here, you might want to subscribe to the RSS feed for updates on this topic.Current Location von Justin D. Givens nutzt das Google Badge System um zu ermitteln wo man sich gerade befindet. Das [...]
Hmm.. not working for me. I tried putting the code into a post and my sidebar. In the sidebar, nothing shows up. In the post, it just shows the text but no map. Any help? Posted a link in the comment. kevinfairdosi[at]gmail.com
Hey Kevin, I just sent you an email to see if I can help you troubleshoot the problem.
Thanks for your help Justin. I’ve got a feature request. It’s something that I wouldn’t imagine to be too difficult, but I don’t know. It would be nice if we could display the current time in the location. So, if I’m in Australia then I could show a map with text that says “It’s 3:40pm here in Sydney.” Just a thought, don’t know if it’s possible but would love the functionality.
Hi,
I got an error after installing this plugin.
When I typed into my sidebar file I got a text: ‘Call to undefined function: json_decode()’ in index.php file on line 58. How can I fix it?
Thanks in advanced
Hey Mc44,
I sent you an email. Lets try and figure this out.
I get the same error as mc44! Fatal error: Call to undefined function: json_decode() in /nfs/…/plugins/current-location/index.php on line 58