1 sven67 Nov 04, 2006 16:37
3 sven67 Nov 20, 2006 23:39
Oh, is there any idea for a non-php-guru (like me)?
Thanks, Sven
www.typ15.de
4 yabba Nov 23, 2006 15:23
Actually, I just had a better look at this.
What you can do is add the javascript to your skins _main.php and the body onload bits :-
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg"
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()">
Next you need to crack open conf/_formatting.php ( make a backup first huh) and find a line that looks like this :-
define('A_coreattrs', 'class title');
and change it to this :-
define('A_coreattrs', 'class title id style');
Then, in your post you can just use :-
<div id="map" style="width: 500px; height: 300px"></div>
¥
5 sven67 Nov 23, 2006 23:44
Thanks a lot, I will try that.
Sven
www.typ15.de
6 john Nov 24, 2006 00:54
Neat blog Sven
I love love those Vdubs.
7 bastox Mar 29, 2008 03:37
¥åßßå wrote:
Actually, I just had a better look at this.
What you can do is add the javascript to your skins _main.php and the body onload bits :-
<script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg" 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()">
Next you need to crack open conf/_formatting.php ( make a backup first huh) and find a line that looks like this :-
define('A_coreattrs', 'class title');
and change it to this :-
define('A_coreattrs', 'class title id style');
Then, in your post you can just use :-
<div id="map" style="width: 500px; height: 300px"></div>
¥
Hi there.
I'm running with the 1.10.2 version. That what it's written at the bottom of my page in the admin section.
b2evolution 1.10.2 – GPL License – ©2001-2002 by Michel V & others – ©2003-2007 by François Planque & others.
Anyway. I did not found that :
define('A_coreattrs', 'class title');
I had that :
define('A_coreattrs', 'class title'.( $posts_allow_css_tweaks ? ' id style' : '' ) );
And I changed into that :
define('A_coreattrs', 'class title id style'.( $posts_allow_css_tweaks ? ' id style' : '' ) );
That's working good. I've got the map. But now my question is :
How can I had some point in the map ?
I would like to add point in the map. With a description and with links to an entry and some picture.
Is it possible to do that ?
I haven't found a plug in fo that !
Cheers
Sorry, just seen this post.
One of the easiest ways is to add a new tag to the BB code plugin and use that to convert it to the javascript you want.
¥