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)

snipeyhead 08-11-2008 12:20 PM

I had no expectation of the author helping. People were posting fixes, so I wanted to make it clear that the previous fixes were not helpful to my particular install, in case other people were having the same problem. And then when I found my own solution, I posted it - so people could benefit. Which is the whole point of having a forum. So whatever.

PoetJA-1975 08-11-2008 05:24 PM

Oh Pa! Get over yourself.
Obviously you'd expect a modification that is checked as supported to actually be supported - in this case it isn't so - I was simply stating that fact - So take that little attitude and 5 posts of yours and shove off somewhere.

Unsubscribed. A total waste of time anyway.

Jacquii.

snipeyhead 08-11-2008 05:32 PM

LOL nice attitude.

K4GAP 10-06-2008 01:11 PM

Does anyone know of anything similar to this that works? And, would work on 3.7?

MonkYZ 10-09-2008 05:46 AM

Thx ZerHour for the fix. Now inside the VBGooglemap page i get less errors (before i got like 29 errors, now only 2). Unfortunatelly, still no pins on the map (and i made markers.xml from zero).

The errors look like this (as you can notice there is still a "&" character which i suppose it's the culprit):
Code:

Line:921
Char:26
Code:0
Error:Object expected
URL:http://www.consolegames.ro/forum/vbgooglemapme.php?lat=44.4327992256&lng=26.0314178467&zoom=6

Code:

Line:1209
Char:3
Code:0
Error:Invalid pointer

URL:http://www.consolegames.ro/forum/vbgooglemapme.php?lat=44.4327992256&lng=26.0314178467&zoom=6

Can you please help me fix this ? Thank you in advance !

Quote:

Originally Posted by ZeroHour (Post 1456241)
Right I have my first fix. I will be editing this post with future changes so you can refer back to it and bookmark it by clicking the post number to the right.

Fix for no markers shown:

Edit:

/includes/functions_vbgooglemapme.php:

Goto line 49 which should start:
PHP Code:

$text_file .= "<marker mapid=\" 

Replace that line with:
PHP Code:

$text_file .= "<marker mapid=\""htmlspecialchars($get_xml_marker["mapid"])."\"  title_map=\"".htmlspecialchars($get_xml_marker["title_map"])."\" lng=\"".htmlspecialchars($get_xml_marker["lng"])."\" lat=\"".htmlspecialchars($get_xml_marker["lat"])."\" userid=\"".htmlspecialchars($get_xml_marker["userid"])."\" username=\"".preg_replace("/\n|\r\n|\r/""",nl2br(addslashes(htmlspecialchars(trim($get_xml_marker["username"])))))."\" text_map=\"".preg_replace("/\n|\r\n|\r/"""nl2br(addslashes(htmlspecialchars(trim($get_xml_marker["text_map"])))))."\" type=\"".htmlspecialchars($gettype['googlemapmetype'])."\" pimage=\"".htmlspecialchars($pimage)."\" />\n"


/includes/cron/vbgooglemapme_cron.php:

Goto line 58 which should start:
PHP Code:

$text_file .= "<marker mapid=\" 

Replace that line with:
PHP Code:

$text_file .= "<marker mapid=\"".htmlspecialchars($get_xml_marker["mapid"])."\"  title_map=\"".htmlspecialchars($get_xml_marker["title_map"])."\" lng=\"".htmlspecialchars($get_xml_marker["lng"])."\" lat=\"".htmlspecialchars($get_xml_marker["lat"])."\" userid=\"".htmlspecialchars($get_xml_marker["userid"])."\" username=\"".preg_replace("/\n|\r\n|\r/""",nl2br(addslashes(htmlspecialchars(trim($get_xml_marker["username"])))))."\" text_map=\"".preg_replace("/\n|\r\n|\r/"""nl2br(addslashes(htmlspecialchars(trim($get_xml_marker["text_map"])))))."\" type=\"".htmlspecialchars($gettype['googlemapmetype'])."\" pimage=\"".htmlspecialchars($pimage)."\" />\n"

Run the scheduled task and your markers should return.
Basically I have modified the code to replace things like "&" with the xml safe "&amp;" so no matter what anyone enters for the fields the xml should still be safe.

More tweaks to come including integration of the display groups being marker colour.


Cobra-J82 10-11-2008 06:24 AM

I have vb 3.7.3
After doing what ZeroHour Said
I'm still not able to view the pins
This is my Error Details:

Webpage Script Errors

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; InfoPath.2)
Timestamp: Sat, 11 Oct 2008 07:23:19 UTC

0.
Message: Invalid argument.
Line: 1285
Char: 3
Code: 0
URI: http://www.***********.com/vbgooglemapme.php

Would realy appreciate it if some one have an idea to fix this
Knowing that some guys with 3.7.3 VB have no problem at all.

Cobra-J82 10-12-2008 07:51 AM

Okay Guys
I think I know a Good solution for times Being
After u Do wat ZeroHour said regarding replacing the Code in the php files

Disable:
Enable or disable the small map control (disable for better performance)

And try It
If it didnt work
Disable:
Enable the mouseover support on the markers?

For me it worked Fine When I only Disabled:
Enable or disable the small map control (disable for better performance)

Cheers

MonkYZ 10-12-2008 11:54 AM

Thx Cobra-J82. That solved my problem too :)

lpetrich 10-28-2008 06:04 AM

ZeroHour's fix worked for me also. Thanx, ZeroHour, for going through all the trouble to come up with it.

And I've contributed some other fixes and additions in the 3.6 thread: VBGooglemap Member Edition

They are:

* In edit mode, the marker is always the vbGoogleMap red marker, instead of Google Maps's default marker.

* Mousewheel zooming is enabled.

* Terrain display is enabled.

* When mousing over does not make a vbGoogleMap info balloon, it instead makes a HTML-element title that contains the username. This fix thus produces the best of both worlds: a nondisruptive quick look, and a detailed info balloon with more info.

I haven't made terrain display an option for the default display, because I'd have to do a lot of tracking down of where it is set and handled and so forth.

I have also explored the feasibility of making markers draggable in edit mode. It is easy to set up a draggable marker; when you create it, include draggable:true in its marker options. But you also have to set up some event listeners for the marker's motions, and that's a bit trickier and more difficult to debug.

BTW, the site I'm a sysadmin of is at vBulletin 3.7.0 and I've had no troubles that can reasonably be attributed to vBulletin being at this version.

reactortrip 11-16-2008 04:01 PM

Anyone have any problems with this when someone has injected something into the api that causes it to link to a stupid anti virus site when you try to do anything with this hack? Where is the api key located in the database?


All times are GMT. The time now is 12:57 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.02929 seconds
  • Memory Usage 1,769KB
  • 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
  • (4)bbcode_php_printable
  • (1)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