vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=193760

Google maps BBCode
by oasi
16 Oct 2008 11:41

Hi all

I've made a Custom BBcode to be able to insert any kind of google map into the forum posts, so the Plugins I tried were'nt working as we expected.

I post the code, I hope it can be useful for anyone.

Security problems, improvements and tunning will be apreciated...

I used the tag [gmap], and inside you have to copy the code for the HTML inclusion you can copy when you click the link icon in the map:

http://forums.tinet.org/images/usmapes.jpg


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The others settings for the BBCode are:

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

Please, mark as installed if it worked and you are using it.

Hope it helps! :)

GreasySpoon 16 Oct 2008 11:55

What kind of HTML code can be added? Every?

oasi 16 Oct 2008 12:43

No, it's to insert google maps references.

The javascript checks you're introducing a valid maps.google URL.

Into the image,the code you must paste is shown....

robbiefritz 16 Oct 2008 12:47

Super!

Leo Brazil 16 Oct 2008 16:34

Dude, this is awsome !!!

Let's see how it goes (intalling right now) and get back for a feedback.

Good job.

Feign 16 Oct 2008 17:11

Very good. Was looking for this a few weeks ago. This seems to work for all manner of Google Maps, including the "route" type ones which is good for planning weekend cruises!

sensimilla 16 Oct 2008 20:38

Any demo ? TIA

crkgb 16 Oct 2008 20:53

It iframes the entire page as I see. Is there a way to display just a map?

oasi 17 Oct 2008 06:05

As far as I know, it only iframes the map, if you tested and it appeared all the page, please send how you did it to parse this case....

Here is an example (it's in our local language, but the map is the map XD)

http://forums.tinet.org/showthread.php?t=103

skcyber 17 Oct 2008 13:30

hey guys, I got a problem using this wonderful code..

when I paste the html code (iframe...)

I have this message in the post :

Google
Error


Forbidden
Your client does not have permission to get URL /maps?f=q&hl=fr&geocode=&q=tour+eiffel+%20%20paris&ie=UTF8&ll=48.858072,2.294859& sp%20%20n=0.006295,0.006295&output=embed&s=AARTsJr%20%20CvdyoV0AZQw6_BVqD495b8b0 qyA from this server. (Client IP address: 82.238.112.139)

MrEyes 17 Oct 2008 15:30

This is great, thankyou very much for providing this.

I have been looking at doing it myself but could not find a secure solution that would prevent people embedding any link. Looking at the javascript it looks like this solves that problem

segwayon 17 Oct 2008 19:34

Quote:

Originally Posted by skcyber (Post 1646990)
hey guys, I got a problem using this wonderful code..

when I paste the html code (iframe...)

I have this message in the post :

Google
Error


Forbidden
Your client does not have permission to get URL /maps?f=q&hl=fr&geocode=&q=tour+eiffel+%20%20paris&ie=UTF8&ll=48.858072,2.294859& sp%20%20n=0.006295,0.006295&output=embed&s=AARTsJr%20%20CvdyoV0AZQw6_BVqD495b8b0 qyA from this server. (Client IP address: 82.238.112.139)

Me too.

As I recall, Google requires an API key on a server to dish out their maps. Any leads on this? I know their licensing levels for businesses is really steep.

safakuygur 17 Oct 2008 19:51

very nice
good
thanks

segwayon 17 Oct 2008 20:33

My first try was with a Google search on my town. It had one pin in the map. That URL got a permissions error from the Google server.

When I tried to paste in a URL with driving directions, it embedded the page, albeit in a small form, and with the driving directions hogging a lot of the IFRAME space. I can alter the scripts' width and height, but are there any pointers for embedding the map alone as showing on the Tinet.org website?

segwayon 17 Oct 2008 21:03

1 Attachment(s)
I'm attaching a "gmap.gif" button which I made for this BB Code, if anyone wishes to use it.


All times are GMT. The time now is 02:04.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.