MyBB Community Forums

Full Version: Integrate MyBB fully into our Website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi All,

I have myBB 1.6.3 installed and running correctly but am now trying to work out how to fully integrate into our existing website. I would like it to exist withing a <div> on our standard page so that it looks fully integrated; same header, menu, quick links panel, floating footer etc. as the rest of our site.

I have followed the instructions here and have managed to get the login boxes on a custom page but as soon as they log in the get redirected to the standard myBB page with the large myBB logo etc. this is what I am trying to avoid.

Any ideas, is full integration even possible?
Basically what you need to do is open the "header" and "footer" templates and copy over your own site's header and footer, making sure you're including your CSS stylesheets and everything. After that, you need to open MyBB's global.css and fix all the conflicts.
1. Go to "ACP > Templates & Style > Templates > Global Templates > Add Template".

2. Name the template "homepage" and paste in this:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}

<div>YOUR DIV!</div>

<br style="clear: both" />
{$footer}
</body>
</html>

3. Upload the 3 files attached (you'll have to extract them first!) to your site root index replacing the current files.

You're done!

What've we done?

1. Copied the current index into forums.php.
2. Changed index.php to a version that shows the template "homepage" in the global templates.
3. Changed global.php so that the navigation will now redirect to forums.php instead of index.php.

If you want the header image to redirect to the forums instead of the homepage go to your themes "header" template and find "index.php" and replace it with "forums.php".

If you'd like me to do this for you just send me a PM.
(2011-05-15, 05:48 PM)CAwesome Wrote: [ -> ]Basically what you need to do is open the "header" and "footer" templates and copy over your own site's header and footer, making sure you're including your CSS stylesheets and everything. After that, you need to open MyBB's global.css and fix all the conflicts.

Where do I find the Header & Footer templates?

Thanks
(2011-05-15, 06:30 PM)Clarkie Wrote: [ -> ]1. Go to "ACP > Templates & Style > Templates > Global Templates > Add Template".

2. Name the template "homepage" and paste in this:
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body>
{$header}

<div>YOUR DIV!</div>

<br style="clear: both" />
{$footer}
</body>
</html>

3. Upload the 3 files attached (you'll have to extract them first!) to your site root index replacing the current files.

You're done!

What've we done?

1. Copied the current index into forums.php.
2. Changed index.php to a version that shows the template "homepage" in the global templates.
3. Changed global.php so that the navigation will now redirect to forums.php instead of index.php.

If you want the header image to redirect to the forums instead of the homepage go to your themes "header" template and find "index.php" and replace it with "forums.php".

If you'd like me to do this for you just send me a PM.

OK all done, thanks Clarkie. But I still don't see how this gets MyBB hosted within mystandard webpage or am I missing something?
Go to the ACP > Templates & Style > Templates > Global Templates > homepage > Edit Template

Now find <div>YOUR DIV!</div> and replace with your webpage.
(2011-05-16, 06:50 PM)Clarkie Wrote: [ -> ]Go to the ACP > Templates & Style > Templates > Global Templates > homepage > Edit Template

Now find <div>YOUR DIV!</div> and replace with your webpage.

Thanks Clarkie but this still looks like instructions on integrating my site within myBB rather than the other way around.

What I am trying to do which is to integrate myBB into my website. Keeping my Standard (<div> based) layout of myHeader, myMenu, MyQuickLinksPanel, MyFooter (floating) etc.
Urm it'd be hard to do that without making a whole theme for MyBB.

It's easier to do it this way.
(2011-05-17, 04:26 PM)Clarkie Wrote: [ -> ]Urm it'd be hard to do that without making a whole theme for MyBB.

It's easier to do it this way.

Thanks Clarkie. In that case perhaps myBB is not the right application for the task in hand. Does anyone know of any other Message Forums which do allow full integration with an existing website?

Thanks,
you need to follow CAwesome's post, not Clarkie's. CAwesome's post correctly makes MyBB look like your existing site, whereas Clarkie's makes your site look like MyBB.

The latter is the simpler method for making it all work together, but it is possible the other way.

What content do you have on your existing site? Do you have users, registrations, etc? Or is it static content? Can we have a URL so we know what we are working with?
Thanks pavemen, I have tried to follow CAwesome suggestion now. It appears that I can get my website code in a template which surrounds the myBB code. Problem is this myBB HTML does not sit nicely inside our <div> and much of it layers over the top of our existing layered <div>s.
Pages: 1 2