vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   VBGooglemap Member Edition (https://vborg.vbsupport.ru/showthread.php?t=99920)

PixelFx 02-28-2006 10:36 PM

Quote:

Originally Posted by JohnGBSA
Call me a n00b (which I am when it comes to PHP and MySQL), but that seems like an awful lot of work!

A good idea, but geesh!

how goes development on this for v1.4? :D

Bellinis 03-01-2006 07:01 AM

I would like my users to fill in their location by hand and not by searching on the map. Is it possible to fill in the coordinates or is there no other way?

Best would be if my members could fill in their location in their profile ;)

Thanks for the good work!! *clicks install*

johon 03-01-2006 08:37 AM

Quote:

Originally Posted by tamborinegal
I am having this same problem but it only started happening recently.

If I use firefox (and other browsers) it works fine. If I'm a guest using IE, it works fine, BUT if I'm logged in as a member using IE, then the markers are there but it just centers on the map when clicked, I don't get the information popping up. Any idea why this would be happening Stonyarc?

I just love this hack and so do my members but unfortunately now the majority of them are no longer able to use it :(

Clancy

Exactly the same problem in my forum: IE as guest works fine, click on balloon shows userinfo, IE as member shows balloons, but click on balloon only centers the map, no userinfo. Firefox works fine.

So normally it must be a cookie-problem?

Any suggestions?

Greetz

Johon

bamahan 03-01-2006 03:05 PM

Thanks for writing this plugin - very cool. It didn't work on my board at first; found out it's the way you're setting the window.onload event. Our board already has an onload event, and our onload overrode your onload. Best way to get around this is to attach an event instead of just setting onload like that. I changed anywhere you set the window.onload handler to this and it worked great.

Code:

                if(window.addEventListener) {
                        window.addEventListener("load", Load_Map, false);
                } else if(window.attachEvent) {
                        window.attachEvent("onload", Load_Map);
                }

Thanks again!

bamahan 03-01-2006 07:26 PM

Been waiting for somebody to add this, but I'm at the point where I needed it so I wrote it. Nothing fancy, but it works. I can't support this, but wanted to share. Here's the changes I made:

in VBGooglemap.php I added this:

PHP Code:

function geocode($query) {
   
$service "http://brainoff.com/geocoder/rest/?";
   
$f implode("",file($service $query));
   
preg_match("/:long\>([\d\.-]*)/",$f,$long);
   
preg_match("/:lat\>([\d\.-]*)/",$f,$lat);

   
$coords["long"] = $long[1];
   
$coords["lat"] = $lat[1];
   return 
$coords;


right after this:

PHP Code:

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// ####################################################################### 

Then after this:
PHP Code:

//################################################
// END Functions for setting the users location
//################################################


I added this:

PHP Code:

if ($_REQUEST['do'] == 'geocodelookup') {
  
$coords =  geocode($_SERVER["QUERY_STRING"]);
  if(
$coords["long"] && $coords["lat"]) echo($coords["long"]."|".$coords["lat"]);
  exit();


In each of the VBGooglemap_display/set_yourlocation templates add these functions to one of the <SCRIPT> blocks

Code:

function lookupZip(zip) {
        var q = "zip="+zip;
        doLookup(q);
}
function lookupCity(city) {
        var q = "city="+city;
        doLookup(q);
}
function doLookup(q) {
        var t = getTransport();
        t.open("GET","?do=geocodelookup&"+q, false);
        t.send("");
        if(t.responseText) {
                var coords = t.responseText.split('|');
                if(!coords||coords.length!=2) return;               
                map.centerAndZoom(new GPoint(coords[0], coords[1]), 6);
        } else {
                alert("Not Found or Invalid Lookup!");
        }
}
function        getTransport() {
        if(window.XMLHttpRequest || window.ActiveXObject) {
        try{
                req = new XMLHttpRequest();
        } catch(e) {
                try{
                        req = new ActiveXObject("Microsoft.XMLHTTP");
                } catch(e) {
                        try {
                                req = new ActiveXObject("Msxml4.XMLHTTP");
                        } catch(e) {
                                try {
                                        req = new ActiveXObject("Msxml2.XMLHTTP");
                                } catch(e) {
                                        return false;
                                }
                        }
                }
        }
        return req;
}
}

And lastly I added this HTML below the first <script> block:

HTML Code:


<table class="tborder" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" width="100%" border="0" align="center">

<tr>
<td class="tcat">$vbphrase[googlemap_edit]</td>
</tr>
<tr>
<td class="alt1"><div class="smallfont">
$vbphrase[googlemap_smallhelp]
</div></td>
</tr>

<tr>
<td class="thead">Zip Code Lookup</td>
</tr>
<tr>
<td class="alt2"><form onsubmit="this.zipsub.onclick();return false;"><input type="text" id="gmapZipLookup"/><input name="zipsub" type="submit" value="lookup" onclick="lookupZip(document.getElementById('gmapZipLookup').value); return false;"/></form></td>
</tr>

<tr>
<td class="thead">City Lookup
<div class="smallfont">
<font class="small">city,state,US (ie. Marietta,GA,US) or city,country (London,UK)</font>
</div>
</td>
</tr>
<tr>
<td class="alt2"><form onsubmit="this.citysub.onclick();return false;"><input type="text" id="gmapCityLookup"/><input type="submit" value="lookup" name="citysub" onclick="lookupCity(document.getElementById('gmapCityLookup').value); return false;"/></form></td>
</tr>


</table>

Also note that since this was included in the above code, I removed it from it's original position in the templates:

HTML Code:

<tr>
<td class="tcat">$vbphrase[googlemap_edit]</td>
</tr>
<tr>
<td class="alt1"><div class="smallfont">
$vbphrase[googlemap_smallhelp]
</div></td>
</tr>

Have Fun!

tamborinegal 03-02-2006 04:08 AM

Quote:

Originally Posted by johon
Exactly the same problem in my forum: IE as guest works fine, click on balloon shows userinfo, IE as member shows balloons, but click on balloon only centers the map, no userinfo. Firefox works fine.

So normally it must be a cookie-problem?

Any suggestions?

Greetz

Johon

Can anybody help with this problem? Most of my members can no longer use this hack as the majority use IE. :(

Clancy

Lance Carbuncle 03-02-2006 02:55 PM

Man, this is a great hack, it would really be nice to get at least some kind of reply from stonyarc that he has abandoned this project or is aware of the IE issue and working on it, or that the people with the problem are themselves at fault and it works fine..
I posted this "balloon not popping up in IE problem several weeks ago and have patiently been waiting for something......anything. I have not send stonyarc a pm becuase I feel lucky to have any of the hacks on these forums and don't want to take someones time when they are doing somethng for free I figured he would get around to it, .... But this is just such a damn great hack........ and to login here every day and read this thread looking for any news from stonyarc.... and see that he is visiting the forum on a regular basis and not at least acknowledging the posts is frustrating.
This is my favorite hack of all time.... I have even tried to get all my users to switch to firefox so they can use it! LOL
Stonyarc..... I beg you.... please please pretty please..... let us know whats the scoop. I am more than willing to donate if your time is the issue here. But somehow, I doubt that is the issue...
I am sorry if I sound like a little whining kid here. I AM aware that it is my priveledge to download your hack, and not my right to have it. You were VERY generous to share it on this board... it's just such a great hack, I feel likea kid in a candy store with his hands tied behind his back and tape on his mouth LOL....

Lance

KevNJ 03-05-2006 07:43 PM

Quote:

Originally Posted by Lance Carbuncle
Man, this is a great hack, it would really be nice to get at least some kind of reply from stonyarc that he has abandoned this project or is aware of the IE issue and working on it, or that the people with the problem are themselves at fault and it works fine..
I posted this "balloon not popping up in IE problem several weeks ago and have patiently been waiting for something......anything. I have not send stonyarc a pm becuase I feel lucky to have any of the hacks on these forums and don't want to take someones time when they are doing somethng for free I figured he would get around to it, .... But this is just such a damn great hack........ and to login here every day and read this thread looking for any news from stonyarc.... and see that he is visiting the forum on a regular basis and not at least acknowledging the posts is frustrating.
This is my favorite hack of all time.... I have even tried to get all my users to switch to firefox so they can use it! LOL
Stonyarc..... I beg you.... please please pretty please..... let us know whats the scoop. I am more than willing to donate if your time is the issue here. But somehow, I doubt that is the issue...
I am sorry if I sound like a little whining kid here. I AM aware that it is my priveledge to download your hack, and not my right to have it. You were VERY generous to share it on this board... it's just such a great hack, I feel likea kid in a candy store with his hands tied behind his back and tape on his mouth LOL....

Lance


I agree AWESOME hack. I keep checking back with nothing new. Im waiting on the 1.4 version as well for the event and hot spots to display. But with no luck.

WaaDaa 03-05-2006 07:47 PM

Thanks. Already clicked install.

kofoid 03-08-2006 11:49 PM

Help!
When I look at this picture from the description:
http://www.xboxusersgroup.com/images.../scr_main2.gif
I see 2 buttons on the top left of the map - Show map and Your entry. I don't see either on my forum - any help would be appreciated!

http://lets-yada-yada-yada.com/VBGooglemap.php

**edited to add that NO buttons show up in firefox and only red x's show up in IE


All times are GMT. The time now is 04:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03870 seconds
  • Memory Usage 1,802KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete