Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on December 29, 2016, 12:59:42 PM

Title: Google Member Map
Post by: vbgamer45 on December 29, 2016, 12:59:42 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4128)

Originally by Spuds posted with new bug fixes.

This mod installs a member map to your website which allows your members to pin their location on a map. It uses Google Maps 3.0 API to generate the map and place 'Push" pins.

Simply install this package through the package manager located in your Administration Panel. Manual edits may be required if your site uses a custom theme. This mod is compatible with SMF 2.0

In your admin panel you will need to enable it and set any customization you like. Next, your members will need to edit their profiles and place a pin on the map to show their location and save their profile. That pin will then display on the main member map page. The admin will also need to set the map permissions so users can see and use it.


This Modifications Source Code is subject to the terms of the Mozilla Public License version 1.1 (the "License"). You can obtain a copy of the License at http://mozilla.org/MPL/1.1/.
Title: Re: Google Member Map
Post by: Colin on December 29, 2016, 01:06:01 PM
Neat! It would be cool if you could add a screenshot of an example of the map that is generated.
Title: Re: Google Member Map
Post by: AllMassive on January 23, 2017, 05:17:59 PM
Oh - very nice - thank you so much !
I'm using the former Mod since ages, so: Will the 'old Pins' stay after Installation ?
Title: Re: Google Member Map
Post by: vbgamer45 on January 23, 2017, 05:19:04 PM
Not sure but it may I would do a backup just in case.
Title: Re: Google Member Map
Post by: landyvlad on January 27, 2017, 11:25:38 PM
Hi, I followed the directions and have an unrestricted API key  (tried restricted to) from Google maps.

When I installed it, and set the features all seemed ok.

But when I tried to use it, a google map came up for a very brief period of time then it went blank, with the following error:

Quote
This page didn't load Google Maps correctly. See the JavaScript console for technical details.

Oh, and now it's installed where do I find the part that allows me to admin it....  (silly question but not immediately obvious)

Also a suggestion - where it allows you to choose an icon - is it possible to have a preview of that icon so we can see what we are actually going to get?



EDIT:  Solved but for anyone's future reference the javascript console in your browser will give you precisely the domain you need to give permissions to in the Google API. :D

Title: Re: Google Member Map
Post by: landyvlad on January 27, 2017, 11:30:38 PM
Still a note to the developers:

Oh, and now it's installed where do I find the part that allows me to admin it....  (silly question but not immediately obvious)

Also a suggestion - where it allows you to choose an icon - is it possible to have a preview of that icon so we can see what we are actually going to get?

Title: Re: Google Member Map
Post by: landyvlad on January 27, 2017, 11:39:38 PM
Spoke too soon !

The map works on the members map page, but NOT on the profile page where people would actually input their information.

Code: [Select]
js?key=AIzaSyAai1kJAVMjvOAuiM1ZKFX5A87LwnwMj-4&sensor=false&libraries=places:34 Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
Your site URL to be authorized: http://gsx1400owners.org/forum/index.php?action=profile;area=forumprofile
_.lb @ js?key=AIzaSyAai1kJAVMjvOAuiM1ZKFX5A87LwnwMj-4&sensor=false&libraries=places:34
(anonymous) @ common.js:54
(anonymous) @ common.js:196
c @ common.js:50
(anonymous) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fgsx1400owners.org%2Fforum%2Findex.php%3Faction%3D…:1
util.js:210 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

I note that I have authorised the URL it mentions, but I'm not sure about the other errors?

Once you can help me get this sorted out, I'll remove the code from here.  CHeers.
Title: Re: Google Member Map
Post by: vbgamer45 on January 28, 2017, 12:15:26 AM
Your site URL to be authorized: http://gsx1400owners.org/forum/index.php?action=profile;area=forumprofile
That is the main error.
You might have to do the whole domain.
Title: Re: Google Member Map
Post by: landyvlad on January 28, 2017, 12:49:46 AM
Thanks mate yeah I figured it out once I did the whole domain - works fine now :)  Great mod :)

I found the admin settings under Admin - Configuration - Modification Settings - member map.

Perhaps it's just me but that seems a bit buried. Most of the other mods I have are on the main tab - like SMF Gallery and EZPortal.  But I suppose there has to be a limit to that !    No doubt just an issue of me getting used to where things end up.

Cheers and thank you !
Title: Re: Google Member Map
Post by: alain54100 on January 28, 2017, 02:14:27 PM
bonjour
je viens de l installer  mais lorsque je met une adresse  en france  il me marque que je suis au caraibe ou je ne sait ou
pouvez vous me dire ou et le problème   !! merci a vous
Title: Re: Google Member Map
Post by: vbgamer45 on January 28, 2017, 07:43:24 PM
Haven't tested it much myself not sure how it works if it is by ip address then it depends on your isp
Title: Re: Google Member Map
Post by: landyvlad on January 29, 2017, 08:46:56 PM
Having authorised the whole domain, I am getting:

Member Map from top menu bar (display) - works fine.
Member's updating their profile to place a pin. -works fine.
Member's viewing others (and subsequently their own) profile to see their pin location  - NOT working.


The error indicates a particular link to be authorised BUT this link would be different for every member; AND the whole domain is, in theory, authorised...

Any idea what may be going wrong?


edit: Just to let you know that in general my members are VERY impressed with this member map. So, good work :) 
Title: Re: Google Member Map
Post by: GL700Wing on January 29, 2017, 10:45:56 PM
Member's viewing others (and subsequently their own) profile to see their pin location  - NOT working.

...

Any idea what may be going wrong?

Have you enabled the 'View Member Map' permission for the relevant member group(s)?
Title: Re: Google Member Map
Post by: landyvlad on January 30, 2017, 09:27:11 PM
Yep.  It's only one the actual forum profiles that people can't see the map.  Other areas like placing their pin, and viewing the overall map - no problem.

It appears to be a problem with authorisation BUT I'm confused because the whole domain is authorised so it SHOUDL carry through; and the error indicates a particular link to be authorised BUT this link would be different for every member.

Hoping to MOD team can help.
Title: Re: Google Member Map
Post by: landyvlad on February 01, 2017, 01:57:39 AM
OK I managed to solve this issue by adding yet another URL to the authorised list.
Confuses me because I thought the whole site would be authorised but evidently it doesn't work like that...


vbgamer - is the "Location" in members profile a field that is put in by this mod, or core SMF?
If it's the member map mod - how can I get location to show in the member info next to each of their posts (with avatar etc)

Thanks
Title: Re: Google Member Map
Post by: vbgamer45 on February 02, 2017, 08:21:30 PM
Not sure. I don't see in the code that mentions location placeholder.
Title: Re: Google Member Map
Post by: GL700Wing on February 27, 2017, 12:55:55 AM
Found a bug in this mod that was preventing the mod Member Notepad from displaying on the Profile Summary page (had to uninstall a lot of mods on a test forum to find the culprit!).

Basically the issue is that after the mod is installed a closing 'dl' tag in ./Themes/default/Profile.template.php is only being shown conditionally whereas without this mod installed it's always shown.

The correct code is as follows:
Find:
Code: [Select]
<dd>', $context['member']['last_login'], '</dd>
</dl>';

Replace with:
Code: [Select]
<dd>', $context['member']['last_login'], '</dd>';

if (!empty($modSettings['googleMap_Enable']) && allowedTo('googleMap_view'))
{
if (!empty($context['member']['googleMap']['longitude']) && !empty($context['member']['googleMap']['latitude']))
{
echo '
</dl>
<hr />
<br />
<dl>
<dt><strong>' . $txt['googleMap_Where'] . ' ' . (preg_match('~\s(and|&|&amp;)\s~i', $context['member']['name']) ? $txt['googleMap_Whereare'] : $txt['googleMap_Whereis']) . ' ' . $context['member']['name'] . ':</strong></dt>
<dd>
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '&sensor=false"></script>
<div id="map_canvas" style="width: 100%; height: 350px; color: #000000;"></div>
<input type="hidden" name="latitude" size="50" value="', $context['member']['googleMap']['latitude'], '" />
<input type="hidden" name="longitude" size="50" value="', $context['member']['googleMap']['longitude'], '" />
<input type="hidden" name="pindate" size="50" value="', $context['member']['googleMap']['pindate'], '" />
<script type="text/javascript"><!-- // --><', '', '![CDATA[
var latlng = new google.maps.LatLng(', $context['member']['googleMap']['latitude'], ', ', $context['member']['googleMap']['longitude'], ');
var options = {
zoom: 14,
center: latlng,
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.HYBRID,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.DEFAULT
},
};
map = new google.maps.Map(document.getElementById("map_canvas"), options);
var marker = new google.maps.Marker({
position: latlng,
map: map
});
// ]]', '', '></script>
</dd>';
}
}

echo '
</dl>';
Title: Re: Google Member Map
Post by: Alain Rheault on March 07, 2017, 12:46:59 PM
 8)   the script in that last message as been corrected with the last version of th MOD  ...

But i stil get  that error  from google ...

Code: [Select]
"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"
in the Profil.template.php  the line that i read  on line 298 ...

Code: [Select]
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '&sensor=false"></script>
 the end of it might be wath is causing this ... ?  but seem an error from google map ...
 By the way ... the app work fine exep  a second of lag .. before google map send the litles orange message in the Mozila developer tools ...

I tried to change .. False to true ... removing  the  last argument ... notimg is good to stop those orange liner to came in ...

Wath could i do ...  :-[

I do not find the good coding ...

Thank's in advance for any help !
Title: Re: Google Member Map
Post by: vbgamer45 on March 07, 2017, 01:30:28 PM
So removing it doesn't help?
Title: Re: Google Member Map
Post by: GL700Wing on March 07, 2017, 04:58:18 PM
8)   the script in that last message as been corrected with the last version of the MOD  ...
What is the latest version of the mod?

I encountered the problem with v3.0 which I downloaded at the end of January - I've just installed v3.0 again (test forum, no other mods installed) from a fresh download via the link in the first message in this thread and the problem is still there (ie, if the Member Notepad mod is installed and Google Maps is *disabled* the notepad doesn't show in the member's profile summary).
Title: Re: Google Member Map
Post by: Alain Rheault on March 08, 2017, 08:58:46 AM
So removing it doesn't help?

If i only remove the end part of the line 

Code: [Select]
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '&sensor=false"></script>

to keep it like that

Code: [Select]
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . ></script>
I get a white page and killing the forum ...

IF i remove the whole line .... i only loose the Map   ( because i guess i do not send the "google map key " )

I'm trying to do what  they wrote about this issue in the google map user helping site :
 SensorNotRequired  Warning    

The sensor parameter is no longer required for the Google Maps JavaScript API. It won't prevent the Google Maps JavaScript API from working correctly, but we recommend that you remove the sensor parameter from the script element.


What should i REMOVE .. and how .. i'm lost a bit  with the coding ...  i see dashs  (.)  in the code ... i do not know how to propely close the script line ...   ( sory for my poor english do .. )

BTW ..  ... i did not have to touch the whole code in the in the Profil.template.php  as proposed by GL700Wing , it was already done with the last version on the board.  AND i  can't tell about the Note Pad MOD .. i do not use it in my forum !

Thank to being helping me ..   8)
Title: Re: Google Member Map
Post by: vbgamer45 on March 08, 2017, 09:22:55 AM
change to
Code: [Select]
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '"></script>
Title: Re: Google Member Map
Post by: Alain Rheault on March 08, 2017, 11:31:37 AM
BTW it is the last V3.0 ....

I changed it on my clone test forum,  and still see the orange warning from Googlemap in the console
( after i resetted my "cache" buffer and F5 a coupleof time  ) 
but with you coding  it now  bring the map in a perfect way even with le last argument removed ....
 ,  eccept for the Warning ...  :o  seem to came from Googlemap ...

I look at the Page source  in Mozila and i can still see some code for the Sensor = false ...    I replace for sécurity in the code below  the key with a string of ####

Code: [Select]
</div>
<span class="botslice"><span></span></span>
</div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=##################&sensor=false"></script>
<script type="text/javascript" src="http://jular.ca/simplementvr.com/Themes/default/scripts/markerclusterer_compiled.js"></script>
<script type="text/javascript" src="http://jular.ca/testforumclone/index.php?action=googlemap;sa=.js;count=19"></script><table cellpadding="7" cellspacing="0" id="footermenu">

Seem not to realy mess thing up ... exept for that  1 to 2 seconds of lag ...  waiting for google map to send the warning ...

BY THE WAY  that one off the most liked MOD in our new  forum   8) ... now we can follow members that travel in North America !  GREAT MOD !

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fpreview.ibb.co%2FhO4hdv%2Fmap.png&hash=fc6397d9bb1b6aef876856197dcd840e)

You can use the picture  if you want !   :)
Title: Re: Google Member Map
Post by: GL700Wing on March 08, 2017, 05:49:07 PM
Quote
BTW ..  ... i did not have to touch the whole code in the in the Profil.template.php  as proposed by GL700Wing , it was already done with the last version on the board.  AND i  can't tell about the Note Pad MOD .. i do not use it in my forum !
The problem I described *specifically* relates to the use of these two mods together - the bug exists in the version 3.0 of the Google Member Map mod but if you don't use Member Notepad you won't have the problem!
Title: Re: Google Member Map
Post by: Alain Rheault on March 09, 2017, 08:58:10 AM
The problem I described *specifically* relates to the use of these two mods together - the bug exists in the version 3.0 of the Google Member Map mod but if you don't use Member Notepad you won't have the problem!

Yes , it was wath i understood of your problem having those 2 mods to live together on your forum.   Good luck fo a solution ,  i will follow the tread ...  i might like to install the Member note pad  , could be a good way to members that leave there position on the map ... to give all some interesting point to know about that location ! 

Just tinging , or dreaming ...  ;D...  it could be a nice  upgrade for the Google Member map MOD ,  INCLUDE in the Map mod ... a way for the user to write some comments  within his   Member Map !!!  so other members looking at his map could also read or not those comment ! ( option for the member in his profile )    8)
Title: Re: Google Member Map
Post by: stog on March 16, 2017, 09:44:44 AM
hi i have a smf  2.0.13 with tinyportal 1.2 and after disabling template eval.i am getting errors

originally before unchecking i got (and tried posting in tinyportal support)
Code: [Select]
http://www.---.com/index.php?
8: Undefined variable: modSettings
File: /home/--------/htdocs/Themes/default/TPsubs.template.php(127) : eval()'d code
Line: 42

then after unchecking i got

Code: [Select]
http://www.xxx.com/index.php?
8: Undefined variable: modSettings
File: /home/xxx/user/htdocs/Themes/default/languages/GoogleMap.english.php (tp_below sub template - eval?)
Line: 42

looking at member map -- it seems to be working fine (was 2.6 then manually edited for 3.0)

line 42 is
Code: [Select]
$txt['googleMap_DefaultZoom'] = 'The default Zoom Level';

any ideas
thx in advance

Title: Re: Google Member Map
Post by: vbgamer45 on March 16, 2017, 09:47:11 AM
Do you have a block code in tinyportal? TPsubs.template.php is from tiny portal. and if you disabled temp eval that would mean it is coming from a block.
Title: Re: Google Member Map
Post by: stog on March 16, 2017, 09:50:51 AM
thx i have TP code blocks on my front page

but
Quote
that is from a different mod, you would need to post in that mods support topic.
was the response i got when posting in their mod support.http://www.simplemachines.org/community/index.php?topic=27642.msg3918596#msg3918596 (http://www.simplemachines.org/community/index.php?topic=27642.msg3918596#msg3918596)

i though suspect some flaky php code edits i may have introduced to a few blocks ;) (but none of the blocks reference the membermap as far as i know)

thx for your help

ps i have just turned off a few blocks that i had been playing with, and sure enough the error has gone so i'll get back to them and see if someone can spot what the problem is with the php code block. thx again
Title: Re: Google Member Map
Post by: Shambles on March 16, 2017, 10:17:31 AM
Just having a swift ganders at the mod package, I noticed $modSettings isn't globalised in add_settings.php (not that it matters at runtime).
Title: Re: Google Member Map
Post by: stog on March 16, 2017, 11:28:08 AM
cheers Shambles -- and that is why when the template errors are removed, it pointed to membermap perhaps
Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 04:25:35 PM
Google member map 2.6 is not working at all.  It was just brought to my attention by a member of my forum.

I am trying to install 3.0 but have several errors as attached...

I made a backup.

Should I go ahead and hit install mod..?

Thanks in advance.

P.S.
The only recent changes have been changing the forum URLs to https and forcing them with .htaccess and adding the anti-adblock nag mod.
Title: Re: Google Member Map
Post by: vbgamer45 on March 28, 2017, 04:28:21 PM
I would uninstall the old version then install new.

If you still have errors process with install then make the changes to the failed files manually.

Upload the package to http://www.smfhacks.com/smf-package-parser.html and get the file edits.

Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 04:33:30 PM
Thank you sir,  going in... O:)
Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 04:55:32 PM
2.6 uninstalled fine and 3.0 installed with no errors.  Got the api entered and changes saved, but the member map is still blank.

Attached.

Thanks for the help.
Title: Re: Google Member Map
Post by: vbgamer45 on March 28, 2017, 07:53:41 PM
Any errors in javascript error log
Are you on https?
Title: Re: Google Member Map
Post by: landyvlad on March 28, 2017, 08:09:24 PM
Dan if you have a look back at the previous page of this thread I had the same error and it came down to not having the correct URLs authorised.  I ended up doing all the variations on mine (i.e whole domain AND forum url) and it now works fine.

Anyway there is some more discussion on the matter there which will likely be of assistance.
Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 08:23:14 PM
Dan if you have a look back at the previous page of this thread I had the same error and it came down to not having the correct URLs authorised.  I ended up doing all the variations on mine (i.e whole domain AND forum url) and it now works fine.

Anyway there is some more discussion on the matter there which will likely be of assistance.
I read (skimmed) your posts and did not see where to authorize anything.   I now suppose it is somewhere in getting the api key.
I will redo the key and look harder for a place to authorize the whole domain and the forum url.

Thanks for your reply
Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 08:25:27 PM
Any errors in javascript error log
Are you on https?

Yes https...  Plenty of errors. Thanks


          Blocked loading mixed active content “http://maps.google.com/maps/api/js?key=xxx&sensor=false”[Learn More] index.php
Loading mixed (insecure) display content “http://www.eaglersnest.com/forum/Eaglogo.png” on a secure page[Learn More] index.php
Loading mixed (insecure) display content “https://www.eaglersnest.com/forum/Eaglogo.png” on a secure page[Learn More]  index.php
Loading mixed (insecure) display content “http://www.eaglersnest.com/forum/offsite_avatars/avatar_1_1388098606.gif” on a secure page[Learn More] index.php
Loading mixed (insecure) display content “https://www.eaglersnest.com/forum/offsite_avatars/avatar_1_1388098606.gif” on a secure page[Learn More]  index.php
code.createjs.com : server does not support RFC 5746, see CVE-2009-3555  (unknown)
banner started  YahooDynamic_728x90.html:272:6
total time - 14.748 seconds  YahooDynamic_728x90.html:331:7
Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More] index.php
jquery is already loaded with version: 1.10.1  index.php:372:5
result of version check: 2  index.php:374:6
after version check loaded with version: 2.0.3  index.php:385:10
Title: Re: Google Member Map
Post by: vbgamer45 on March 28, 2017, 08:49:34 PM
Open templates\GoogleMap.template.php

Code: [Select]
<script type="text/javascript" src="http://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '&sensor=false"></script>

Change

Code: [Select]
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' . $modSettings['googleMap_Key'] . '&sensor=false"></script>
Title: Re: Google Member Map
Post by: Dan_ on March 28, 2017, 09:25:31 PM
I got a new key and restricted it and put in the forum url and the google map page url...  I'm still jacked-up.

Opened themes\default\GoogleMap.template.php and changed the http to https... Bingo, bango bongo...  Works!

Thanks for everyone's help..!
Title: Re: Google Member Map
Post by: landyvlad on March 28, 2017, 09:49:21 PM
sweet!

It took me a little while to get this working, but my members love it ! It's a really good mod.
Title: Re: Google Member Map
Post by: vbgamer45 on March 28, 2017, 10:01:31 PM
Update

3.0.1

!Fixed bug with https sites not showing the google map.
Title: Re: Google Member Map
Post by: naitram on April 04, 2017, 09:13:33 AM
glad to see this mod has been brought back to life,

my members were dissapointed when we lost it.

the old pin locations were still in our DB and this version sees them but with over 2900 pins it takes over 90 seconds to populate.


if there is anything i can do to help optomize this lef me know
Title: Re: Google Member Map
Post by: landyvlad on April 04, 2017, 08:30:17 PM
naitram - if you set it so it 'clusters'  (I forget the correct terminology, may be right) nearby pins, that MAY help the issue?  It will still show individual pins when zoomed in, but when zoomed out there will be fewer so may populate quicker?  Worth a try.
Title: Re: Google Member Map
Post by: naitram on April 05, 2017, 08:48:15 AM
still takes about 90 seconds to populate
Title: Re: Google Member Map
Post by: landyvlad on April 08, 2017, 01:06:04 AM
Hmm sorry can't help you then.


On another topic, are there plans to male this mod SMF 2.1 compatible?

Please please please please please !
Title: Re: Google Member Map
Post by: vbgamer45 on April 08, 2017, 01:06:32 AM
When 2.1 is released.
Title: Re: Google Member Map
Post by: Nory on April 10, 2017, 03:50:11 AM
hello,

is it possible to put this mod responsive?

Thank
Title: Re: Google Member Map
Post by: vbgamer45 on April 10, 2017, 08:35:17 AM
no
Title: Re: Google Member Map
Post by: naitram on April 11, 2017, 09:36:23 AM
i have been doing some testing with debug statements and what i found was the following function was taking 90 seconds to complete when there are over 2900 pins

Code: [Select]
        // Load all of the data for these 'pined' members
        loadMemberData($temp);
        foreach ($temp as $v)
                loadMemberContext($v);
        unset($temp);
Title: Re: Google Member Map
Post by: naitram on April 11, 2017, 09:39:45 AM
i went back to an old version of this mod and looked at how it loaded the data.

it just grabbed a few needed columns from the members table and did not rely on loadMemberContext for each.

i hacked the 2 versions together and now the page loads in 3-4 seconds

each pin loads only the following

Code: [Select]
while ($row = $smcFunc['db_fetch_assoc']($request)){
            $ID = $row['id_member'];
            $realName = $row['real_name'];
            $longitude = $row['longitude'];
            $latitude = $row['latitude'];
            $gender = $row['gender'];
Title: Re: Google Member Map
Post by: naitram on April 11, 2017, 09:58:05 AM
i also made 2 changes to the "js" code 1 based on errors observed in the browser

changed
Code: [Select]
html = markers[i].childNodes[0].nodeValue;
to
Code: [Select]
html = markers[i].getAttribute("html");
and as a personal preference set
Code: [Select]
scrollwheel: true,
Title: Re: Google Member Map
Post by: vbgamer45 on April 11, 2017, 07:02:23 PM
naitram will take a look do you have full edit for the query change just want to see it.
The loadMemberData makes sense since it does a query for each member listed if it wasn't cached before.
Title: Re: Google Member Map
Post by: naitram on April 12, 2017, 08:53:10 AM
the issue for me with loadMemberData is just the amount of time it takes to loop through it 2900+ times

my current copy attached. far from polished code but its working for me.
Title: Re: Google Member Map
Post by: Nory on May 04, 2017, 05:13:50 PM
Hello,

I have problem when I activate this mod, the profile page of the member doesn't display... When I uninstal the mod, the page display properly.

Is this a known bug?
Title: Re: Google Member Map
Post by: vbgamer45 on May 04, 2017, 05:27:12 PM
Non known. Do you have api key setup? Take a screenshot or provide link.
Title: Re: Google Member Map
Post by: Nory on May 20, 2017, 09:08:01 AM
Sorry vbgamer45, I didn't see your post earlier.

Quote
Do you have api key setup? Take a screenshot or provide link.
What do you mean about this?

Title: Re: Google Member Map
Post by: Dan_ on May 31, 2017, 06:44:11 PM
Mixed content warning in Fire Fox.

I have been able to run down all src="http: references by using the show source code function in the browser.

The last page I still have the mixed content warning on is the Google member map page.  I don't find any http: references however while viewing the source.

There are links in the footer but they are also on the rest of the forum pages that have the green padlock now.

Could this mod need work?  Is it perhaps calling a script from an http source?

Package Manager reports V 3.01 for the mod and the forum is on the 2.0.14 patch

https://www.eaglersnest.com/forum/index.php?action=googlemap (https://www.eaglersnest.com/forum/index.php?action=googlemap)

Thanks VBG45.
Title: Re: Google Member Map
Post by: vbgamer45 on May 31, 2017, 08:05:26 PM
Fixed Dan

Posted update
3.0.2
Fixed path for mark cluster images moved to https://
Title: Re: Google Member Map
Post by: Dan_ on May 31, 2017, 08:08:25 PM
You guys are awesome...  Thank you sir!
Title: Re: Google Member Map
Post by: Dan_ on May 31, 2017, 08:43:33 PM
I uninstalled 3.01 and installed 3.02,  Still have the mixed content warning...  It does seem to stay green until the pins load.

attached...
Title: Re: Google Member Map
Post by: vbgamer45 on May 31, 2017, 08:52:17 PM
Hmm made another change. new update before I just updated the .js file now made a php files changes for the same cluster image code.
Title: Re: Google Member Map
Post by: Dan_ on May 31, 2017, 09:06:59 PM
Bingo!  ;D

I had to delete the 3.02 file, it told me I already had the package on the server...   But all green padlocks now.  Awesomeness.
Title: Re: Google Member Map
Post by: vbgamer45 on May 31, 2017, 09:07:10 PM
Glad we have a winner!
Title: Re: Google Member Map
Post by: Juan Carlos on July 25, 2017, 12:56:39 PM
Excellent mod, it would be perfect to have it for 2.1 beta
Title: Re: Google Member Map
Post by: vbgamer45 on July 25, 2017, 01:01:27 PM
Will do once 2.1 final comes out
Title: Re: Google Member Map
Post by: lup1n2 on August 25, 2017, 08:30:05 AM
Hi
looks like a great mod but i cant get to add pins to it i i click the "Click here to add or edit your pin location on the map." but it brings up the user profile and there is no where to add the location . any help would be gratefully received 

Thanks In Advance

Title: Re: Google Member Map
Post by: lup1n2 on August 26, 2017, 02:43:45 AM
Ok got it to work but.. only an admin can place the pins. The normal members cannot see the location in their profile, But also there is no google map  permissions in the admin area to assign to members

Any help would be appreciated
Title: Re: Google Member Map
Post by: landyvlad on September 03, 2017, 01:13:27 AM
Admin - Configuration - modification settings - member map.

ensure the mod is enabled.

And under Members - General Permissions in the "general section" there is are options
View member Map
Place pins on member map

ensure both are ticked.

 
Title: Re: Google Member Map
Post by: alamin on September 29, 2017, 01:24:20 PM
Suddenly my map has stopped working! :'(
https://prnt.sc/gr9uva
Title: Re: Google Member Map
Post by: Louis on October 10, 2017, 04:50:24 PM
Feature request:
(1) remove styles from template into css file
(2) make the whole template a bit more responsive, e.g. by replacing the table structures by floating css boxes

I just started working on this for a forum using the reseller theme - this is what I've done so far:

Added some lines of css to GoogleMap.css
Code: [Select]
#mapWindow { margin-bottom: 10px; height: 512px; }
#map_leftSidebar { white-space: nowrap; display: inline-block; padding-right: 10px; }
#map_rightSidebar { display: inline-block; white-space: nowrap; padding-left: 10px; }
#map_main { display: inline-block; width: 80%; }
#map { height: 500px; }
.mapFloatingbox { display: inline-block; padding: 5px; }

and modified GoogleMap.template.php:
Code: [Select]
<?php
// Google Member Maps Modification

function template_map()
{
global $context$modSettings$scripturl$txt$settings;

if (!empty($modSettings['googleMap_Enable']))
{
echo '
<div id="main_container">
<div class="cat_bar">
<h3 class="catbg">'
$txt['googleMap'], '</h3>
</div>

<div class="windowbg2">
<span class="topslice"><span></span></span>
<div class="content">'
;

// Show a left sidebar?
if ((!empty($modSettings['googleMap_Sidebar'])) && $modSettings['googleMap_Sidebar'] == 'left')
{
echo '
<div id="map_leftSidebar">
<div class="centertext"><em><strong>'
$txt['googleMap_Pinned'], '</strong></em></div>
<hr style="width: 94%;" />
<div id="googleSidebar" class="googleMap_Sidebar" ></div>'
;

if (!empty($modSettings['googleMap_BoldMember']))
echo '
<div class="centertext googleMap_Legend">
<strong>' 
$txt['googleMap_bold'] . '</strong>&nbsp;' $txt['googleMap_OnMove'] . '
</div>'
;

echo '
</div>'
;
}

// our map
echo '
<div id="map_main">
<div id="mapWindow">
<div id="map"></div>
<div id="googleMapReset" onclick="resetMap(); return false;" title="'
$txt['googleMap_Reset'] . '"></div>
</div>'
;

// Set the text for the number of pins we are, or can, show
if ($context['total_pins'] >= $modSettings['googleMap_PinNumber'] && $modSettings['googleMap_PinNumber'] != 0)
echo
sprintf($txt['googleMap_Thereare'], '<strong>(' $modSettings['googleMap_PinNumber'] . '+)</strong>');
else
echo
sprintf($txt['googleMap_Thereare'], '<strong>(' $context['total_pins'] . ')</strong>');

echo '
</div>'
;

// Show a right sidebar?
if (!empty($modSettings['googleMap_Sidebar']) && $modSettings['googleMap_Sidebar'] == 'right')
{
echo '
<div id="map_rightSidebar">
<div class="centertext"><em><strong>'
$txt['googleMap_Pinned'], '</strong></em></div>
<hr style="width: 94%;" />
<div id="googleSidebar" class="googleMap_Sidebar"></div>'
;

if (!empty($modSettings['googleMap_BoldMember']))
echo '
<div class="centertext googleMap_Legend">
<strong>' 
$txt['googleMap_bold'] . '</strong>&nbsp;' $txt['googleMap_OnMove'] . '
</div>'
;

echo '
</div>'
;
}

// Show a legend?
if (!empty($modSettings['googleMap_EnableLegend']))
{
echo '
<div class="cat_bar">
<h4 class="catbg"><span class="align_left">'
$txt['googleMap_Legend'], '</span></h4>
</div>
<div class="centertext">'
;

if (empty($modSettings['googleMap_PinGender']))
echo '
<div class="mapFloatingbox"><img src="https://chart.apis.google.com/chart'
$modSettings['npin'], '" alt="" />'$txt['googleMap_MemberPin'], '</div>';
else
echo  '
<div class="mapFloatingbox"><img src="https://chart.apis.google.com/chart'
$modSettings['npin'], '" alt="" />'$txt['googleMap_AndrogynyPin'], '</div>
<div class="mapFloatingbox"><img src="https://chart.apis.google.com/chart'
$modSettings['mpin'], '" alt="" />'$txt['googleMap_MalePin'], '</div>
<div class="mapFloatingbox"><img src="https://chart.apis.google.com/chart'
$modSettings['fpin'], '" alt="" />'$txt['googleMap_FemalePin'], '</div>';

if (!empty($modSettings['googleMap_EnableClusterer']) && ($context['total_pins'] > (!empty($modSettings['googleMap_MinMarkertoCluster']) ? $modSettings['googleMap_MinMarkertoCluster'] : 0)))
{
$codebase 'https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclusterer';
$chartbase "https://chart.apis.google.com/chart";

switch ($modSettings['cpin'])
{
case 1:
$pinsrc $codebase '/images/m1.png';
break;
case 2:
$pinsrc $codebase '/images/people35.png';
break;
case 3:
$pinsrc $codebase '/images/conv30.png';
break;
default:
$pinsrc $chartbase $modSettings['cpin'];
}

echo '
<div class="mapFloatingbox"><img src="' 
$pinsrc '" height=37 />'$txt['googleMap_GroupOfPins'], '</div>';
}

echo '
</div>'
;
}

echo '
<div class="centertext">'
;

// If they can place a pin, give them a hint
if (allowedTo('googleMap_place'))
echo '
<a href="'
$scripturl'?action=profile;area=forumprofile">'$txt['googleMap_AddPinNote'], '</a>
'
;

// Google earth klm output enabled?
if (!empty($modSettings['googleMap_KMLoutput_enable']))
echo '
<br><a href="'
$scripturl'?action=.kml"><img src="'$settings['default_theme_url'], '/images/google_earth_feed.gif" border="0" alt="" /></a>
'
;
echo '
</div>'
;

// Close it up jim
echo '
</div>
<span class="botslice"><span></span></span>
</div>
</div>'
;

// Load the scripts so we can render the map
echo '
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=' 
$modSettings['googleMap_Key'] . '&sensor=false"></script>
<script type="text/javascript" src="'
$settings['default_theme_url'], '/scripts/markerclusterer_compiled.js"></script>
<script type="text/javascript" src="'
$scripturl'?action=googlemap;sa=.js;count='$context['total_pins'] .'"></script>';
}
}
?>


Pls note: This is work in progress and has only been roughly tested with SMF 2.0.14 and a modified Reseller theme - YMMV.
Title: Re: Google Member Map
Post by: Louis on October 11, 2017, 04:58:02 AM
Another minor change I found useful for "nicer" display of user details after clicking on the pin:

add to css
Code: [Select]
.googleMap img.avatar { max-width: 240px; max-height: 240px; }
change line 505 of GoogleMap.php from
Code: [Select]
<div class="floatright" style="height:' . $div_height . 'px">' . $marker['avatar']['image'] . '<br /></div>';
to
Code: [Select]
<div class="floatright" style="max-height:' . $div_height . 'px">' . $marker['avatar']['image'] . '<br /></div>';
Title: Re: Google Member Map
Post by: Louis on October 11, 2017, 05:06:22 AM
And a minor bug: the PM link expanded over the blurb text in the user pin popup - it is lacking a closing </a> tag in GoogleMap.php line 566
Correct code should be (line 561ff.)
Code: [Select]
// Show the PM tag
$datablurb .= '
<li>
<a href="' . $scripturl . '?action=pm;sa=send;u=' . $marker['id'] . '">';
$datablurb .= $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/im_' . ($marker['online']['is_online'] ? 'on' : 'off') . '.gif" height="16" border="0" />' : ($marker['online']['is_online'] ? $txt['pm_online'] : $txt['pm_offline']);
$datablurb .= '</a>
</li>
Title: Re: Google Member Map
Post by: vbgamer45 on October 11, 2017, 03:02:03 PM
Update
3.0.4
!Fixed closing </a> tag in a couple spots thanks to Louis
Title: Re: Google Member Map
Post by: GL700Wing on October 11, 2017, 05:09:23 PM
Thanks for the update.

Also, and I know it's only minor, but the issue I reported in Profile.template.ph in February (https://www.simplemachines.org/community/index.php?topic=550885.msg3916480#msg3916480) is still not fixed which means I had to do a manual edit again to get this mod to work with Member Notepad.
Title: Re: Google Member Map
Post by: lather on October 18, 2017, 12:51:23 PM
This was working on our old server. When we moved to a new server the forum would not work and I tried reapair-settings including remove all hooks. Finally resorted to uploading a fresh set of files which removed all mods. I have re-installed Google Member Map and the map dispalys as well as the list of members who had previously placed pins but no pins show on the map.
Also trying to add a pins does not work.
What do I need to do to fix this?

http://www.ridemsta.com/mstaforums/index.php?action=googlemap (http://www.ridemsta.com/mstaforums/index.php?action=googlemap)

Thanks
Title: Re: Google Member Map
Post by: Louis on October 18, 2017, 03:51:30 PM
but no pins show on the map
The pins do show on the map, but apparently all appear at 0.0S 0.0E somewhere off the coast of Africa. Are the coordinates still correct in the database? (Would be surprised if not, but asking anyway)
Title: Re: Google Member Map
Post by: lather on October 18, 2017, 07:40:04 PM
but no pins show on the map
The pins do show on the map, but apparently all appear at 0.0S 0.0E somewhere off the coast of Africa. Are the coordinates still correct in the database? (Would be surprised if not, but asking anyway)
Yes the coordinates appear to be correct, longitude in the -84 to -77 and latitude 26-40 range which is continental USA, certainly not the Gulf of Guinea. I think that spot where the pins display is probably lat 0 and long 0
Title: Re: Google Member Map
Post by: landyvlad on December 18, 2017, 07:35:29 AM
What is the update process please?  Is it just upload and install the new one, or do I uninstall./delete the old one first?
(It'd be cool if this info was included in the description of the mod, for easy reference)

Thanks
Title: Re: Google Member Map
Post by: vbgamer45 on December 18, 2017, 09:08:16 AM
Either way works.
Title: Re: Google Member Map
Post by: 3dphoto on January 05, 2018, 08:35:37 PM
Hi,

I have 2.0.8 installed (it quit working properly some time ago) and want to upgrade it to the latest, but clicking Uninstall under Installed Packages gives an error that there is no uninstaller.  I tried to upload that Mod to SMF Hacks Package Parser and it said not compatible with current version.  Is there a straightforward way to remove it so I can upgrade?

Many thanks,
Jeff
Title: Re: Google Member Map
Post by: vbgamer45 on January 05, 2018, 08:47:54 PM
Try to emulate an old version of SMF? I guess try SMF 2.0 and see if the uninstall link can be found then.
Title: Re: Google Member Map
Post by: 3dphoto on January 05, 2018, 09:29:16 PM
Thanks- that did generate a parse list.  I'll take a look over the weekend.  It doesn't look like it's got too many hooks, and the language stuff is of course easy.
Title: Re: Google Member Map
Post by: 3dphoto on January 06, 2018, 07:38:14 PM
Thanks- I was able to extract it.  I didn't know how to generate the add_remove_hooks.php file, but was able to get through it all, plus successfully install v2.8!  Much appreciated!

Jeff
Title: Re: Google Member Map
Post by: vbgamer45 on January 06, 2018, 08:16:17 PM
Cool glad you have it working on the new version!
Title: Re: Google Member Map
Post by: Tonyvic on January 10, 2018, 10:33:29 AM
We had an old version installed but after a couple of server issues it stopped working.
I then uninstalled it but left database entries, on installing version 3.0.4 the same is happening.
When the Membermap is selected a map with no pins appears briefly followed by a white screen with the error
Quote
Unable to read the map pin data, result was - 500
I have checked in a number of profiles and the pins are showing ok.

Any suggestions please.
Title: Re: Google Member Map
Post by: Tonyvic on January 11, 2018, 02:06:45 PM
Sorry to bump :-[
Any ideas at all as to where to look?
Title: Re: Google Member Map
Post by: vbgamer45 on January 11, 2018, 02:15:13 PM
I would check in firefox or chrome developer tools and try to trace the remote 500 call and see what the true error code is.
Title: Re: Google Member Map
Post by: Tonyvic on January 12, 2018, 05:54:39 AM
Thanks for the reply, will try and work out how to use Developer Tools in browser, I may be back. :-[ :-\
Title: Re: Google Member Map
Post by: vbgamer45 on January 12, 2018, 07:25:26 AM
If not send me a link to your page and can look at it.
Title: Re: Google Member Map
Post by: Tonyvic on January 12, 2018, 01:50:55 PM
Many thanks for the offer @vbgamer45 but ours is a private forum so the page isn't available to non-members.
I will keep trying with the Developer Tools.
Title: Re: Google Member Map
Post by: landyvlad on January 17, 2018, 05:25:27 AM
Trying to uninstall version 3.0 to upgrade to 3.0.4. and getting this error in the uninstall test

Quote
14.   Execute Modification   ./Themes/default/languages/Who.english-utf8.php   Test failed
   1.   Replace   ./Themes/default/languages/Who.english-utf8.php   Test failed

I'm currently running SMF2.0.13

A little guidance / help on how to proceed would be greatly appreciated.

Title: Re: Google Member Map
Post by: vbgamer45 on January 17, 2018, 11:10:22 AM
ignore that one.
Title: Re: Google Member Map
Post by: landyvlad on January 18, 2018, 08:48:56 PM
I just LOVE this mod. It's one of my favourite enhancements.

Is a 2.1 version likely?
Title: Re: Google Member Map
Post by: vbgamer45 on January 18, 2018, 09:00:29 PM
When SMF 2.1 goes final.
Title: Re: Google Member Map
Post by: landyvlad on January 18, 2018, 09:33:01 PM
AWESOME !!!!!!!!!  ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Title: Re: Google Member Map
Post by: Jeff B on February 01, 2018, 11:29:38 AM
I recently migrated to a new server because I was no longer able to update SMF because of old PHP versions.  After the migration, I then updated from 2.0.13 on up to 2.0.15   
I now have an issue with our members map. The map works in the profiles. You can edit a pin and save it and the map shows as expected.  The problem is with the main map.  When you click on the link, the map loads, but then, after a mment, it goes to a white screen with this error:
Unable to read the map pin data, result was - 500
Any suggestions?

This is not the latest version of the map mod. I was going to try and update it, but get several install error warnings so have refrained.
Title: Re: Google Member Map
Post by: vbgamer45 on February 01, 2018, 12:16:10 PM
I would suggest try the new version at least upload the new version of the files if you can. You can use the manual package parser to make the edits to your SMF files.

The new version does fix a bunch of bugs that were there in the past.
Title: Re: Google Member Map
Post by: Jeff B on February 01, 2018, 12:42:00 PM
Should I uninstall first, or at least try to?  Also, we have about 4000 pins in the map. Will the database remain untouched if I uninstall and reinstall so we do not lose that data?
Title: Re: Google Member Map
Post by: vbgamer45 on February 01, 2018, 12:50:25 PM
Only if you choose the option on uninstall to delete the data.

If you are unsure make a backup your site/database.
Title: Re: Google Member Map
Post by: Jeff B on February 01, 2018, 12:55:15 PM
Do I NEED to uninstall?  Or can I install over top? Or, is that why I am getting the errors when trying to install the new version?
Title: Re: Google Member Map
Post by: vbgamer45 on February 01, 2018, 01:45:08 PM
You would need to uninstall because it would try to edit the same spots and it can't
Title: Re: Google Member Map
Post by: Jeff B on February 01, 2018, 02:04:43 PM
I just looked and get errors for uninstall as well.

for load.php 
It says to find:

Code: [Select]
'website' => array(
'title' => $profile['website_title'],
'url' => $profile['website_url'],
),
'googleMap' => array(
'latitude' => !isset($profile['latitude']) ? 0 : (float) $profile['latitude'],
'longitude' => !isset($profile['longitude']) ? 0 : (float) $profile['longitude'],
'pindate' => !isset($profile['pindate']) ? '' : $profile['pindate'],
),


Code: (Replace) [Select]

Code: [Select]
'website' => array(
'title' => $profile['website_title'],
'url' => $profile['website_url'],
),

I looked at my load.php file, and it already says what to replace it with, it does not have the additional code. 

I also get an error on Who.english.php.   

Would you proceed with uninstall with those two errors?


Title: Re: Google Member Map
Post by: vbgamer45 on February 01, 2018, 03:46:31 PM
Yes I would.
Title: Re: Google Member Map
Post by: Jeff B on February 01, 2018, 04:10:11 PM
I uninstalled the old members map without issue.  Now on install of the new version, there were no errors presented, so I installed and everything looked fine.  Since the old version did not require a key, I obtained a key and added it in the members map settings.  Everything looks okay, other than, nothing has changed.

The members map loads the map, and within a moment switches to a white screen that says  only

Unable to read the map pin data, result was - 500

and in the status bar it says: waiting for csi.gstatic.com   
Title: Re: Google Member Map
Post by: Tonyvic on February 02, 2018, 02:35:20 PM
I would check in firefox or chrome developer tools and try to trace the remote 500 call and see what the true error code is.
I have the same and @vbgamer45 suggested the above, but I can't work out how to use the tools.
I just spotted that I also get waiting for csi.gstatic.com
Title: Re: Google Member Map
Post by: Jeff B on February 02, 2018, 03:57:21 PM
I would have no idea how to do that either.  Did you problem just pop up after having worked before?  I kinda associate mine to upgrading from 2.0.13 to 2.0.15 but that may be mere coincidence
Title: Re: Google Member Map
Post by: Tonyvic on February 02, 2018, 05:28:45 PM
Did you problem just pop up after having worked before?  I kinda associate mine to upgrading from 2.0.13 to 2.0.15 but that may be mere coincidence
I had just upgraded from 2.0.14 to 2.0.15 and I have discovered the host did a server upgrade on the same day, the map was first reported to be "not working" the next day.

As you mentioned migrating to a new server at the same time maybe this issue is related to our servers. :-\
Title: Re: Google Member Map
Post by: Jeff B on February 02, 2018, 08:03:10 PM
I was messing around with the developer console, and had this pop up when the screen switched from map to the error.

XML Parsing Error: no root element found
Location: http://mywebsite.com/board/index.php?action=googlemap;sa=.xml
Line Number 1, Column 1:
Title: Re: Google Member Map
Post by: Tonyvic on February 03, 2018, 08:54:54 AM
Interesting, I have taken a backup of the files and database and installed them on a different hosts server.
It works perfectly without any errors, all pins showing ok.

In my case at least it has to do with the server, but no idea what at present. ??? :-\
Title: Re: Google Member Map
Post by: vbgamer45 on February 04, 2018, 12:44:47 PM
Jeff do you have a public llink on your website where i can see this error occur?
Title: Re: Google Member Map
Post by: Jeff B on February 04, 2018, 02:20:25 PM
P.M.  sent
Title: Re: Google Member Map
Post by: vbgamer45 on February 04, 2018, 02:31:05 PM
Anything in your forums error log that might related?
Title: Re: Google Member Map
Post by: Jeff B on February 04, 2018, 03:03:42 PM
Nope, nothing.  I clicked on the link and let the map page load the error page a few times, then checked the log and nothing. I also looked back to see if there was anything related and there is not.
Title: Re: Google Member Map
Post by: Tonyvic on February 05, 2018, 02:38:46 PM
Interesting, I have taken a backup of the files and database and installed them on a different hosts server.
It works perfectly without any errors, all pins showing ok.

In my case at least it has to do with the server, but no idea what at present. ??? :-\
Finally tracked it down, when the host did the server upgrade somehow my PHP INI memory was reduced to 32M
I changed it back to 64M where it was previously and the Map pins appear again. All is good :)
Title: Re: Google Member Map
Post by: vbgamer45 on February 05, 2018, 02:54:20 PM
Ah good to know!
Title: Re: Google Member Map
Post by: Jeff B on February 05, 2018, 03:17:02 PM
Is this what you are talking about?
Mine is:
; The OPcache shared memory storage size.
;opcache.memory_consumption=64

the other setting I see is:

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M

Not sure whether I dare mess with those or not.  suggestions?
Title: Re: Google Member Map
Post by: vbgamer45 on February 05, 2018, 03:19:56 PM
memory_limit = 128M   should be good.
You can try to raise 256M
Title: Re: Google Member Map
Post by: Jeff B on February 05, 2018, 03:25:56 PM
No joy.  I reset to 256, restarted apache and no luck.
Title: Re: Google Member Map
Post by: Jeff B on February 05, 2018, 03:43:14 PM
Whats this?

Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64
Title: Re: Google Member Map
Post by: vbgamer45 on February 05, 2018, 03:50:10 PM
Don't change that.
Title: Re: Google Member Map
Post by: Jeff B on February 05, 2018, 03:54:56 PM
[hands suddenly go in the air]
Title: Re: Google Member Map
Post by: Tonyvic on February 05, 2018, 05:24:59 PM
I have MultiPHP INI Editor in my cPanel and simply changed it there.
I found my problem by looking in the error log in my Forum root directory, at the times the membermap error appeared  were entries starting with
Quote
HP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 79 bytes) in................
Sadly it doesn't seem to be the same problem that you have.
Title: Re: Google Member Map
Post by: Jeff B on February 05, 2018, 08:01:59 PM
I've tried to find a log somewhere that relates and find nothing.  Is there anything I can do to try to record the error?some sort of debugger or something?
Title: Re: Google Member Map
Post by: vbgamer45 on February 05, 2018, 11:52:54 PM
Places to check first enable the php error log in the php.ini
 You can set a file for it to write to.

You can also check your apache error log but I would do the php one first.
Title: Re: Google Member Map
Post by: aegersz on February 08, 2018, 07:05:28 PM
I wanted to try this out but my Load.php has no such lines of code

Code: [Select]
mem.buddy_list, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,
I can't find part of a query in ./Sources/Load.php that looks like that at all.

any idea why my Load.php is so different ?
Title: Re: Google Member Map
Post by: vbgamer45 on February 08, 2018, 07:34:39 PM
Other mods change it.
I would look at fresh SMF 2.0.15 install and look for that line.
Then find one similar in yours.
Title: Re: Google Member Map
Post by: aegersz on February 08, 2018, 07:40:46 PM
that is not possible but thanks; it installs fine on my vanilla SMF 2.0.15.

I should've tried it and maybe I can retrofit it down the track but for now, i will leave my mods on.
Title: Re: Google Member Map
Post by: Jeff B on February 09, 2018, 02:44:22 PM
Places to check first enable the php error log in the php.ini
 You can set a file for it to write to.

You can also check your apache error log but I would do the php one first.

AHA!  I did as you suggested, Enabled php log in pho.ini  and I found this error occurring:
 snmpd[701]: error on subcontainer 'ia_addr' insert (-1)

Now what to do about it?
Title: Re: Google Member Map
Post by: vbgamer45 on February 09, 2018, 03:27:41 PM
Does that occur each time when you try load the member map.
Title: Re: Google Member Map
Post by: Jeff B on February 09, 2018, 04:28:16 PM
I'm beginning to think that isn't it.  My server when you enable the log in php.ini  writes to the syslog by default.  This could be something else, as I ran tail -f syslog and watched as I tried to load the maps, and it wasn't appearing as expected.
Title: Re: Google Member Map
Post by: Jeff B on February 11, 2018, 10:06:51 AM
I was able to produce errors using firefox's console.

Quote
XML Parsing Error: no root element found
Location: http://mysite/board/index.php?action=googlemap;sa=.xml
Line Number 1, Column 1:
index.php:1:1
TypeError: xmldoc is null
[Learn More]
index.php:146:6
Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

Title: Re: Google Member Map
Post by: Jeff B on February 11, 2018, 10:22:57 AM
I'm getting somewhere, but not there yet.  I just changed the permissions on my themes folder from 777 to 775 and now that map is loading, and staying loaded, but the pins are not loading on the map.
Title: Re: Google Member Map
Post by: Jeff B on February 11, 2018, 10:27:49 AM
DRAT  Google must have been sleeping. when I went back to try and advance to a solution, I found that I still had the same issue. still the parsing error.
Title: Re: Google Member Map
Post by: Jeff B on February 14, 2018, 05:17:31 PM
Okay, I'm going to offer a reward for figuring this out!
Title: Re: Google Member Map
Post by: Jeff B on February 14, 2018, 05:18:58 PM
Enough to take your significant other out for Dinner on Valentines day!
Title: Re: Google Member Map
Post by: lurkalot on February 14, 2018, 07:11:28 PM
Enough to take your significant other out for Dinner on Valentines day!

Not sure if this helps Jeff.

 HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.
(XHR)GET - http://forestryforum.com/board/index.php?action=googlemap;sa=.xml
Title: Re: Google Member Map
Post by: Jeff B on February 15, 2018, 05:53:13 PM
Nibogo is the hero on this one. He was able to get my members map working. Hopefully he can fill you in on exactly what was going on, but it had something to do with the member blurbs for the pins breaking it.

On a side note, where could I go edit the code to remove everything in those blurbs other than the username and link to profile?  They never did format well. Stuff on top of stuff.
Title: Re: Google Member Map
Post by: lurkalot on February 15, 2018, 06:55:50 PM
Nibogo is the hero on this one. He was able to get my members map working. Hopefully he can fill you in on exactly what was going on, but it had something to do with the member blurbs for the pins breaking it.

On a side note, where could I go edit the code to remove everything in those blurbs other than the username and link to profile?  They never did format well. Stuff on top of stuff.

That's great news Jeff, really glad you got this sorted.  I know how frustrating these problems can be.  8)
Title: Re: Google Member Map
Post by: landyvlad on March 14, 2018, 10:40:25 PM
I just LOVE this mod. It's one of my favourite enhancements.
Is a 2.1 version likely?

When SMF 2.1 goes final.

Well that is good news.

In the meantime there will obviously be a gap between when I upgrade from 2.0.15 to 2.1 (when final is released) and the time when the member map is reintroduced.

How can I save all the data (location pins for members) so that when I install again in future, it will have all those existing pins?

I hope this makes sense...
Title: Re: Google Member Map
Post by: vbgamer45 on March 14, 2018, 10:49:01 PM
The data will carry over as long as your forum is upgraded.
Title: Re: Google Member Map
Post by: landyvlad on March 15, 2018, 12:00:45 AM
Ta muchly.
Title: Re: Google Member Map
Post by: sbarker on May 04, 2018, 03:42:54 AM

Sorry if this has been covered elsewhere (I searched but couldn't find anything).

Has anyone got a good handle on how or if the new Google Maps pricing policy will affect users of this mod ?

https://cloud.google.com/maps-platform/pricing/

Title: Re: Google Member Map
Post by: vbgamer45 on May 04, 2018, 08:05:19 AM
I think you would be ok since you get $200 of credit a month unless you have a lot of usage
Title: Re: Google Member Map
Post by: landyvlad on May 08, 2018, 08:16:06 PM
I hadn't seen that.  Just another filthy money grab from google it seems. I'll bet that free allowance gets reduced over time..... 

and wow, could the pricing possibly be any more complex....   ::)
Title: Re: Google Member Map
Post by: vbgamer45 on May 08, 2018, 08:41:07 PM
It is confusing the pricing for most forums I think they would be well under the limit.
Title: Re: Google Member Map
Post by: lather on May 10, 2018, 08:39:58 AM
I got an email from Google this week implying that by 2020, possibly 2019 I will need to set up a payment method in my Google account.
Title: Re: Google Member Map
Post by: TLMB on August 22, 2018, 09:25:49 AM
Just wanted to say thanks for this mod.

I was using v 2.6, which stopped working recently. I did upgrades of my forum from 2.0.11>2.0.12>2.0.13>2.0.14>2.0.15 , then uninstalled the Maps mod (leaving Remove data unchecked - the scary bit). Installed v3 of the mod - and it's all back and working, with all user data still there. Phew. Cheers!
Title: Re: Google Member Map
Post by: vbgamer45 on August 22, 2018, 09:36:42 AM
Glad you enjoy it!
Title: Re: Google Member Map
Post by: njtweb on August 22, 2018, 02:42:24 PM
Is it the member responsibility to assign their own location push pin? I'm asking because I've seen on other sites where the member map automatically generates the locations by each IP address associated with the active member.
Title: Re: Google Member Map
Post by: vbgamer45 on August 22, 2018, 02:43:40 PM
Yes it is.
Title: Re: Google Member Map
Post by: njtweb on August 22, 2018, 03:14:29 PM
Yes it is.

Ok, thank you.
Title: Re: Google Member Map
Post by: AZMazda3 on November 26, 2018, 07:32:14 PM
Recently updated this mod to our 2.0.15 forum. All was good until today, getting 500 errors now. I pulled the error logs via php myadmin and there are tons of errors for this mod related to the security.php file.

I could not find any similar issues posted...mod update was complete 11/24 around 9am, sit was working this morning around 7am.
Title: Re: Google Member Map
Post by: vbgamer45 on November 26, 2018, 07:37:24 PM
What does the error line look like?
Title: Re: Google Member Map
Post by: AZMazda3 on November 26, 2018, 08:40:44 PM
What does the error line look like?

8: Undefined index: cannot_googleMap_view

Title: Re: Google Member Map
Post by: vbgamer45 on November 26, 2018, 08:45:14 PM
Strange do you have this line in your googlemap.english.php file
Code: [Select]
googleMap_view
Title: Re: Google Member Map
Post by: AZMazda3 on November 26, 2018, 08:56:56 PM
Strange do you have this line in your googlemap.english.php file
Code: [Select]
googleMap_view

There are about 8 lines of code with that in it. After looking at it further, the error references line 905 of my security.php file code which has to do with guest logins.

Title: Re: Google Member Map
Post by: AZMazda3 on November 26, 2018, 09:12:26 PM
Well 3 actually, sorry I was looking at the code grouping and not the text.
Title: Re: Google Member Map
Post by: vbgamer45 on November 26, 2018, 09:32:41 PM
Shoot meant for you to check the language file for this code
Code: [Select]
$txt['cannot_googleMap_view'] = 'Sorry, you are not allowed to view the Member Map.';
Title: Re: Google Member Map
Post by: AZMazda3 on November 26, 2018, 10:37:15 PM
That line is there. I restored my last database and cleared the cache folder and it's up again. For now...
Title: Re: Google Member Map
Post by: KEA on December 08, 2018, 12:58:06 PM
Is there a direct URL to use with the Package Manager to install this?  I am only finding the zip file to download and not sure how to install this from the Package Manager? 
Title: Re: Google Member Map
Post by: vbgamer45 on December 08, 2018, 01:14:08 PM
You would use the upload package feature inside the package manager then select the zip file to install.
Title: Re: Google Member Map
Post by: KEA on December 10, 2018, 09:33:35 AM
Select the zip file from what URL? 

When I save the file to my desktop it won't open with the package manager?
Title: Re: Google Member Map
Post by: Arantor on December 10, 2018, 09:35:03 AM
You download the zip to your computer then upload the zip to the package manager.
Title: Re: Google Member Map
Post by: KEA on December 17, 2018, 09:28:45 AM
Getting numerous error message when I try to do that and it tells me not to install it.  Should I uninstall the older version first? 
Title: Re: Google Member Map
Post by: vbgamer45 on December 17, 2018, 08:18:52 PM
Yes
Title: Re: Google Member Map
Post by: whoey on December 26, 2018, 07:13:10 AM
I wanted to try this out but my Load.php has no such lines of code

Code: [Select]
mem.buddy_list, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,
I can't find part of a query in ./Sources/Load.php that looks like that at all.

any idea why my Load.php is so different ?
We have the same problem, in our case it seems to be the "additional membergroups" mod that has changed 2 of the lines in Load.php that this mod also wants to alter.

Am I correct in assuming that it doesn't really matter where it is in the array of strings that is being called by the query only that it is in the array? Nor do you need to match the entire line?

would altering this part in modification.xml
Code: [Select]
<operation>
<search position="replace"><![CDATA[
mem.buddy_list, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,]]></search>
<add><![CDATA[
mem.buddy_list, mem.latitude, mem.longitude, mem.pindate, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[
mem.notify_types, lo.url, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,]]></search>
<add><![CDATA[
mem.notify_types, mem.latitude, mem.longitude, mem.pindate, lo.url, mg.online_color AS member_group_color, IFNULL(mg.group_name, {string:blank_string}) AS member_group,]]></add>
</operation>
to this:
Code: [Select]
<operation>
<search position="before"><![CDATA[
mem.karma_good, mem.id_post_group, mem.karma_bad, mem.lngfile, mem.id_group, mem.time_offset, mem.show_online,]]></search>
<add><![CDATA[
mem.latitude, mem.longitude, mem.pindate,]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[
mem.notify_types,]]></search>
<add><![CDATA[
mem.notify_types, mem.latitude, mem.longitude, mem.pindate,]]></add>
</operation>
still work? (it does not error on install for us)

We had an old version in the past, but due to some errors after upgrading it stopped working, so got uninstalled, but the data remains in our database. I see we now need to set up some sort of payment option to get an API key?
Title: Re: Google Member Map
Post by: vbgamer45 on December 26, 2018, 08:33:55 AM
Yes you could do that. That would still work.
Google now requires a payment method on file. They give you free credits each month as well.
Title: Re: Google Member Map
Post by: landyvlad on February 06, 2019, 06:25:21 AM
Aloha.

Wondering if this will be updated for SMF2.1 RC1 now that's officially released?

(or are there insurmountable obstacles to doing so?)

Thanks
Title: Re: Google Member Map
Post by: vbgamer45 on March 09, 2019, 12:31:04 AM
Updated for SMF 2.1.x

Title: Re: Google Member Map
Post by: Juan Carlos on March 09, 2019, 11:50:44 AM
Thanks for the update.

I try to install the mod today and I have blank page when I clic install and an error that I attached.
Title: Re: Google Member Map
Post by: vbgamer45 on March 09, 2019, 12:17:27 PM
Fixed had a last second mistake I made.
Title: Re: Google Member Map
Post by: Juan Carlos on March 09, 2019, 12:49:07 PM
Now the installation was perfect an appear that all works but I have this error now

Title: Re: Google Member Map
Post by: vbgamer45 on March 09, 2019, 02:30:43 PM
Try now made a change.
Title: Re: Google Member Map
Post by: Juan Carlos on March 09, 2019, 02:42:59 PM
Nop

Same error
Title: Re: Google Member Map
Post by: vbgamer45 on March 09, 2019, 04:24:09 PM
Made another change.
Title: Re: Google Member Map
Post by: Juan Carlos on March 10, 2019, 11:03:52 AM
I update to the new git hub today.

I dont have other mods installed but the error persist.

290 errors every stime I clic in "Member Map" :-\
Title: Re: Google Member Map
Post by: Settertude on March 26, 2019, 09:54:59 AM
Hello Folks,

This is a really cool solution that would be perfect for what I want to do on my forum.
I use forumotion for my forum.
Is it possible to install?

If so, how would I manage this. I have an API and have managed to install 'google maps' on the form as a widget, but it doesn't have the capibility to drop multiple pins.
Frustrated in Oklahoma.

I do not code at least not since UCSD Pascal many moons ago.

Thanks

Sett
Title: Re: Google Member Map
Post by: vbgamer45 on March 26, 2019, 10:20:29 AM
No forummtion is not SMF based nor does it allow addons like this to be installed.


You would need to have  your own hosting account with SMF installed to use this mod.
Title: Re: Google Member Map
Post by: The Latinist on April 14, 2019, 09:00:50 PM
We're suddenly getting an error:

Quote
Google Maps JavaScript API error: DeletedApiProjectMapError

Any ideas?
Title: Re: Google Member Map
Post by: vbgamer45 on April 14, 2019, 09:56:32 PM
https://stackoverflow.com/questions/38182710/google-maps-api-error-deletedapiprojectmaperror