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)

senadxxx 02-16-2009 11:47 PM

very good picture to google maps Enjoy

ozvr4com 02-28-2009 12:57 AM

Got it working, and its ACE! Thanks!

Defkalion 03-20-2009 09:36 AM

Very nice, installed.

Thankyou :)

BlueNinjaGo 03-20-2009 01:39 PM

Awesome... works... thanks!

cellarius 04-21-2009 07:04 AM

Works for me in all browsers (Firefox, Safari, Chrome, Opera) but in IE. In IE 7 and 8 I only get blank, white page inside the iframe. If I look at the source code of the iframe page, it seems to be there alright, but it displays as just plain white...

GeoMapia 04-23-2009 01:56 PM

Quote:

Originally Posted by cellarius (Post 1795747)
Works for me in all browsers (Firefox, Safari, Chrome, Opera) but in IE. In IE 7 and 8 I only get blank, white page inside the iframe. If I look at the source code of the iframe page, it seems to be there alright, but it displays as just plain white...

use this 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>

The others settings for the BBCode are:

Title:
Code:

Google Map
Tag:
Code:

GMAP
Sample:
Code:

[gmap]iframe code[/gmap]
Description:
Code:

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]iframe code[/gmap]
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 use this button on the message editor toolbar (16x16 Pixels | PNG transparent)

cellarius 04-26-2009 07:07 AM

Whereas the Code in the Firstpost worked in all browsers but IE, the code by GeoMapia does not work for me at all.

spillage 05-16-2009 08:16 PM

Are there any more revisions to this code?

I'm trying to get it to work on vB3.8, with little success.

I've tried each of the code examples and fixes posted here, and the best I get is for it to work in the BBCode test screen, but not in an actual post.

I noted that when I go back in to BBCode Manager to edit it, the "Example" code is cropped short of the full code originally pasted in that field, hence I never have a working example.

Any thoughts would be greatly appreciated.

THANK!

Sunka 05-16-2009 11:32 PM

This is work for me in vBulletin v3.8.2

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>


spillage 05-17-2009 01:14 PM

Thanks Sunka, that seems to initially work in the Test your BBCode area, but in an actual post I get the "Wrong map URL, edit the post to change it. Reload the page when finished to check if correct." error message.

On return to the BBCode Manager, and trying the Test your BBCode again, I also get the error there as well.

This is the sample map code used in all instances;
Code:

[gmap]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&amp;ll=2..."></iframe><br /><small><a href="http://maps.google.com/?ie=UTF8&amp;ll=2...p;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>[/gmap]
Also in the BBCode Manager window, the "Example" field doesn't work, as the code above gets trimmed when saved... and looks like this;
Code:

[gmap]<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="[URL]http://maps.google.com/?ie=UTF8&amp;ll=26.468114,-80.065699&amp;spn=0.024625,0.028195&a
Any further thoughts?


All times are GMT. The time now is 03:56 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.01136 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
  • (8)bbcode_code_printable
  • (1)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