[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.
cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] Phoogle (Google) Map

Post by cavallino »

Hello BassFace,
this message is not about any bugs/mistake...
Since installing your mod, I noticed that everytime I go to edit my profile, to change or modify any options, my map location changes most of the times. This happens because I am too much used to the scroll mouse wheel.... (I believe many people use this to scroll down a page, its somehow automatic :)) so you can understand that when I scroll down the profile page... the maps zoom in and out by itself... causing this little issue.
So, Is there any way you can implement to block or prevent the zoom or map movings by using the scroll mouse wheel ?? For example... is it possible to allow modifications of the location in the map, by first clicking over it ?

Also... you gave up about the distance calculation snippet? :)

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

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

cavallino wrote:Hello BassFace,
this message is not about any bugs/mistake...
Since installing your mod, I noticed that everytime I go to edit my profile, to change or modify any options, my map location changes most of the times. This happens because I am too much used to the scroll mouse wheel.... (I believe many people use this to scroll down a page, its somehow automatic :)) so you can understand that when I scroll down the profile page... the maps zoom in and out by itself... causing this little issue.
So, Is there any way you can implement to block or prevent the zoom or map movings by using the scroll mouse wheel ?? For example... is it possible to allow modifications of the location in the map, by first clicking over it ?

Also... you gave up about the distance calculation snippet? :)

Thanks!
To Disable the mousewheel zoom:
Open includes/phpbb_phoogle_class.php
replace:
map.enableScrollWheelZoom();";
with:
// map.enableScrollWheelZoom();";

I'm afraid I have given up adding additional features to this mod. :( Another project I'm involved with has taken priority as it may turn into a source of income :D.

I will try to provide support, and help as needed for anyone wishing to extend the mod further. At some time soon (I hope) I will package it up and submit this latest version for MODDB approval. :D
volvomad
Registered User
Posts: 48
Joined: Fri May 04, 2007 7:44 pm

Re: [BETA] Phoogle (Google) Map

Post by volvomad »

Deleted - common sense prevails!!
volvomad
Registered User
Posts: 48
Joined: Fri May 04, 2007 7:44 pm

Re: [BETA] Phoogle (Google) Map

Post by volvomad »

Just to bug a little - is there a way I can add an event location to the map (with a link to the topic) without making another member especially for that purpose?
User avatar
gsgsd
Registered User
Posts: 31
Joined: Sat Sep 16, 2006 6:33 pm
Location: France

Re: [BETA] Phoogle (Google) Map

Post by gsgsd »

I am against mods for phpbb3 (for several reason) but this mod is cool and useful. :P :P :P
I'm french and i'm sorry for my bad level language in english but i try to improve me.

phpBB-fr=>phpBB.com
(No support without form with a forum link valid)
volvomad
Registered User
Posts: 48
Joined: Fri May 04, 2007 7:44 pm

Re: [BETA] Phoogle (Google) Map

Post by volvomad »

gsgsd wrote:I am against mods for phpbb3 (for several reason)
I have this running on 2.0.22
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

volvomad wrote:Just to bug a little - is there a way I can add an event location to the map (with a link to the topic) without making another member especially for that purpose?
Yes, you can hack into phoogle_map.php and add it like this:


FIND

Code: Select all

// Everything below is used for both maps.
BEFORE, ADD

Code: Select all

// Add a special marker
$link_to_post = "http://yoursite.com/viewtopic.php?t=1&start=0";
$special_tab[1] = "<div class='phoogleComment'>This is Your Special Event's Description</div><div><a href='$link_to_post' target='blank'>Link</a></div>";
$myMap->addGeoPointTabbed("45,0", "9", $special_tab, "Special Event Title", "user");
Put the link to your post in place of the $link_to_post value (keep the double-quotes).
Put the description of the Event in the $special_tab[1] value (you can see where to change), and change the word Link if you'd like.
In the $myMap->addGeoPointTabbed line, the first value is the lat/long of the marker, the 2nd value is the marker icon number to use, the third is where you can change the Title, and leave "user" alone.

This was BRIEFLY tested on my test server, so use at your own risk. On the good side, it'll be easy to erase if it breaks something! :D
Paul99Ev
Registered User
Posts: 33
Joined: Sat Jan 27, 2007 3:07 pm

Re: [BETA] Phoogle (Google) Map

Post by Paul99Ev »

BassFace wrote:
volvomad wrote:Just to bug a little - is there a way I can add an event location to the map (with a link to the topic) without making another member especially for that purpose?
Yes, you can hack into phoogle_map.php and add it like this:


FIND

Code: Select all

// Everything below is used for both maps.
BEFORE, ADD

Code: Select all

// Add a special marker
$link_to_post = "http://yoursite.com/viewtopic.php?t=1&start=0";
$special_tab[1] = "<div class='phoogleComment'>This is Your Special Event's Description</div><div><a href='$link_to_post' target='blank'>Link</a></div>";
$myMap->addGeoPointTabbed("45,0", "9", $special_tab, "Special Event Title", "user");
Put the link to your post in place of the $link_to_post value (keep the double-quotes).
Put the description of the Event in the $special_tab[1] value (you can see where to change), and change the word Link if you'd like.
In the $myMap->addGeoPointTabbed line, the first value is the lat/long of the marker, the 2nd value is the marker icon number to use, the third is where you can change the Title, and leave "user" alone.

This was BRIEFLY tested on my test server, so use at your own risk. On the good side, it'll be easy to erase if it breaks something! :D
Is there any way to link to these custom events? easy to do for users by replacing the # with the relevant User id in the following:
http://www.mysite.com/forum/phooglemap.php?u=#
That link takes you to a zoomed in map with that user in,

I'm trying to figure out some way to do the same for the cutom events or even just a plain location (via co-ordinates), but not sure its even possible, Any ideas?

BTW, having read over the 40+ pages in this thread its clear you have put a hell of alot of work into it, so its fitting the end result really is a really excellent mod, Thankyou :D
cavallino
Registered User
Posts: 317
Joined: Thu Aug 04, 2005 7:06 am

Re: [BETA] Phoogle (Google) Map

Post by cavallino »

BassFace wrote:I'm afraid I have given up adding additional features to this mod. :( Another project I'm involved with has taken priority as it may turn into a source of income :D.
hey Bass,
thanks for your reply and the snippet about the mouse scroller!
anyway, it's really a shame to know that you are not making anymore additions to this already wonderful mod... the profile distance calculation between members would be just the cherry on top! But I dont wanna push... :mrgreen: maybe someday, when you will have more time again.... hmmm maybe before christmas! We are all more good at christmas time :D
Cp299
Registered User
Posts: 99
Joined: Thu Jul 17, 2003 12:21 am

Re: [BETA] Phoogle (Google) Map

Post by Cp299 »

Hey Bass, first let me say this is an excellent mod! My users and I love it. It's really increased the sense of community amongst us.

I'd like to know if you have coded an option that allows the user to find their location (with a search box) by name or postcode? I'm based in the UK. I have read through the first dozen or so pages and know that you changed to the Google geocoder, which should allow this, but when I type it in the long/lat box I get nothing. I know this is available in Google Earth so assume it must be availble somehow?

Many thanks again for this incredible modification. I'll be looking out for more of yours.
Cp299
Registered User
Posts: 99
Joined: Thu Jul 17, 2003 12:21 am

Re: [BETA] Phoogle (Google) Map

Post by Cp299 »

One more thing, Bass or PHP gurus! When I edit a users account via the ACP I now get this error message. Can you tell me where I am missing a parenthesis?
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_override_inbox_limit = NULL, user_override_sentbox_limit = NULL, user_overr' at line 2
My code:

Code: Select all

$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . ", user_phoogle_map_center='" . str_replace($parens,"", $map_center) . "', user_phoogle_comment='" . str_replace("\'", "''", $phoocomm) . "', user_phoogle_icon='" . intval($phooicon) . "', user_phoogle_allow='" . intval($phoogle_allow) . "', user_phoogle_show_me='" . intval($show_me) . "' user_override_inbox_limit = $user_override_inbox, user_override_sentbox_limit = $user_override_sentbox, user_override_savebox_limit = $user_override_savebox
				WHERE user_id = $user_id";
I think it's something to do with the order in which I placed the phoogle code there, as I had to still include my "user_override_" code which is another mod I run. If anyone can help I will be eternally grateful!
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Cp299 wrote:One more thing, Bass or PHP gurus! When I edit a users account via the ACP I now get this error message. Can you tell me where I am missing a parenthesis?
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'user_override_inbox_limit = NULL, user_override_sentbox_limit = NULL, user_overr' at line 2
My code:

Code: Select all

$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . ", user_phoogle_map_center='" . str_replace($parens,"", $map_center) . "', user_phoogle_comment='" . str_replace("\'", "''", $phoocomm) . "', user_phoogle_icon='" . intval($phooicon) . "', user_phoogle_allow='" . intval($phoogle_allow) . "', user_phoogle_show_me='" . intval($show_me) . "' user_override_inbox_limit = $user_override_inbox, user_override_sentbox_limit = $user_override_sentbox, user_override_savebox_limit = $user_override_savebox
				WHERE user_id = $user_id";
I think it's something to do with the order in which I placed the phoogle code there, as I had to still include my "user_override_" code which is another mod I run. If anyone can help I will be eternally grateful!
Looks to me like there's a comma missing after this bit here, cuz you have more query code after it from the other mod:

Code: Select all

user_phoogle_show_me='" . intval($show_me) . "'
should be

Code: Select all

user_phoogle_show_me='" . intval($show_me) . "',
Hope that fixes it for ya! :D
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Re: [BETA] Phoogle (Google) Map

Post by BassFace »

Cp299 wrote:Hey Bass, first let me say this is an excellent mod! My users and I love it. It's really increased the sense of community amongst us.

I'd like to know if you have coded an option that allows the user to find their location (with a search box) by name or postcode? I'm based in the UK. I have read through the first dozen or so pages and know that you changed to the Google geocoder, which should allow this, but when I type it in the long/lat box I get nothing. I know this is available in Google Earth so assume it must be availble somehow?

Many thanks again for this incredible modification. I'll be looking out for more of yours.
Once I get some time, I may revisit the geocoding bit, but at this point there is no geocoding in the mod. In v0.0.1 I was using Yahoo's, since Google's wasn't out yet, and it just was so unreliable, mostly for non-US addresses. Google's geocoding support has improved since then, so I may look at bringing it back in - but now is not a good time. :D
Cp299
Registered User
Posts: 99
Joined: Thu Jul 17, 2003 12:21 am

Re: [BETA] Phoogle (Google) Map

Post by Cp299 »

Thanks for the reply!

If you need support with testing going forward I'd be more than happy to help. It's a great modification and compliments my site's ethos very significantly. I hope you keep going with it! Let me know if I can do anything for you?
antisa33
Registered User
Posts: 21
Joined: Thu Jun 29, 2006 12:07 pm

Re: [BETA] Phoogle (Google) Map

Post by antisa33 »

I have setup this great mod thanks a lot !
In my subscription form, i have the "CP" (number of the town) (postal code).
Dont you think the user could be automaticaly positionned on the map with this variable instead of doing it himself?
Thanks a lot for all!!
All is working for me
Post Reply

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