vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - VBGooglemap Member Edition (https://vborg.vbsupport.ru/showthread.php?t=123148)

effeff70 11-13-2008 12:30 PM

@Ipetrich

No i didn“t , but i will...THX for answere...

Falcon Capt 11-13-2008 12:47 PM

Quote:

Originally Posted by MediaHound (Post 1659480)
No, thats not my problem, read the post again please. The problem I speak of involves the old version that allowed one to link to specific members on the map. I run in the postbit a link for each member that filled the map a link to his pin on the map. The earlier version of this mod that I was running allowed those links to work. The update I did no longer lets those links work. Example of a link:
http://www.forums.com/vbgooglemapme....865128&zoom=10
That type of link would zoom in to said location. Now its just as if I were to pull up vbgooglemapme.php without passing the variables. The variables in the URL don't have any effect anymore. I wish they would. Have you got an idea to fix this please? Thanks in advance!

After a recent server move I am having the exact same issue. Anyone have any insight?

Falcon Capt 11-14-2008 07:57 PM

Quote:

Originally Posted by MediaHound (Post 1659480)
No, thats not my problem, read the post again please. The problem I speak of involves the old version that allowed one to link to specific members on the map. I run in the postbit a link for each member that filled the map a link to his pin on the map. The earlier version of this mod that I was running allowed those links to work. The update I did no longer lets those links work. Example of a link:
http://www.forums.com/vbgooglemapme....865128&zoom=10
That type of link would zoom in to said location. Now its just as if I were to pull up vbgooglemapme.php without passing the variables. The variables in the URL don't have any effect anymore. I wish they would. Have you got an idea to fix this please? Thanks in advance!

Quote:

Originally Posted by Falcon Capt (Post 1664839)
After a recent server move I am having the exact same issue. Anyone have any insight?

Bump.

Anyone have any insight on this issue?

Falcon Capt 11-15-2008 03:35 AM

Quote:

Originally Posted by MediaHound (Post 1659480)
No, thats not my problem, read the post again please. The problem I speak of involves the old version that allowed one to link to specific members on the map. I run in the postbit a link for each member that filled the map a link to his pin on the map. The earlier version of this mod that I was running allowed those links to work. The update I did no longer lets those links work. Example of a link:
http://www.forums.com/vbgooglemapme....865128&zoom=10
That type of link would zoom in to said location. Now its just as if I were to pull up vbgooglemapme.php without passing the variables. The variables in the URL don't have any effect anymore. I wish they would. Have you got an idea to fix this please? Thanks in advance!

Ok, got it fixed!

in vbgooglemapme.php find:

Code:

if ( isset($HTTP_GET_VARS["lng"]) && !empty($HTTP_GET_VARS["lng"]) && isset($HTTP_GET_VARS["lat"]) && !empty($HTTP_GET_VARS["lat"]) )
{
        $dlng = $HTTP_GET_VARS["lng"];
        $dlat = $HTTP_GET_VARS["lat"];
}
if (isset($HTTP_GET_VARS["zoom"]) && !empty($HTTP_GET_VARS["zoom"])) {
$zoomlevel = $HTTP_GET_VARS["zoom"];
}

and change it to:

Code:

if ( isset($_GET["lng"]) && !empty($_GET["lng"]) && isset($_GET["lat"]) && !empty($_GET["lat"]) )
{
        $dlng = $_GET["lng"];
        $dlat = $_GET["lat"];
}
if (isset($_GET["zoom"]) && !empty($_GET["zoom"])) {
$zoomlevel = $_GET["zoom"];
}

Hope this helps! :)

lpetrich 11-15-2008 09:18 AM

Falcon Capt, thanx for that patch. But the original code works fine in my installation. However, I haven't had such trouble with my site's installation of vbGoogleMap -- the location syntax works fine with it:

<forum root>/vbgooglemapme.php?lat=<latitude>&lng=<longitude>&z oom=<zoom value>

Try composing a URL with some latitude, longitude, and zoom values and see what happens.


In reference to crkgb's troubles, I added some Cyrillic text to the description text by copying and pasting some Cyrillic text from a text field elsewhere (Dashboard auto-translator widget). I used this Russian phrase:

Где я? (Gde ya? -- Where am I?)

It showed up without any trouble -- I tested it on the most recent OSX Firefox, Opera, and Safari, and also the most recent Windows Internet Explorer. It may be that crkgb's installation of vBulletin had been set to use a different character encoding; mine (talkrational.org) uses vBulletin's default, as far as I can tell.


It's possible to HTMLize the text that one inputs in the editor page; that involves changing this code in in vbgooglemap.php:

$title_map = $db->escape_string(trim($vbulletin->GPC['title_map']));
$text_map = $db->escape_string(trim($vbulletin->GPC['text_map']));

to:

$title_map = $db->escape_string(htmlspecialchars(trim($vbulletin->GPC['title_map']),ENT_QUOTES));
$text_map = $db->escape_string(htmlspecialchars(trim($vbulletin->GPC['text_map']),ENT_QUOTES));

I tried that, and it turns the Cyrillic characters into HTML-entity text, which is displayed in that fashion:
#1043;#1076;#1077; #1103;?
(initial &'s removed)

So using this fix would require reverting ZeroHour's fixes back to the original, and then editing all the users' map info -- one can do that if one had set one's privileges appropriately in the usergroups editor. ZeroHour's fixes are for composing markers.xml from the database info; users' web browsers then read markers.xml to find out which markers to display. I found htmlspecialchars in this PHP string-function reference, along with other PHP text-conversion functions.

Falcon Capt 11-15-2008 02:30 PM

Quote:

Originally Posted by lpetrich (Post 1666014)
Falcon Capt, thanx for that patch. But the original code works fine in my installation. However, I haven't had such trouble with my site's installation of vbGoogleMap -- the location syntax works fine with it:

<forum root>/vbgooglemapme.php?lat=<latitude>&lng=<longitude>&z oom=<zoom value>

Try composing a URL with some latitude, longitude, and zoom values and see what happens.

I did and had the same problem, the map would just open to the default settings. This problem occured after changing servers. The new server is running slightly different versions of Apache, PHP and MySQL. The fix I posted above took care of the issue and it is once again working fine.

MediaHound 11-16-2008 12:50 AM

Quote:

Originally Posted by Falcon Capt (Post 1665912)
Ok, got it fixed!

in vbgooglemapme.php find:

Code:

if ( isset($HTTP_GET_VARS["lng"]) && !empty($HTTP_GET_VARS["lng"]) && isset($HTTP_GET_VARS["lat"]) && !empty($HTTP_GET_VARS["lat"]) )
{
        $dlng = $HTTP_GET_VARS["lng"];
        $dlat = $HTTP_GET_VARS["lat"];
}
if (isset($HTTP_GET_VARS["zoom"]) && !empty($HTTP_GET_VARS["zoom"])) {
$zoomlevel = $HTTP_GET_VARS["zoom"];
}

and change it to:

Code:

if ( isset($_GET["lng"]) && !empty($_GET["lng"]) && isset($_GET["lat"]) && !empty($_GET["lat"]) )
{
        $dlng = $_GET["lng"];
        $dlat = $_GET["lat"];
}
if (isset($_GET["zoom"]) && !empty($_GET["zoom"])) {
$zoomlevel = $_GET["zoom"];
}

Hope this helps! :)

I am ever so grateful for this patch, good work. I would like to add to the record that in addition to the version upgrade of this mod, I did also do a server switch recently as well. As you experienced as well, I guess it may have been my server switch that caused this to stop working, not necessarily the version upgrade as I initially thought.

Good work once again Falcon Capt, bravo!

MediaHound 11-16-2008 01:06 AM

Quote:

Originally Posted by wrang (Post 1601943)
What do i do wrong when i get this error??

+1
I have the same issue on another board I just did a version upgrade.
I upgraded the version from 2.5.x to the latest version and went to run the scheduled task when it choked on this error:
Code:

Database error in vBulletin 3.6.8:

Invalid SQL:
SET NAMES 'utf8';

MySQL Error  : Unknown system variable 'NAMES'
Error Number : 1193

Did you perhaps get it fixed yet wrang?
:o

MediaHound 11-16-2008 01:19 AM

... all fixed.

To fix this SET NAMES error,
open /includes/cron/vbgooglemapme_cron.php
find line 29:
Code:

$vbulletin->db->query_first("SET NAMES 'utf8'");
change to:
Code:

//$vbulletin->db->query_first("SET NAMES 'utf8'");
All we did is comment it out.

lpetrich 11-20-2008 01:35 AM

Fix: added the ability to choose "Terrain" as a default map type:


In vbgooglemapme_admin.php

After line 39:
'3' => 'Satellite',
add
'4' => 'Terrain',


In vbgooglemapme.php

After line 73,
change
if ($maptype == 1)
{
$map_type = "{mapTypes:[G_NORMAL_MAP,G_SATELLITE_MAP,G_HYBRID_MAP]}";
}
...
}

to
switch ($maptype) {
case 1:
$map_type = "G_NORMAL_MAP";
break;
case 2:
$map_type = "G_HYBRID_MAP";
break;
case 3:
$map_type = "G_SATELLITE_MAP";
break;
case 4:
$map_type = "G_PHYSICAL_MAP";
break;
}



In product-vbgooglemapme.xml

change
map = new GMap2(document.getElementById("mapme"),$map_type);
to
map = new GMap2(document.getElementById("mapme"));
and likewise for "memap" instead of "mapme".

After
map.addMapType(G_PHYSICAL_MAP);
add
map.setMapType($map_type);


I'd earlier described my terrain fix, which involves adding the line
map.addMapType(G_PHYSICAL_MAP);
after each instance of
map = new GMap2(...);


All times are GMT. The time now is 12:48 PM.

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.03424 seconds
  • Memory Usage 1,768KB
  • 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
  • (7)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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