[BETA] Phoogle (Google) Map

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
bum63
Registered User
Posts: 262
Joined: Tue Oct 10, 2006 8:36 pm

Post by bum63 »

Thanks BassFace those errors gone :lol: nice job bro
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

bum63 wrote: Thanks BassFace those errors gone :lol: nice job bro

Thanks! Glad its running good again. :wink:
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Hi Guys

This is an awesome THANKS!

I got it up and working after much tinkering, except...

When you click on the link on your to find your Long, and Lat Coordinates, I get a 404 error message:

select_map.php was not found on this server.

I managed to find my coordinates and type them in and i'm out by a few streets but works ok.

Suggestions?

Here is a link to it working on our site:

http://www.ynai.com/cms/phpBB2/phoogle_map.php

Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

That link is a leftover from the google map MOD (abandoned, I think) that I based the .tpl files off of. My bad! I do need to figure out how to add that function into this new MOD. Consider it added to the 'to do' list.

I see another problem there on your site, too. Error messages and "header already sent" errors. I've seen that on my test server when a user adds an address that can't be understood or found or something. This will be a priority fix!

I'll have to look at the Google Map API and the geocoder being used in this MOD to see if there's a way to add some address error checking to avoid this happening.

That'll keep me busy tonight! :D
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

OK, to fix the errors like this:

Warning: file_get_contents(http://api.local.yahoo.com/MapsService/ ... de+l33+1zz) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/ynai/public_html/cms/phpBB2/includes/phpbb_phoogle.php on line 179

Warning: Cannot modify header information - headers already sent by (output started at /home/ynai/public_html/cms/phpBB2/includes/phpbb_phoogle.php:179) in /home/ynai/public_html/cms/lib-common.php on line 811


Please do the following:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
 includes/phpbb_phoogle.php
#
#-----[ FIND ]------------------------------------------
#
$addressData = file_get_contents($apiURL.urlencode($address));
#
#-----[ REPLACE WITH ]------------------------------------------
#
$addressData = @file_get_contents($apiURL.urlencode($address));
This will have to do until I can get a more functional solution.
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Hi Dude

Awesome, thanks...

I found the culprit and corrected the address in the mean time.

Will
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Has anyone got this working with typing in an address?

Or only with Coordinates?

I can't get it to work with typing in an address, just a blank map

Will
User avatar
bum63
Registered User
Posts: 262
Joined: Tue Oct 10, 2006 8:36 pm

Post by bum63 »

all you need is address with zip code nothing more
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

aussiewal wrote: Has anyone got this working with typing in an address?

Or only with Coordinates?

I can't get it to work with typing in an address, just a blank map

Will


Hey, my name is Will, too! 8O
Anyway, about addresses, I can't vouch for international addresses working. The geocoder is responsible for that. Currently this MOD uses yahoo's geocoder, but I've contacted the author of the phoogle class about changing the class to use google's (since it uses Google maps). All I know is it works with US addresses with good accuracy for the ones i've tested.

BTW, I looked at some of the SMF forum maps and really liked the userlist some of them had, so I'm working on adding that feature as well.
dcz
Registered User
Posts: 787
Joined: Sun Feb 13, 2005 5:37 am
Contact:

Post by dcz »

nice one ;)

We'll soon be close to a google map pack with the bbcode mod :D

++

phpBB SEO || phpBB3 SEO Premod || SEO phpBB3
GYM Sitemaps & RSS for phpBB3: GYM Sitemaps & RSS
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote:
aussiewal wrote:Has anyone got this working with typing in an address?

Or only with Coordinates?

I can't get it to work with typing in an address, just a blank map

Will


Hey, my name is Will, too! 8O
Anyway, about addresses, I can't vouch for international addresses working. The geocoder is responsible for that. Currently this MOD uses yahoo's geocoder, but I've contacted the author of the phoogle class about changing the class to use google's (since it uses Google maps). All I know is it works with US addresses with good accuracy for the ones i've tested.

BTW, I looked at some of the SMF forum maps and really liked the userlist some of them had, so I'm working on adding that feature as well.


Hey Dude

Thanks for the info..

We recently changed from SMF to PHP as we have gone done the CMS track for a number of reasons, anyways..

We were using the SMF Map on our old forum, since the change to php I have been inundated with complaints about not having a map feature.

Hopefully this will stop the abusive emails.

Unfortunatley most of our members are from the UK, and Australia, not the USA so I will just wait to see how you go with changing over to google.

I might put instructions on our site to explain how to get your coordinates, and get them to do it that way.

Thanks again

Will
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

bum63 wrote: all you need is address with zip code nothing more


Hey Dude

Thanks but I run an international association website and most of our members are outside of the USA, so the address part doesn't work.

If you type in your coordinates, it works fine.

Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

I'm working on another map page (for that "Find My Coordinates" link in the Profile page) that the user can use to zoom in on their location, then click a Submit button to transfer the coordinates back into the Profile form. Unfortunately, this is pushing me past my comfort level with Javascript. :( I've been searching the web for tutorials on how to do this, and found a few that look promising. So International users (and anyone who has trouble with the geocoder finding their address) can use this to fill out their profile fields easily.

I've completed the Userlist feature, which will have a clickable list to the right of the map with all "Mapped" users. :D
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: I'm working on another map page (for that "Find My Coordinates" link in the Profile page) that the user can use to zoom in on their location, then click a Submit button to transfer the coordinates back into the Profile form. Unfortunately, this is pushing me past my comfort level with Javascript. :( I've been searching the web for tutorials on how to do this, and found a few that look promising. So International users (and anyone who has trouble with the geocoder finding their address) can use this to fill out their profile fields easily.

I've completed the Userlist feature, which will have a clickable list to the right of the map with all "Mapped" users. :D


Hey Dude (Will)

You are awesome, if there is anything I can do t help let me know, I'm not a programmer but more of a html dude.

But I'm fast learning PHP.

Cheers from Down Under

Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

Thanks for the kind words! I've got the lat/long working! YEAH! :D Just need to add it to the admin pages (the ones I forgot about before :roll: ).

The code has gotten pretty ugly, so I'm gonna try to clean it all up before I release the update. Also, I've had to change some of the existing code, so this will not be an 'update', rather a complete new version. According to the phpbb MOD versioning system, this release will be ver 0.1.0. So unfortunately all of you who have installed the MOD will have to uninstall it, then re-install this new version.

This isn't as hard as it sounds if you have a text editor with a find function (better than WordPads, that is). You just go through the install file and paste the new code bits into the 'find' feature, and then delete it from the modded phpbb files. Delete the added files, and you are done! Remember to save your Google API Key before you delete the phoogle_map.php file!!!! 8O

So I'll release the new version in a few days, once I clean it all up again and test it for any new wierdness.
Post Reply

Return to “[2.0.x] MODs in Development”