I'm trying to make a custom BBcode to allow users to add a google map link and have it appear inline in their posts.
I created the BBcode and used the following replacement:
Quote:
<head>
<script src="http://maps.google.com/maps?file=api&v=2&key=mykeycode"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 500px; height: 300px"></div>
</body>
|
I then use the [map] tags I assigned for this and assign googlemaps URL, but alas the map does not appear as planned.
If I do a "select all" on the browser I can see the 500 x 300 px box, where the map should have appeared, highlighted in black so it's 'partially' working hehe.
Does anyone have any idea how I might go about implementing this? Has anyone actually done this? Any guidance would be much appreciated.
*
note: After some googling around I see that someone has managed to get thisgoing on Invision Power board so it must surely be possible for Vbulletin.
IPB example:
See here