Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Member Google Map

edited September 2007 in Questions
This discussion is related to the Member Google Map addon.
Member Google Map
«13

Comments

  • Um - help? "A fatal, non-recoverable error has occurred Technical information (for support personel): Error Message The "ManageLocation" class referenced by "ManageLocation" does not appear to exist. Affected Elements ObjectFactory.NewObject();"
  • Is that error occurring when you activate the extension?
  • Ahh... that's the problem I was having weeks ago. No solution thus far. Mine would tick along for hours and then fall over (when attempting to access the Account page) with that error message.
  • @houseinprogress: If you could update your extension with respect to this comment GoogleMapDirectory # 55, we would appreciate it.
  • Uploaded version 1.1 of Member Google Map.
  • Any work on getting this working properly with FriendlyURL? I just had to manually edit the code to get it to play nice, but would like a solution that works for both situations out of the box. Edit, I think I fixed it. The two changes I made so far was the following: Edit again... found out how to use GetUrl(), lets do this properly!
  • Alright, here's how it would go with using GetUrl() properly, so that'll create the Url appropriate to the forum configuration...

    Find:
    header("Location:account.php?PostBackAction=ManageLocation&u=$u");
    Change to:
    header("Location:".GetUrl($Context->Configuration, 'account.php', '', '', '', '', 'u=$u&PostBackAction=ManageLocation'));

    Find:
    <form id="frmAccountMyBlogs" method="post" action="account.php" enctype="multipart/form-data">
    Change to:
    <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'" enctype="multipart/form-data">
  • I missed one of the links accidentally. This is to update the link 'View all members' under a user's small google map on their account page.

    In default.php

    Find:
    $GoogleMap = '<li class="MemberLocation"><h2>Member Location</h2></li><li><div id="GoogleMapLocation">&nbsp;</div></li><li><a href="extension.php?PostBackAction=GoogleMap">View all members</a></li>';

    Change to:
    $GoogleMap = '<li class="MemberLocation"><h2>Member Location</h2></li><li><div id="GoogleMapLocation">&nbsp;</div></li><li><a href="'.GetUrl($Account->Context->Configuration, 'extension.php', '', '', '', '', 'PostBackAction=GoogleMap').'">View all members</a></li>';
  • They just keep popping up! Found 2 more links that needed to be updated...

    Around line 224, Find:
    <a href="account.php?u='.$u.'" class="CancelButton">Cancel and go back</a>
    Change to:
    <a href="'.GetUrl($this->Context->Configuration, 'account.php','','u',$u).'" class="CancelButton">Cancel and go back</a>

    Around line 287, Find:
    var marker = createMarker(point, \'<div style="width:200px; height:auto; text-align:left; color:#333;"><a style="font-weight:bold; color:#333" href="account.php?u='.$row[4]).'">'.addslashes($row[2]).'<\/a>';
    Change to:
    var marker = createMarker(point, \'<div style="width:200px; height:auto; text-align:left; color:#333;"><a style="font-weight:bold; color:#333" href="'.GetUrl($this->Context->Configuration, 'account.php','','u',$row[4]).'">'.addslashes($row[2]).'<\/a>';
  • And another one...

    Around line 153, Find:
    <select name='RoleFilter' class='LargeSelect' onchange=\"document.location='".$Context->Configuration['WEB_ROOT']."extension.php?PostBackAction=GoogleMap&amp;'+(this.options[this.selectedIndex].value > 0 ? 'RoleID='+this.options[this.selectedIndex].value : '');\">
    Change to:
    <select name='RoleFilter' class='LargeSelect' onchange=\"document.location='".GetUrl($Context->Configuration,"extension.php",'', '', '', '', 'PostBackAction=GoogleMap')."'+(this.options[this.selectedIndex].value > 0 ? '&amp;RoleID='+this.options[this.selectedIndex].value : '');\">
  • hi all!

    i modified the google map to show an inline map at the "Define your coordinates" page.
    by clicking on the map a marker is positioned there and the coordinates are set in the input fields.

    if someone is interested in the changes, i'll upload the new script :)
  • @jehul - That sounds cool. If you email it to me I can bundle that and the other needed fixes in to an upgrade of the extension.

    Email me at aaron at houseblogs dot net
  • hi houseinprogress!

    i mailed you the new ManageLocation class.

    also please add
    "RoleID > 2" to the query in the googlemap class.

    because banned users shouldn't be shown in the members map! :)

    regards, J
  • How about color-coding the tags on the members map for different roles?
  • http://mapki.com/getLonLat.php Could we implement this map instead of copy/paste the position from an external map?! - sebastian
  • @barbe - We'll acctually implement the approach jehul suggested above soon--it will be graphical directly in Vanilla. There are just a few bugs to troubleshoot before uploading the new version.
  • Looks to work great except for one minor thing, under the text "User Location" there is a big white space. Nothing else! No map in other words. Anyways i don't see a way to turn on or off friendly URLS, but I don't think I'm using them. Am I missing something?
  • Friendly URLs is used in conjunction with the GetUrl() function built into Vanilla, and then installing the Friendly URL extension. By using that function, an extension can be built where all the URL's generated will be normal, or SEO compliant.

    Which page are you looking at that has the text for User Location?
  • My "account" page...and I now know I don't have friendly URL's enabled

    thanks
  • Did you add your Google Map API key to the config already?
  • ok I was a bit confused...but here's the deal, I've followed the thread, made changes and I still get this:
    Error Message
    The "ManageLocation" class referenced by "ManageLocation" does not appear to exist.
    Affected Elements
    ObjectFactory.NewObject();"

    So for now, I'm leaving this alone till the next version or the download is fixed.
  • @houseinprogress: This is fantastic, thank you! Any ETA on the graphical "choose location" interface? I'd be more than willing to help troubleshoot/beta the functionality if you're close to release.
  • We got the graphical interface working in Firefox but there's still a bug with IE that prevents the clickable map from loading. I forgot about it and stopped testing it...I'll see if we can figure it out.
  • Wonderful! Thank you so much -- and let me know if there's anything I can do to help.
  • Uploaded version 1.2 of Member Google Map.
  • OK, this version now includes the graphic interface for setting a user's map location.

    Many thanks to Barbe for the suggestion and sample.
  • Thank you so much!

    I notice you've removed the Userpicture from the all-member map display. I was having a little difficulty accounting for different sized user pictures as well. If you're interested, I've changed the add-on slightly to display the user's Icon instead by editing lines 336+ with:

    $result = mysql_query("SELECT A.latitude,A.longitude,A.Name,A.Icon,A.UserID FROM ".$this->Context->Configuration['DATABASE_TABLE_PREFIX']."User A WHERE A.latitude != 0 AND A.longitude != 0 $where",$this->Context->Database->Connection);
    while ($row = mysql_fetch_row($result))
    {
    if ($row[0] <> 0 AND $row[1] <> 0)
    {
    $Image = '';
    if ($row[3] != "") $Image = $row[3];
    echo 'var point = new GPoint('.$row[1].','.$row[0].');
    var marker = createMarker(point, \'<div style="width:200px; height:auto; text-align:left; color:#333;"><a style="font-weight:bold; color:#333" href="'.GetUrl($this->Context->Configuration, 'account.php','','u',$row[4]).'">'.addslashes($row[2]).'<\/a>';
    if ($Image != "") echo '<br \/><img src="'.$Image.'" \/>';
    echo '<\/div>\')
    map.addOverlay(marker);';
    }


    Again, thank you!
«13
Sign In or Register to comment.