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)

skcyber 10-18-2008 02:24 PM

on google map, i click on "link", then copy the Second line code "HTML"

and then paste in between the 2

exemple :

Quote:

[GMAP]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.fr/maps?f=q&amp;hl=fr&amp;q=Tour+Eiffel,+Paris,+Paris ,+Ile-de-France,+France&amp;ie=UTF8&amp;cd=1&amp;geocode=FV 2E6QIdVwIjAA&amp;ll=48.858072,2.294859&amp;spn=0.0 06295,0.006295&amp;output=embed&amp;s=AARTsJrhqdnz OeeswFdlcNNM6gKhvDTNsg"></iframe><br /><small><a href="http://maps.google.fr/maps?f=q&amp;hl=fr&amp;q=Tour+Eiffel,+Paris,+Paris ,+Ile-de-France,+France&amp;ie=UTF8&amp;cd=1&amp;geocode=FV 2E6QIdVwIjAA&amp;ll=48.858072,2.294859&amp;spn=0.0 06295,0.006295&amp;source=embed" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>[/GMAP]

I got the same thing than Saan...

segwayon 10-18-2008 03:10 PM

As a test, it would be good to use the URL source of those who CAN get the map-only to embed, to make sure it isn't something on our servers. The originator presents a grainy photo of the URL, but getting it in copy would be ideal.

I suspect that the parsing within this mod isn't polished enough to account for ALL the types of Google URLs out there.

Alfa1 10-18-2008 05:00 PM

This is really interesting. I hope someone can improve this. I was previously using Stonyarc his hack, but that is in the graveyard for a security flaw.

segwayon 10-19-2008 03:01 AM

From the best of my ability, here's the text of his HTML he got from Google (from his post #9 on page 1, URL = http://forums.tinet.org/showthread.php?t=103). Try to paste this into a posting on your server using the "GMAP" tags to see what you get. All that comes back for me a map of Spain centered on Madrid, and again with the Google headers at the top, not just a map. API key issue perhaps?

Quote:

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.es/maps/ms?ie=UTF8&amp;hl=ca&amp;t=h&amp;msa=0&amp;msid=10 4139708205298078957.00043d251afa29cec95f2&amp;ll=2 9.609115,50.196534&amp;spn=43.744536,100.744629&am p;output=embed&amp;s=AARTsJobPyLWsaJC_-0NDWUE45MwMMe4mQ"></iframe><br /><small><a href="http://maps.google.es/maps/ms?ie=UTF8&amp;hl=ca&amp;t=h&amp;msa=0&amp;msid=10 4139708205298078957.00043d251afa29cec95f2&amp;ll=2 9.609115,50.196534&amp;spn=43.744536,100.744629&am p;source=embed" style="color:#0000FF;text-align:left">Mostra un mapa m?s gran</a></small>

MrEyes 10-19-2008 06:56 PM

I have been running this mod for a few days and not found any of the issues that other people are describing. So here is some information that may or may not help other mod users:

1) The Google Maps API key is irrelevant to this mod and is a red herring
2) You have to get the code to embed from:

http://maps.google.com

Looking at the bbcode it seems that other Google domains (i.e. .es may work but I have not try this)

3) For my users I have created an FAQ that details exactly how to use the mod, see here for that:

http://www.therevcounter.com/faq/241...ads-posts.html

4) This is how I have the bbcode configured:

Title:
Google Map

BB Code Tag Name:
gmap

Replacement Code:
Code:

<script type="text/javascript">
function checkURL()
  {
      if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;}
      if (url.indexOf('&quot')>=0) {return false;}
      if (url.indexOf("http://maps.google")!=0){return false;}
      return true
  }

tot='{param}';
tot=tot.substr(tot.indexOf("src=&quot;")+10,tot.length);
url=tot.substr(0,tot.indexOf("&quot;"));
urlp=url.replace(/;amp;/g,';');
url=urlp;

if (checkURL())

    document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>');
}
else
{
document.write("<p><b>Wrong map URL, edit the post to change it.</b></p>Reload the page when finished to check if correct.");
}
</script>

Example
[gmap]iframe code[/gmap]

Description:
Embeds Google maps into posts. To use this find the map you want on Google Maps, click the link icon and select all text that is in the "Paste HTML to embed in website" section. Then paste into the post surround by [gmap][/gmap]

Use {option}:
No

Button Image (Optional)
I didn't define one, you can if you want

Remove Tag If Empty
Disable BB Code Within This BB Code
Disable Smilies Within This BB Code
Disable Word Wrapping Within This BB Code

All yes

segwayon 10-19-2008 11:00 PM

Quote:

Originally Posted by MrEyes (Post 1648458)
I have been running this mod for a few days and not found any of the issues that other people are describing. So here is some information that may or may not help other mod users:

1) The Google Maps API key is irrelevant to this mod and is a red herring
2) You have to get the code to embed from:

http://maps.google.com

Looking at the bbcode it seems that other Google domains (i.e. .es may work but I have not try this)

3) For my users I have created an FAQ that details exactly how to use the mod, see here for that:

http://www.therevcounter.com/faq/241...ads-posts.html

4) This is how I have the bbcode configured:

Title:
Google Map

BB Code Tag Name:
Code:

<script type="text/javascript">
function checkURL()
  {
      if ((url.indexOf("http://")!=url.lastIndexOf("http://"))||url.lastIndexOf("http://")!=0){return false;}
      if (url.indexOf('&quot')>=0) {return false;}
      if (url.indexOf("http://maps.google")!=0){return false;}
      return true
  }

tot='{param}';
tot=tot.substr(tot.indexOf("src=&quot;")+10,tot.length);
url=tot.substr(0,tot.indexOf("&quot;"));
urlp=url.replace(/;amp;/g,';');
url=urlp;

if (checkURL())

    document.write('<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+url+'"></iframe>');
}
else
{
document.write("<p><b>Wrong map URL, edit the post to change it.</b></p>Reload the page when finished to check if correct.");
}
</script>

Example
[gmap]iframe code[/gmap]

Description:
Embeds Google maps into posts. To use this find the map you want on Google Maps, click the link icon and select all text that is in the "Paste HTML to embed in website" section. Then paste into the post surround by [gmap][/gmap]

Use {option}:
No

Button Image (Optional)
I didn't define one, you can if you want

Remove Tag If Empty
Disable BB Code Within This BB Code
Disable Smilies Within This BB Code
Disable Word Wrapping Within This BB Code

All yes

Wow, it works now. All that was different before were the yes/no options in the BB code setup. Thanks, MrEyes!!

oasi 10-20-2008 05:23 AM

Thanks Mr Eyes,

I forgot to tell how to tune the other settings for the BBCode...
I'll update the main entrance.

I have'nt any API key or similar, this works using the embed option that google offers.

To the users having problems, please set the settings for the BBCode as follows:

Use {option}: -> No
Remove Tag If Empty -> Yes
Disable BB Code Within This BB Code -> Yes
Disable Smilies Within This BB Code -> Yes
Disable Word Wrapping Within This BB Code ->Yes

And then let me know if your problems persist...

For those having the Permission problems, test the above solution, and if the problem persists, could you do an "View source" and then paste the code for the tot variable here?

You can find : tot='
And then paste here the whole line...

Thanks

HCGB 10-20-2008 08:56 AM

I get the error "Wrong Map URL....."

map link code is:
Code:

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=107862149087073613526.00044b7d4c1dc31d40e5d&amp;t=h&amp;ll=53.384826,-1.69503&amp;spn=5.158155,2.562814&amp;output=embed&amp;s=AARTsJolE0Pef8rEmKk2Gs9h4BwtXXwYlQ"></iframe><br /><small><a href="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=107862149087073613526.00044b7d4c1dc31d40e5d&amp;t=h&amp;ll=53.384826,-1.69503&amp;spn=5.158155,2.562814&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>
The tot= lines from "View Source" are:
Code:

tot='<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=107862149087073613526.00044b7d4c1dc31d40e5d&amp;t=h&amp;ll=53.384826,-1.69503&amp;spn=5.158155,2.562814&amp;output=embed&amp;s=AARTsJolE0Pef8rEmKk2Gs9h4BwtXXwYlQ"></iframe><br /><small><a href="http://maps.google.com/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=107862149087073613526.00044b7d4c1dc31d40e5d&amp;t=h&amp;ll=53.384826,-1.69503&amp;spn=5.158155,2.562814&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>';
tot=tot.substr(tot.indexOf("src=&quot;")+10,tot.length);

I embed the exact same google link code into an HTML-enabled post I get the "Permissions..." error mentioned above.

oasi 10-20-2008 09:12 AM

It works for me... :confused:

I'm gone here:

http://maps.google.com/maps/ms?hl=en...dc31d40e5d&t=h

Clicked on the link button, and copied the content from the field: Paste HTML to embed in website

then I've pasted the content inside the

Please enter the BBCode definition for gmap and check these values are like here:

Use {option}: -> No
Remove Tag If Empty -> Yes
Disable BB Code Within This BB Code -> Yes
Disable Smilies Within This BB Code -> Yes
Disable Word Wrapping Within This BB Code ->Yes

If public, let me see your test page...

Leo Brazil 10-20-2008 11:15 AM

I've got running OK now. This is so cool !!!

Just one small thing, does someone here knows an instrution to include on the code to remove the hyperlinks from Google Maps before the gmap instruction ?

I'll tell you why, on my board I have to use "parse links automaticaly" so when I past the Google Map link it comes with the links and if I use it with the link parsed the BB Code doesn't work, so I have to remove the hyperlink manually. As most my users are hard to teach this sequence I was wondering about this solution to be inside of gmap BBCode it self.

Tks


All times are GMT. The time now is 04:25 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.01318 seconds
  • Memory Usage 1,784KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)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