News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Google Member Map

Started by Spuds, December 12, 2007, 01:49:12 PM

Previous topic - Next topic

jdvarner


brianjw

@jdvarner:

Now apply the mod through the package manager if you haven't already even with the ModSettings.php error. After it is installed successfully, upload the attached file and overwrite the existing ModSettings.php in /Sources/ with it.

jdvarner

okay. i got it loaded. it had me register with google.com to create my own key for my site? now what? right now i have a blank member map and annoying error, saying that the map is already registered.

brianjw

Well you have to enter the google pin in the admin features and options for google member map. Make sure while entering the url for getting the pin you typed it in as "http://www.myforum.com/smf" <-- no back slash "/" and in this example, the smf is in the directory smf<--
Yeah, you do have to register on google.com. That is why lesser people use the mod then when you didn't have to register.

jdvarner

duh. never mind.

damn i fell dumb right about now. :)

Skhilled

Hi brian,

I've been getting these same 4 errors whenever clicking the link to Google Maps. The link works and there are no other problems. Using smf 1.1.4 and the default theme. I've checked all of the edits and they are in place. Any ideas or am I missing something?

Quote
http://tink-fun.com/index.php?action=googlemap;sa=.js
Apply Filter: Only show the errors with the same message
8: Undefined index: googleSidebar
File: /home/tinkfunc/public_html/Sources/GoogleMap.php
Line: 111

http://tink-fun.com/index.php?action=googlemap;sa=.js
Apply Filter: Only show the errors with the same message
8: Undefined index: googleSidebar
File: /home/tinkfunc/public_html/Sources/GoogleMap.php
Line: 108

http://tink-fun.com/index.php?action=googlemap
Apply Filter: Only show the errors with the same message
8: Undefined index: googleSidebar
File: /home/tinkfunc/public_html/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 62

http://tink-fun.com/index.php?action=googlemap
Apply Filter: Only show the errors with the same message
8: Undefined index: googleSidebar
File: /home/tinkfunc/public_html/Themes/default/GoogleMap.template.php (map sub template - eval?)
Line: 57

Mods installed:

TinyPortal                                               0.983
Member Awards                                               1.0.2
Member Color Link                                               2.1.0
SMFShop                                               3.0
SMF Gallery Lite                                               1.8.1.2
MCLegendII                                               1.1
FlashChat Integration                                               1.0
Users Online Today Mod                                               1.4.0
E-Arcade                                               2.5.0
Country Flags                                               1.0.3

brianjw

Skhilled, it is a known bug. I am still working to fix it. A fix was made in this topic but I am trying to improve it so it is clearly read in the administration panel.

Skhilled

Oh sorry, Brian. I must have missed it. Thanks. :)

SgtMic

When you release this for 2.0 xxx rc (or a final version :)) will members need to reenter their locations? Or will the new version pick up on that table?
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

brianjw

Quote from: SgtMic on April 14, 2008, 02:40:28 PM
When you release this for 2.0 xxx rc (or a final version :)) will members need to reenter their locations? Or will the new version pick up on that table?
The tables shouldn't change. If it does, I hope to create some kind of script to transfer. I know for large websites, it would be a pain for members to have to re-enter their location again. I am working on a way.

SgtMic

Quote from: brianjw on April 14, 2008, 04:16:25 PM
Quote from: SgtMic on April 14, 2008, 02:40:28 PM
When you release this for 2.0 xxx rc (or a final version :)) will members need to reenter their locations? Or will the new version pick up on that table?
The tables shouldn't change. If it does, I hope to create some kind of script to transfer. I know for large websites, it would be a pain for members to have to re-enter their location again. I am working on a way.

Nice. On one of my sites, there are over 300 members with pins on the map. :)
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

Basie

My site has a portal.

So the main page is www.mysite.com and the forum is www.mysite.com/forum

So which of those URL's do I use when I sign up with google?

brianjw

You would use http://www.mysite.com/forum

NOTE: There must be a http:// before the url, there must be NO / (slash) after the word forum. So basically you are linking to your forum.

2Ntense

ahem... Modifications.english.php should have been

$txt['googleMappinned'] = 'Pinned Members';
$txt['googleMapGreenPinGD'] = 'Someone\'s Pin';


Members is neither possessive nor a contraction.
Someone's IS possessive.

http://en.wikipedia.org/wiki/Apostrophe  :P


brianjw

LOL 2Ntense, it doesn't go with it if it is Someone's Pin, maybe if I do "Member Pins" (i know that is correct grammar lol. ;)

QUICK UPDATE
0.2 is well on the way. 0.2 will have new language files (GoogleMap.<LANGUAGE>.php, possibly others)
New features for SMF 1.1.4
- Language Files (GoogleMap.<language>.php (which were formerly located in Modifications.<language>.php))
- Removal of annoying features (Map sliding frame in bottom right (many requests were how to remove it, this will be removed in this version))
- Several bug fixes.

Will work with SMF 2.0 versions in 0.2
- All changes above in SMF 1.1.4 will be made to the compatible version with SMF 2.0.

Please understand, we have added that we aren't going to update the Google Map mod until SMF 2.0 was in final or RC's and have put it there to give us open time to give full effort into the mod. It may very well be released sooner then when the final versions or RC versons do come out. This is unknown as of yet.

SgtMic

Quote from: brianjw on April 20, 2008, 06:28:12 PM
Will work with SMF 2.0 versions in 0.2

Quote from: brianjw on April 20, 2008, 06:28:12 PM
Please understand, we have added that we aren't going to update the Google Map mod until SMF 2.0 was in final or RC's and have put it there to give us open time to give full effort into the mod. It may very well be released sooner then when the final versions or RC versons do come out. This is unknown as of yet.

Does it or does it not work with SMF 2.0? I'm a little confused.  :)
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

2Ntense

#336
One note (applies to Seek2501's question and several others):

the API KEY that you request is for the ROOT of your site, not any sub-dir.  It's valid for the entire domain.  In other words, apply for hxxp://www.smf.com/ and not hxxp://www.smf.com/forum

http://code.google.com/support/bin/answer.py?answer=55146&topic=10945

And it's for the domain that your members are surfing, NOT the physical name of your server.  If your server is hxxp://234ra.godaddy.com you will use your own domain name of hxxp://www.smf.com, NOT the server.

I doubt putting the FAQ link in there at the head of the thread wouldn't eliminate any of the questions, though.  Who reads the FAQs?


BTW, from the playing I've done (elsewhere) with the GoogleMap API, it's more stable if you plunk it inside of an IFRAME and use their preferred <body onload="load()" onunload="GUnload()"> statement to get the Javascript to initialize properly and exit cleanly.  It's a bear with SMF though as the BODY is somewhere else.

I've spent a fruitless day today trying to get the functions to work as a sub-action from the MEMBERLIST.  Sigh.  Maybe sometime later when I know the forum code better... if it's still the same in 2.0.  :-\


And finally, I added a small 'useability' tweak to mine.  When you place a pin it re-centers the map around the new pin.  Makes it easier to zoom in from there.  ;D  In Profile.template.php, add the line in red.

         GEvent.addListener(map, 'click', function(overlay, point) {
            if (overlay) {
               map.clearOverlays();
               document.getElementById(\"latitude\").value = \"\";
               document.getElementById(\"longitude\").value = \"\";
            } else if (point) {
               map.clearOverlays();
               map.addOverlay(new GMarker(point));
               map.panTo(point);
               document.getElementById(\"latitude\").value = point.y;
               document.getElementById(\"longitude\").value = point.x;
            }



brianjw

@SgtMic:
I was simply explaining what things were going to be like in version 0.2. 0.2 will be compatible with SMF 2.0. The latest version of this mod is 0.1. ;)

@2Ntense:
I lost some of what you were saying when you stated the part about the iframe and body tag. Could you please explain that?
What are you trying to get added to the member map?

Thanks for the tweak. I will add that in to 0.2 :)

SgtMic

Quote from: brianjw on April 20, 2008, 11:00:24 PM
@SgtMic:
I was simply explaining what things were going to be like in version 0.2. 0.2 will be compatible with SMF 2.0. The latest version of this mod is 0.1. ;)

Now I understand. I'm just getting a little antsy for this mod.
But I understand the reasoning for holding off until a stable release.
There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

2Ntense

Google's applet is a little funky and it's got memory issues.  If you don't invoke it with the methods that they recommend, your browser can get exceedingly slow after you've hit the applet a bunch of times (for instance, after looking at a bunch of member's profiles linked from the main map).  The 2.x version of the applet that they're using now is better, but it's far from perfect.

The LOAD and UNLOAD commands also cure most of the issues with IE and other browsers suddenly deciding to not show pins or the map (there's a bunch of complaints about that here that aren't resolved).  IE is the worst offender, but I've seen Opera have grief as well.  For some reason the browser doesn't always recognize that you've invoked the applet.  To get the LOAD and UNLOAD to work right, I found by experimentation that if I didn't have control over the <head> and <body> tags on a page, the only way I could force it was to drop the whole function inside of an <iframe>.  The iframe is rendered last (after the rest of the page loads) so it serves the same 'initialization sequence' purpose as <head> and <body>.  The stuff outside of the iframe is equivalent to <head> and opening and closing the iframe works to trigger the ONLOAD and ONUNLOAD calls.  I haven't tried screwing with SMF's <head> and <body> tags but I'm willing to bet that it would be hard to get the preferred initialization to work right with SMF, and you'd be doing useless Javascript calls on every page of the forum (not just the page views with maps).  I had the same problems before and dropping the map function inside of an iframe solved it permanently.

I have a sample around here somewhere... I'll see if I can find it.

Advertisement: