MyBB Community Forums

Full Version: Add personal menu above mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a basic menu bar i have on my main site.

I would like to add that same bar above the header of the forums of mybb in

Kinda like just dropping the forums a few pixels to insert the menu bar. I have the code for the menu bar in a header shtml file that i add to all my html files. I dont know if there is a way to just add that included line somewhere in the code or not?

I tried adding
<!--#include virtual="/menu.shtml"-->
to the header section within ACP but it does not add my menu bar. The menu.shtml is in my root, but i am not sure how far back i need to go?
I went as far back one by one as
<!--#include virtual="../../../../../menu.shtml"-->
but i dont know what directory the header for the forums are in

I also tried path to relative root as well as php include
<!--#include virtual="/menu.shtml"-->
<?php include("/menu.shtml");?>
but that didnt work either
You can do it simply editing your header template from your ACP.
Check the menu links and add your own menu links with MyBB default menus.
If you really want to keep the menu separate this will work:

config.php (added)
$config['header'] = file_get_contents('../../menu.shtml');

You can then include this anywhere in your templates:
I get this error 
Warning [2] file_get_contents(../../menu.shtml): failed to open stream: No such file or directory - Line: 10 - File: inc/config.php PHP 5.5.9-1ubuntu4.13 (Linux)


on top of the forums showing when i add 
$config['header'] = file_get_contents('../../menu.shtml');
to inc/config.php

and the directory listing is 
metulburr /var/www/html $ ls
blog             favicon.ico  images      info.php  menu.shtml  testing_django
donations.shtml  forums       index.html  menu      pygame      trash

So it is 2 directories back. Why am i getting this error?
I am an idiot. I could of just used the full path
$config['header'] = file_get_contents('');

I got it to work
but it changes my header to larger font. Why is this and how can i change it?