Ich habe per dynamischen iFrame ein phpBB3-Forum in eine Seite eingebunden. Damit ich keine Sidebar habe und den iFrame direkt in der "Seite" habe, erstellte ich ein eigenes Template:
PHP
<?php
/*
Template Name: phpbb_forum
*/
get_header(); ?>
<div>
<!-- SX, Kejr : Iframe for forum ; height will be adapted as best -->
<!-- as possible to forum height -->
<!-- width is 100% of forum width ; after stripping of the unwanted -->
<!-- parts, that should be reasonable -->
<!-- Noframe-Text/Link required mainly for Google&Co -->
<iframe onload="javascript:parent.iFrameHeight('forum','forum');"
id="forum" name="forum"
src="../phpBB3/"
width="100%"
scrolling="no"
align="top"
frameborder="0"
class="wrapper">
<p>Ihr Webbrowser kann leider keine eingebetteten Frames anzeigen:
Sie können jedoch das eingebettete Forum über den folgenden Verweis
aufrufen: <a href="../phpBB3/" target="_forum">Forum</a></p>
</iframe>
<!-- EOF : SX, Kejr -->
<div id="container" class="one-column">
<div id="content" role="main">
<?php
/* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
get_template_part( 'loop', 'page' );
?>
<!-- SX, Kejr : Jscript-Funtion to autoadapt to forum size -->
<!-- will only work if we are on same domain !! -->
<script language="javascript" type="text/javascript">
function iFrameHeight(n,id) {
var h = 0;
if ( !document.all ) {
// this one seems now finally to work on any browser !
// tested with firefox, IE 7 (see below), opera, chrome and Windows Safari
h = document.getElementById(id).contentDocument.body.offsetHeight;
document.getElementById(id).style.height = h + 0 + 'px';
} else if( document.all ) {
// the IE way
h = document.frames(n).document.body.scrollHeight;
document.getElementById(id).style.height = h + 0 + 'px';
}
}
</script>
<!-- EOF: SX, Kejr -->
</div><!-- #content -->
</div><!-- #container -->
<?php get_footer(); ?>
Alles anzeigen
Leider wird am Ende der Seite der Titel "Forum" angezeigt. Wie bekomme ich den Titel nur von dieser Seite weg?
http://img263.imageshack.us/f/wpmod.jpg/
Leider bekomme ich über die SuFu nur Anleitungen für WP2.9 wo in der page.php noch ein parameter dafür steht - in 3.1 gibt es den aber dort nicht.