vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   BB Code Enhancements - Google maps BBCode (https://vborg.vbsupport.ru/showthread.php?t=193760)

Leo Brazil 11-04-2008 01:41 PM

Oasi, after giving you some headaches to fix it and now that's is working great....

....I was thinking to my self yeasterday....How about to improve this BBCode or even a new one ? I mean, how about to include Google Earth on it ?

Just an idea...lol...

mattcaswell 11-15-2008 03:34 PM

Quote:

Originally Posted by oasi (Post 1656596)
I don't know why your gmap pasted code isn't chaged to html chars...

" should be "
< should ve &lt;

An easy "fix" would be to change this line in the code:

t_i="{param}";

to

t_i='{param}';

But if could fail if there is some ' char into the code of the map...

Try it...

This was the only way I could get this to work on my system. Thanks for all your hard work!

matt

CThiessen 11-19-2008 06:01 PM

Hi,
I head the following Problem .
If I test this BBCode in my "Admin Only" Part of the Forum everything was OK.
If I copied the Post to the Forum where I make Announcements it stops working.
Long time ago I set up this Forum with the Possibility of the use of HTML
this is not working together with this BBCode.
Just to let you know, maybe helps somebody if this is not running.
Best regards
Christian

aciurczak 11-20-2008 06:32 PM

How does it confirm that it is a valid google maps code? Looking at the code, one of the checks seems to be that the URL starts with http://maps.google, and it also confirms that there isn't any other http:// within the code. But if someone posted something like http://maps.google.evildomain.com, would that fail this check or would it be approved?

oasi 11-24-2008 05:40 AM

->Christian,

Could you copy the generated code to see what's wrong?

->aciurczak

The check would fail with the URL you posted, I know that this is not perfect :P
If you try to get a better security check for this please post it here to share it with us.

Thanks!

aciurczak 11-24-2008 06:22 AM

Quote:

Originally Posted by oasi (Post 1671797)
The check would fail with the URL you posted, I know that this is not perfect :P
If you try to get a better security check for this please post it here to share it with us.

Hi Oasi -

I changed that check to:

PHP Code:

if (u.indexOf("http://maps.google.com/")!=0){return false;} 

so the code has to include http://maps.google.com/, not just http://maps.google . Still not perfect, but a little better.

oasi 11-24-2008 06:38 AM

I hope all your users come from the US or UK ;-)

What about

http://maps.google.it/
http://maps.google.es/
http://maps.google.de/

If all of your users use the .com domain to insert the maps, it's a very valid solution...

Other option would be to check that after the http://maps.google. there are as maximum 4/5 characters, so only a domain could be included, or set an array of valid domains to check that the rest of the URL is one of the domains allowed.

aciurczak 11-24-2008 07:20 AM

Quote:

Originally Posted by oasi (Post 1671805)
I hope all your users come from the US or UK ;-)

I'm not worried about anything but .com yet. It will cover 95% of my users, and likely 100% of my users who would be prone to embedding a map. As soon as one of my users tries embedding a google map from a non .com address and runs into a problem, I'll deal with it then.

Also, even if the map or route is not in the US or UK, you can still use maps.google.com to map it or route it. Here's an example route from Berlin to Paris using maps.google.com. Yes, it's in English, but it still works fine.

zelnik 11-25-2008 01:00 PM

Great little code... two questions.

1> Is there a way of adding the directions to the map or a automatic link?
2> Why when i zoom into a map to the highest point can I not use the embed code?

Thanks marked as installed.

oasi 11-26-2008 06:09 AM

Quote:

1> Is there a way of adding the directions to the map or a automatic link?
I'm not suere if it's that you're asking, but you can add directions, routes or whatever the google maps app let you add. You only have to click the link button when you've finished adding the stuff and put this code into the [gmap] bbcode.

It's not possible to add the link, but you only have to add an html link below...

Quote:

2> Why when i zoom into a map to the highest point can I not use the embed code?
I've been able to add maps with the StreetView inclusive, but it's true that some maps does'nt have the "link" option to add the code to a web or a direct link. You'll have to ask google why, I don't know the reason :(


All times are GMT. The time now is 06:33 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.01110 seconds
  • Memory Usage 1,746KB
  • 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
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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