miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

Integration into existing website

Author Jase
Guest
#1 | Posted: 7 Sep 2010 14:57 
I am trying to integrate MiniBB into an existing website and am struggling!

My current site is made in php with a header and footer file to template it so my first thought was just to have a require at the beginning of forum/index.php for ../header.php and one at the end for ../footer.php.

Using this method the forum displays fine BUT I get lots of Warning: Cannot modify header information - headers already sent errors when I try and post, login, logout etc. I tried moving the position of the require ../header.php around in the file and it removes some of the problems but not others so I gave up on that option.

I then decided to take the HTML from my template header and footer and paste these into forum/templates/main_header.html and forum/templates/main_footer.html which, again works well on the surface, but my site is quite dynamic and in my usual footer.php, for example, there is a call to a news script which displays the 3 most recent news topics and this then does not work (i.e it only ever shows the static HTML pasted).

Additionally, if I change the overall site template then I need to remember to change it in the forums as well which is a bit of a pain!

Is there an easy way of using an existing ../header.php and ../footer.php file with miniBB so when I change the one header.php file it changes for all pages and so the dynamic content in the those files is shown on the forum pages as well?

Many thanks
Jase

Author Paul
Lead Developer
#2 | Posted: 8 Sep 2010 04:02 
Here we have a related thread you may find solution in:

http://www.minibb.com/forums/7_2583_1.html

I also have given reply regarding header and footer integration in this thread:

Is there a way to integrate my header.php file?

If you search by "header" you will find a lot of related topics.

Author Jase
Guest
#3 | Posted: 8 Sep 2010 13:20 
Many thanks for your reply Paul - I did find that last night but, unfortunately, as I am defining the meta information in the header file this stops the forum meta information being displayed which I want to avoid.

I have found a way around it by using the above static HTML method with the dynamic news content now in an iframe so it displays properly but if anyone has a way of getting the MiniBB meta data to be included in a seperate header file that would be perfect!

Author Paul
Lead Developer
#4 | Posted: 9 Sep 2010 05:14 | Edited by: Paul 
There is definitely a way, but here you should perceive anything "as is" - you have your custom case, so either you rack our docs and forums develop it on your own, either hire us to do it for you. I can't provide exact solution without seeing exact codes and files, and even if I would check them out, it's not a free job.

Author marchal04
Registered
#5 | Posted: 4 Oct 2010 01:40 | Edited by: marchal04 
It depends. I suggest that the easiest way to do it is to actually integrate your website into the board. Just edit the templates to match your site. The way the board works makes your solution difficult, because the code of the board does not work well when there is html outputted before the code of the board executes on a page.

Author Guest
#6 | Posted: 18 Jan 2011 23:52 
i cant put the forum in my website ? i have to put my website in the forum ?

Author Bluesplayer
Registered
#7 | Posted: 19 Jan 2011 04:48 | Edited by: Bluesplayer 
It isn't that hard to include the minibb forum into an existing template, especially so if you use the old minibb design. All I did with my latest forum was to copy the source code of a page of my website that wasn't displaying much content - such as the contact page (only content was an iframe for the contact script hosted on another site). I then took all the code above the iframe and used it inside the 'main_header.html' file above the minibb forum code. Obviously I removed all the minibb code above the actual forum table and moved any minibb code such as meta tags / styling into the new so that it all works as it should. I disabled/altered parts of the forum styling.css so that there were no conflicts with the new styling, as the forum now uses 2 style.css files.

Likewise I did the footer by using all the code below the iframe and altering the main_footer.html so that all the minibb code now resides between the design that the rest of my site uses. Result is here.

I don't get any issues with anything and the forum seems to work perfectly.

Author Guest
#8 | Posted: 19 Jan 2011 06:18 
thanks.
I got it working, but i just used an iframe int the content div and it works almost perfect, thanks for the idea. I got to boggled in the codes messing with the header and footer, but im going to have to match the styles tho.

Author Bluesplayer
Registered
#9 | Posted: 19 Jan 2011 06:31 
Iframe? What about google sending visitors to the forum after some content has been crawled? Will they see the full design or will they link directly to the forum thereby not seeing the rest of your design?

Specific miniBB Support Forums / Specific / Integration into existing website Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB