Navigation bar replacement.

Avatar

By falsky 17 June 2015 14:43

Member · 3 comments

I was just wondering, can I remove Luna's navigation bar and replace it with Bootstrap's navbar. The problem is that forum's index is .php and bootstrap's is .html. Can't I just somehow put them together or something?

Something like that: (Luna's)

$tpl_temp = '<div class="navbar navbar-default navbar-static-top">
	<div class="nav-inner">
		'.$menu_title.'
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
		</div>
		<div class="navbar-collapse collapse">
			<ul class="nav navbar-nav">'."\n\t\t\t\t\t\t".implode("\n\t\t\t\t", $links)."\n\t\t\t\t\t\t".'</ul>
            <ul class="nav navbar-nav navbar-right">
				'."\n\t\t\t\t\t\t".implode("\n\t\t\t\t", $usermenu)."\n\t\t\t\t\t\t".'
            </ul>
		</div>
	</div>
</div>';
$tpl_main = str_replace('<luna_navlinks>', $tpl_temp, $tpl_main);

To something like that: (Bootstrap's)

    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html">Sweet Life Roleplay</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="index.html">Avaleht</a>
                    </li>
                    <li>
                        <a href="services.html">Leht1</a>
                    </li>

My English is not the best, I'll try to explain other way as well. I want to make beautiful designed Bootstrap page, with a forum. Forum should be powered by ModernBB, because I like the design and code. 
I want my bootstrap navbar look like this:
3inevKW.png
.. and forum's navbar look like this:
DzcKWA9.png
So I kind of want them to look the same.

Yes, I'm asking for weird stuff and I'm sorry for that, but that's the way I am, haha.

Hope ya'll help me guys, I really want to finish this project real soon.

Best regards,
falsky

Avatar

By Yannick 17 June 2015 16:57

Administrator · 1,390 comments

You can use HTML in a PHP file (not the other way around). However, you don't need to change the core for that, simply change the style of the navbar in its CSS and add the menu links you want to the navbar.


You can do anything