MyBB Community Forums

Full Version: Use Forum Header on My Main Site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello
I recently decided to look into new forums and have decided to go with MyBB, replacing phpBB3. So far I am extremely happy with my new forum. Right now I am working on making my main site look like the forum.
So I'm sure I could go through and figure out how to get the header and same look on my main site, but I was wondering if there was an easy solution to this already made up.

Thanks!
SkaFreaks
you can use code similar to below (not the exact)

<?php
define("IN_MYBB", 1);
require_once "mybb/global.php"; // <-- your forum path
echo $headerinclude;
echo $header;
echo ""; 
// <-- your main site index content
echo "";
echo $footer; // <-- if footer required
?>
@ranjani, I was also looking for something like this, thanks a lot +rep
Thanks for the post. I actually had the first three lines already on my page as part of the site integration. I have one other question that refers to the second line of code that you posted.
define("IN_MYBB", 1);
On this same line within the site integration instructions this line has 'NULL' instead of the '1'. Just wondering what this is for and if it matters if it is NULL or 1?

Thanks
SkaFreaks
It should be 1 but null may work. (I'd have to look at the code) You should use 1 anyway.
It tells the MyBB system that the said script is meant to be used with MyBB.
Thanks ranjani. I will save this for myself in the future Smile!
Well after getting the header working perfectly I started working on the content of the main page, and of course didn't really read everything when starting with mybb and my site uses lost of JQuery and it now clashes with Prototype. I tried doing the No.Conflict solution, but still wasn't working. I guess without a solution to that I'll have to stick with phpbb3. Kinda sad as I was really liking mybb.
I am concerned with how you wrote the last post.

You added the code into the script
jQuery.noConflict
correct?

I just saw you type no.conflict and wondered. IMO, you don't even need to use that method. You can modify your layout in your main site, take the images used, and just copy the CSS over.
I did put that line in the correct way. I don't know why I wrote it like that in the post. As for copying everything over, that would work if I was only using one layout. The whole purpose is so the user can select there choice of layouts and it will be that way throughout the entire site.
Oh - well that kind of complicates it Wink

I would really try to find a way to use MyBB. I started with phpBB3 similar to you, and I moved to MyBB and am super happy about it.
Pages: 1 2