Advertisement:

Author Topic: Google Member Map  (Read 12786 times)

Offline Dan_

  • Semi-Newbie
  • *
  • Posts: 68
  • Gender: Male
    • Eagler's Nest
Re: Google Member Map
« Reply #60 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...

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Google Member Map
« Reply #61 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.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Dan_

  • Semi-Newbie
  • *
  • Posts: 68
  • Gender: Male
    • Eagler's Nest
Re: Google Member Map
« Reply #62 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.

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Google Member Map
« Reply #63 on: May 31, 2017, 09:07:10 PM »
Glad we have a winner!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Juan Carlos

  • Jr. Member
  • **
  • Posts: 146
  • Gender: Male
Re: Google Member Map
« Reply #64 on: July 25, 2017, 12:56:39 PM »
Excellent mod, it would be perfect to have it for 2.1 beta
Juan Carlos

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Google Member Map
« Reply #65 on: July 25, 2017, 01:01:27 PM »
Will do once 2.1 final comes out
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline lup1n2

  • Newbie
  • *
  • Posts: 3
Re: Google Member Map
« Reply #66 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


Offline lup1n2

  • Newbie
  • *
  • Posts: 3
Re: Google Member Map
« Reply #67 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

Offline landyvlad

  • Jr. Member
  • **
  • Posts: 276
    • Michael Reed on Facebook
    • GSX1400 Owners ORG
Re: Google Member Map
« Reply #68 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.

 
Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Offline alamin

  • Newbie
  • *
  • Posts: 4
Re: Google Member Map
« Reply #69 on: September 29, 2017, 01:24:20 PM »
Suddenly my map has stopped working! :'(
hxxp:prnt.sc/gr9uva [nonactive]

Offline Louis

  • Semi-Newbie
  • *
  • Posts: 77
  • Gender: Male
  • I'm for sure no llama!
Re: Google Member Map
« Reply #70 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.
« Last Edit: October 10, 2017, 05:05:46 PM by Louis »
It is your mind that creates this world (Buddha)

Offline Louis

  • Semi-Newbie
  • *
  • Posts: 77
  • Gender: Male
  • I'm for sure no llama!
Re: Google Member Map
« Reply #71 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>';
It is your mind that creates this world (Buddha)

Offline Louis

  • Semi-Newbie
  • *
  • Posts: 77
  • Gender: Male
  • I'm for sure no llama!
Re: Google Member Map
« Reply #72 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>
It is your mind that creates this world (Buddha)

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,361
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Google Member Map
« Reply #73 on: October 11, 2017, 03:02:03 PM »
Update
3.0.4
!Fixed closing </a> tag in a couple spots thanks to Louis
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Female
Re: Google Member Map
« Reply #74 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 is still not fixed which means I had to do a manual edit again to get this mod to work with Member Notepad.
« Last Edit: October 11, 2017, 05:37:41 PM by GL700Wing »

Offline lather

  • Semi-Newbie
  • *
  • Posts: 25
Re: Google Member Map
« Reply #75 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

Thanks

Offline Louis

  • Semi-Newbie
  • *
  • Posts: 77
  • Gender: Male
  • I'm for sure no llama!
Re: Google Member Map
« Reply #76 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)
« Last Edit: October 18, 2017, 04:46:51 PM by Louis »
It is your mind that creates this world (Buddha)

Offline lather

  • Semi-Newbie
  • *
  • Posts: 25
Re: Google Member Map
« Reply #77 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