Navigation
#1
Hi all,

I've been working on a forum embed, and once we got the site template into the MyBB system, I thought, why would I risk imperfections and update both the site and the forum if I could make it so the site uses the forum skin? Well, after a while, I came up with a code that would embed site pages into the MyBB template.

<?php

// Get access to MyBB stuff
define("IN_MYBB", 1);

chdir(board); // path to MyBB
require './global.php';

echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
<center>";
?>

<!-- ************************************************************************************************************* CONTENT BEGIN **** -->
        <?php
		include($pagename);
	?>	
<!-- ************************************************************************************************************* CONTENT END ****** -->

<?

echo "</center>
{$footer}
</body>
</html>";

?>
The code worked PERFECTLY, except, there was one problem. You see, the navigation for the forum is outputted with the tag <navigation>, and when you are not in MyBB, it can not interpret it and it marks it as invalid. Also, the <br/> which comes before it interferes with the site content. What I was wondering is, would anyone happen to know what could omit that line from pages that are not located in MyBB? Other than that, everything works perfectly, in terms of the forum embed.

Thanks,
BrandMan211
[Image: logo.png]
Reply


Messages In This Thread
Navigation - by BrandMan211 - 2007-10-12, 06:31 PM
RE: Navigation - by Ryan Ashbrook - 2007-10-12, 07:37 PM
RE: Navigation - by BrandMan211 - 2007-10-12, 07:45 PM
RE: Navigation - by Ryan Ashbrook - 2007-10-12, 07:47 PM
RE: Navigation - by BrandMan211 - 2007-10-12, 08:09 PM
RE: Navigation - by LeX- - 2007-10-12, 08:33 PM
RE: Navigation - by BrandMan211 - 2007-10-12, 08:36 PM
RE: Navigation - by LeX- - 2007-10-12, 08:43 PM
RE: Navigation - by BrandMan211 - 2007-10-12, 09:25 PM
RE: Navigation - by Ryan Ashbrook - 2007-10-15, 12:47 AM
RE: Navigation - by BrandMan211 - 2007-10-15, 12:52 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)