MyBB Community Forums

Full Version: Google Map Hyperlink Mini Maps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When posting a hyperlink to a Google Map route, most forums display a Google "Mini" Map that you can see the route/location you have highlighted and double click to take you to Google map or you can just move around the map in the post.

MyBB just shows the text link with no map.

Is there an easy way to do this that anyone is aware of? Needs to be easy to use as the end users are the ones who post the routes, not just the admins.

Thanks so much!

jg
Thanks for your response, querschlaeger. I actually saw that method in my numerous searches to find an answer to this issue, but how do I try to explain that to a non-computer-savvy readership?

I just need to know if there is a plugin or a mod that I can do that will allow the hyperlink to display like it does on other sites.
Well you could add a button to the editor with a map icon: [Image: favicon.ico] (Just an example, its the Google Maps favicon)

When clicking on it a popup will open with an input area (Description could be: "Please enter the name or address of a location you want to insert").

After that, it just inserts the location with this MyCode:

[map]New York[/map]

Just like the [ img ] buttons works in MyBB.
What about routes? We often do complex routes with a lot of way points (it is a MINI club-- we like to drive!).

The site is GAMINIAC.

Google Maps does this easily because you just click and drag the route to the road you want it to be on, but the method you describe would be tough as in many instances, the waypoint is just a random point on a road -- not an address. Getting members to figure out lat/long would be a bit tough, I am afraid.

The VBulletin boards that some clubs use work very simply... You just post the link and it shows the map. I am surprised that MyBB is not able to have the same. Googel Maps does the majority of the "work" when it comes to creating the maps, showing the routes, etc., I just need the mini map to display in the threads.

Your help is much appreciated! Smile
I can embed YouTube videos, wouldn't it be the same type of thing?
This is what you want:

Title
Google Maps
(or whatever you like)

Regular Expression
<a href="http[s]?://(|www\.|maps\.)google.([a-z]+)/(.*?)".*?>(.*?)</a>

Replacement
<object data="http://maps.google.$2/$3&amp;output=embed" type="text/html" width="640" height="480" class="map">
<a href="http://maps.google.$2/$3">$4</a>
</object>

With this MyCode any link to a google maps URL will be converted into an embeded map.
(2011-08-06, 03:41 PM)querschlaeger Wrote: [ -> ]This is what you want:

Title
Google Maps
(or whatever you like)

Regular Expression
<a href="http[s]?://(|www\.|maps\.)google.([a-z]+)/(.*?)".*?>(.*?)</a>

Replacement
<object data="http://maps.google.$2/$3&amp;output=embed" type="text/html" width="640" height="480" class="map">
<a href="http://maps.google.$2/$3">$4</a>
</object>

With this MyCode any link to a google maps URL will be converted into an embeded map.

Please forgive my ignorance, but where do I put that code?

I appreciate your help!

^ it needs to be added here :
admin panel --> configuration --> MyCode --> Add New MyCode

You guys rock! That worked perfectly!

Thanks!

This works great thanks but, if I use http://maps.google.co.uk it does not. Any chance you could add one for this TLD as my users would probably mostly use this?

Thanks in advance.