Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Google maps BBCode Details »
Google maps BBCode
Mod Version: 1.1, by oasi (Member) oasi is offline
Developer Last Online: Dec 2008 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (16 votes - 4.88 average) Installs: 85
Released: 16 Oct 2008 Last Update: Never Downloads: 4
Not Supported Re-usable Code Translations Is in Beta Stage  

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:




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!

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 17 Oct 2008, 22:36
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Originally Posted by crkgb View Post
It iframes the entire page as I see. Is there a way to display just a map?
I could reproduce this situation here. It gave me the intire page if I use a link that comes for the first page when you open googlemaps, like your country. If you get a close up one it gave me only the map.

Originally Posted by skcyber View Post
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)
I've got the same here. I don't know why but If use a code from anyplace in US it works fine but anything from out side like my country, it gives me the same error.
Any idea what could it be ?

If this problem can be solved this will be one of the best BBCode ever.

Tks
Reply With Quote
  #17  
Old 17 Oct 2008, 23:40
skcyber skcyber is offline
 
Join Date: Nov 2005
Originally Posted by Leo Brazil View Post
If this problem can be solved this will be one of the best BBCode ever.
yeah this would be the best BB code ever lol

I tried with the USA, it's working, but it doesn't store the zoom on the street.
Reply With Quote
  #18  
Old 18 Oct 2008, 04:40
segwayon segwayon is offline
 
Join Date: Mar 2008
I compared my HTML source with yours, and noticed that mine contains some extra space characters. Not sure if that matters or not, but here they are, represented by underline characters for ease of viewing:
  • &__amp;t=h
  • &a__mp;ll=38.1 . . .
  • &ou__tput=embed" . . .
  • &__amp;t=h
  • &so__urce=embed" . . .

The URL source from Google didn't contain any of these extra space characters.

On another note, would you mind sharing how you acquired the URL from Google? Did you use the "My Maps" feature? And do just plain driving directions embedd a map, too? Or a whole webpage as it does for me?

Thanks!
Reply With Quote
  #19  
Old 18 Oct 2008, 04:55
segwayon segwayon is offline
 
Join Date: Mar 2008
Originally Posted by Leo Brazil View Post
I could reproduce this situation here. It gave me the intire page if I use a link that comes for the first page when you open googlemaps, like your country. If you get a close up one it gave me only the map.



I've got the same here. I don't know why but If use a code from anyplace in US it works fine but anything from out side like my country, it gives me the same error.
Any idea what could it be ?

If this problem can be solved this will be one of the best BBCode ever.

Tks
I noticed that using a URL of just a town's location returned the forbidden permissions error, but using a URL of driving directions of maybe 80 miles embeds a whole page. Update: Page embeds also for a 1.6 mile drive.
Reply With Quote
  #20  
Old 18 Oct 2008, 13:08
saan saan is offline
 
Join Date: Aug 2004
Real name: Ruwen
Thank you very much for this bb-code, but mostly I got this

saanAttachment 88262
Attached Images
File Type: png gmapsample.png (46.1 KB, 90 views)
Reply With Quote
  #21  
Old 18 Oct 2008, 16:24
skcyber skcyber is offline
 
Join Date: Nov 2005
on google map, i click on "link", then copy the Second line code "HTML"

and then paste in between the 2

exemple :

[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=FV2E6QIdVwIjAA&amp;ll=48.858072, 2.294859&amp;spn=0.006295,0.006295&amp;output=embed&amp;s=AARTsJrhqdnzOeeswFdlcN NM6gKhvDTNsg"></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=FV2E6QIdVwIjAA&amp;ll=48.858072, 2.294859&amp;spn=0.006295,0.006295&amp;source=embed" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>[/GMAP]

I got the same thing than Saan...
Reply With Quote
  #22  
Old 18 Oct 2008, 17:10
segwayon segwayon is offline
 
Join Date: Mar 2008
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.
Reply With Quote
  #23  
Old 18 Oct 2008, 19:00
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
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.
Reply With Quote
  #24  
Old 19 Oct 2008, 05:01
segwayon segwayon is offline
 
Join Date: Mar 2008
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?

<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=104139708205298078957.00043d251a fa29cec95f2&amp;ll=29.609115,50.196534&amp;spn=43.744536,100.744629&amp;output=e mbed&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=104139708205298078957.00043d251a fa29cec95f2&amp;ll=29.609115,50.196534&amp;spn=43.744536,100.744629&amp;source=e mbed" style="color:#0000FF;text-align:left">Mostra un mapa més gran</a></small>

Last edited by segwayon; 19 Oct 2008 at 05:09.
Reply With Quote
  #25  
Old 19 Oct 2008, 20:56
MrEyes MrEyes is offline
 
Join Date: Nov 2004
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:

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

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

Last edited by MrEyes; 20 Oct 2008 at 09:51.
Reply With Quote
  #26  
Old 20 Oct 2008, 01:00
segwayon segwayon is offline
 
Join Date: Mar 2008
Originally Posted by MrEyes View Post
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:

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

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!!
Reply With Quote
  #27  
Old 20 Oct 2008, 07:23
oasi oasi is offline
 
Join Date: Mar 2008
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

Last edited by oasi; 20 Oct 2008 at 07:46.
Reply With Quote
  #28  
Old 20 Oct 2008, 10:56
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
I get the error "Wrong Map URL....."

map link code is:

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

The tot= lines from "View Source" are:

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

I embed the exact same google link code into an HTML-enabled post I get the "Permissions..." error mentioned above.
Reply With Quote
  #29  
Old 20 Oct 2008, 11:12
oasi oasi is offline
 
Join Date: Mar 2008
It works for me...

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...
Reply With Quote
  #30  
Old 20 Oct 2008, 13:15
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:49.

Layout Options | Width: Wide Color: