MyBB Community Forums

Full Version: Header classes.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am running a local build of myBB using the theme Frostv2. You can download it at Awesome Styles.

http://www.awesomestyles.com/mybb-themes/view/frost-v2

There is a lot of custom code in the Frostv2 headerinclude template that the developer forgot to remove when publishing. Inline moderation was not working until I replaced it with myBB's default headerinclude.

The code I extracted from the old headerinclude does not seem functional and might be too much. I just want Search, Member List, Calendar or Help to be highlighted if that is the page the user is on. Any help is appreciated!

<script> 
	$(document).ready(function(){
		$(".top-menu > .has-sub").click(function(){
			$(".is-sub").slideToggle();
		});
		
   $(".tab_content").hide(); 
   $("ul.tabs li:first").addClass("active").show();
   $(".tab_content:first").show(); 
   $("ul.tabs li").click(function() {
       $("ul.tabs li").removeClass("active"); 
       $(this).addClass("active"); 
       $(".tab_content").hide(); 
       var activeTab = $(this).find("a").attr("href"); 
       $(activeTab).fadeIn();
       return false;
   });
		});
</script>
<div id="header"> <div class="top-menu"> <li class="active"><a href="http://localhost/mybb">Forum</a></li> <!-- start: header_menu_search --> <li><a href="http://localhost/mybb/search.php" class="search">Search</a></li> <!-- end: header_menu_search --> <!-- start: header_menu_memberlist --> <li><a href="http://localhost/mybb/memberlist.php" class="memberlist">Member List</a></li> <!-- end: header_menu_memberlist --> <!-- start: header_menu_calendar --> <li><a href="http://localhost/mybb/calendar.php" class="calendar">Calendar</a></li> <!-- end: header_menu_calendar --> <li><a href="http://localhost/mybb/misc.php?action=help" class="help">Help</a></li> </div>