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.
  #31  
Old 21 Oct 2008, 11:14
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by oasi View Post
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...
I've set up a simple page that has the gmap code embedded with the Google map code HERE - sorry, my web programming skills aren't up to working out why it isn't recognising the URL
Reply With Quote
  #32  
Old 21 Oct 2008, 11:28
oasi oasi is offline
 
Join Date: Mar 2008
And you have edited the BBCode to set the values as I said??
Please, verify it, and tell me, I think that there could be a workaround, but I think the solution is on setting those values right.
Reply With Quote
  #33  
Old 21 Oct 2008, 12:09
AndyA AndyA is offline
 
Join Date: Apr 2005
It works great, shame it can't embed a route too. Thanks for the code.
Reply With Quote
  #34  
Old 21 Oct 2008, 12:27
oasi oasi is offline
 
Join Date: Mar 2008
Who said no routes??

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

Create your route and store it, and then click on the Link button and paste as in the examples...
Reply With Quote
  #35  
Old 21 Oct 2008, 12:29
AndyA AndyA is offline
 
Join Date: Apr 2005
Whoops, error on my behalf. It does show routes . . . I must have done something wrong.
Reply With Quote
  #36  
Old 21 Oct 2008, 12:45
AndyA AndyA is offline
 
Join Date: Apr 2005
Edit, answer found.

Last edited by AndyA; 21 Oct 2008 at 12:58.
Reply With Quote
  #37  
Old 21 Oct 2008, 14:08
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Originally Posted by HCGB View Post
I've set up a simple page that has the gmap code embedded with the Google map code HERE - sorry, my web programming skills aren't up to working out why it isn't recognising the URL
Just a tip, this BB Code doesn't work with Google Maps URL, it does work only with the HTML links with the Iframe instruction.
Reply With Quote
  #38  
Old 21 Oct 2008, 15:49
segwayon segwayon is offline
 
Join Date: Mar 2008
Originally Posted by oasi View Post
Who said no routes??

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

Create your route and store it, and then click on the Link button and paste as in the examples...
Any pointers on how to create a route in Google Maps? Great mod, oasi!
Reply With Quote
  #39  
Old 21 Oct 2008, 18:19
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by oasi View Post
And you have edited the BBCode to set the values as I said??
Please, verify it, and tell me, I think that there could be a workaround, but I think the solution is on setting those values right.
Yes, it is set up absolutely correctly. I have discovered some stuff that might shed light on my (and other's) problems:

The "Automatically parse links in text" option ALWAYS screws up the HTML code on the map page whenever the post edit box is loaded (it's too late even if you turn it off before saving the edit). You can either disable the function in the Vb Admin (not very convenient for users) or re-paste the Google map code into a post during editing.

If I use your code exactly as is it returns "Wrong Map URL..." every time. I've placed the code on a this page with the correct Google map code so you can view and debug the source (it doesn't seem to recognise the first search string?). Out of desperation, I modified the code to simplify it and tested it on this other page with exactly the same Google code and it seems to work OK (I've removed a couple of tests and avoided using &quot It's probably full of security holes as I'm no programmer

Another little vBulletin quirk is that any HTML code added to a post stays there even if your turn off "Allow HTML" in the forum properties. Handy if you want to add an HTML content post to a normally non-HTML forum!
Reply With Quote
  #40  
Old 21 Oct 2008, 18:34
saan saan is offline
 
Join Date: Aug 2004
Real name: Ruwen
Many Thanks for your additional BB-Code-Info!

It works!!!
Reply With Quote
  #41  
Old 21 Oct 2008, 19:00
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Originally Posted by HCGB View Post
Yes, it is set up absolutely correctly. I have discovered some stuff that might shed light on my (and other's) problems:

The "Automatically parse links in text" option ALWAYS screws up the HTML code on the map page whenever the post edit box is loaded (it's too late even if you turn it off before saving the edit). You can either disable the function in the Vb Admin (not very convenient for users) or re-paste the Google map code into a post during editing.

If I use your code exactly as is it returns "Wrong Map URL..." every time. I've placed the code on a this page with the correct Google map code so you can view and debug the source (it doesn't seem to recognise the first search string?). Out of desperation, I modified the code to simplify it and tested it on this other page with exactly the same Google code and it seems to work OK (I've removed a couple of tests and avoided using &quot It's probably full of security holes as I'm no programmer
I've mentioned this on last page.

Originally Posted by Leo Brazil View Post
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.
No idea so far. But I'm sure there must to be a way to include a string just at the beginning of this BBCode to unparse the links. I'm just trying to figure out each one.
Reply With Quote
  #42  
Old 22 Oct 2008, 06:28
mycitylive mycitylive is offline
 
Join Date: Nov 2007
Hallo please Help me i habe problem the google map

Error Message:

Wrong map URL, edit the post to change it.

Reload the page when finished to check if correct.
Reply With Quote
  #43  
Old 22 Oct 2008, 10:33
MrEyes MrEyes is offline
 
Join Date: Nov 2004
I have found another quirk that your users need to be aware of....

If they are using the enhanced WYSIWYG post editor this will automatically parse the links in the Google iframe code to include [noparse][URL][/URL][noparse] tags, this breaks the bbcode.

They need to change to the standard editor
Reply With Quote
  #44  
Old 22 Oct 2008, 11:37
mycitylive mycitylive is offline
 
Join Date: Nov 2007
Unfortunately I do not understand exactly what you mean because I can not so good English would be better for me, you can deuzsch Maybe it somewhat easier to explain.

Would be great thank you
Reply With Quote
  #45  
Old 22 Oct 2008, 14:57
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
[QUOTE=MrEyes;1650263]I have found another quirk that your users need to be aware of....

If they are using the enhanced WYSIWYG post editor this will automatically parse the links in the Google iframe code to include [noparse][URL][/URL][noparse] tags, this breaks the bbcode.

They need to change to the standard editor[/QUOTE]

This is exactly what I tried to describe. The point is using the standar editor really sucks and switching from standard do enhanced WYSIWYG also. The only "solution" I've found at this moment is never use quick reply editor, always Go Advanced, past Google link, select it all, click on Remove Links and after that use Google Maps BBcode.

If we had a string before this BBcode to remove the links from it would solve this issue at all.
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 22:46.

Layout Options | Width: Wide Color: