Google Earth API code is composed of two parts. One is two <script>s that needs to be within the <head> and the other is to be within a <div>.
The first <script> is a key that authorizes your web site while it is accessing the Google servers:
<script src="http://www.google.com/jsapi?key=YOUR_KEY_HERE"></script>
You can get your key here:
Sign Up for the Google Maps API - Google Maps API Family - Google Code
The second <script> is composed of functions that initialize GE on your web page. The minimal version of it is as follows:
<script type="text/javascript">
var ge;
google.load("earth", "1");
function init() {
google.earth.createInstance('map3d', initCallBack, failureCallBack);
}
function initCallBack(instance) {
ge = instance;
ge.getWindow().setVisibility(true);
}
function failureCallBack(errorCode) {
}
google.setOnLoadCallBack(init);
</script>
If desired, some extra codes can be added to make other GE layers or your map files to show up in the 3D Earth. Here are a lot of examples:
Google Earth API Developer's Guide - Google Earth API - Google Code
In phpBB, all these goes into the overall_header.html template since <head> is in that file.
The second part of the API is a simple <div> where the Earth will appear with an id "map3d" within the <body>:
<div id="map3d" style="height: 400px; width: 600px;"></div>
<body> needs this call:
<body onload="init()">
As an advanced usage, you can also add buttons or checkmarks to let the users turn on and off layers and features of GE like the navigation controls, the grids, the roads, international borders, that you can find their examples in the documentation.