Announcement

Collapse
No announcement yet.

moved navbar into header and now it doesn't display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [vB4] moved navbar into header and now it doesn't display

    Hi folks,

    On FORUMHOME I've cut {vb:raw navbar} and pasted it into my header template, now it isn't appearing at all and I can't find where it's going wrong. It's been years since I've worked on a vB theme and it feels like a lot has changed!

    Please find below my FORUMHOME and header templates:

    FORUMHOME
    HTML Code:
    {vb:stylevar htmldoctype}
    <html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
    	<head>
    		{vb:raw headinclude}
    		<title>{vb:raw vboptions.bbtitle}</title>
    		<vb:if condition="$vboptions['storecssasfile']">{vb:cssfile forumhome-rollup.css}<vb:else />{vb:cssfile forumbits.css,forumhome.css,widgets.css,sidebar.css,options.css,tagcloud.css}</vb:if>
    		<link rel="profile" href="http://gmpg.org/xfn/11" />
    		<link rel="pingback" href="http://mindfulmum.mumdadbabygroup.co.uk/xmlrpc.php" />
    		<link rel="shortcut icon" href="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/gfx/favicon.ico" />
    		<link rel="stylesheet" type="text/css" media="all" href="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/style.css" />
    		<!--[if lt IE 7.0]><link rel="stylesheet" type="text/css" media="all" href="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/css/style-ie6.css" /><![endif]-->
    		<!--[if gte IE 7.0]><link rel="stylesheet" type="text/css" media="all" href="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/css/style-ie7.css" /><![endif]-->
    		<!--[if IE]><![if !IE]><![endif]--><!--[if IE]><![endif]><![endif]-->
    		<style type="text/css" media="screen">
    
    		</style>
    		<!--[if lt IE 8]>{vb:cssfile forumbits-ie.css,sidebar-ie.css,options-ie.css}<![endif]-->
    		<vb:if condition="$show['sidebar']">
    		<script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></script>
    		<script type="text/javascript">
    			var sidebar_align = '{vb:raw show.sidebarposition}';
    			var content_container_margin = parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar padding}*2}}');
    			var sidebar_width = parseInt('{vb:stylevar forum_sidebar_width}');
    		</script>
    		<script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw vboptions.simpleversion}"></script>
    		</vb:if>
    		{vb:raw headinclude_bottom}
    	</head>
    	<body>
    
    	{vb:raw header}
    
    	<vb:if condition="$show['sidebar']">
    	<div id="content_container"<vb:if condition="$show['sidebarposition'] == 'left'"> class="contentright"</vb:if>>
    		<div id="content">
    	</vb:if>
    	<!-- main -->
            {vb:raw template_hook.forumhome_above_forums}
    	<ol id="forums" class="floatcontainer">
    		{vb:raw forumbits}
    	</ol>
            {vb:raw template_hook.forumhome_below_forums}
    	<!-- /main -->
    
        <div class="navlinks"> <a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}" rel="nofollow">{vb:rawphrase mark_forums_read}</a><vb:if condition="$vboptions['forumleaders']"> | <a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow"><vb:if condition="$vb_suite_installed">{vb:rawphrase view_site_leaders}<vb:else />{vb:rawphrase view_forum_leaders}</vb:if></a></vb:if></div>
    
    	{vb:raw forumhome_markread_script}
    
    	{vb:raw ad_location.board_after_forums}
    
    	<!-- what's going on box -->
    	<div id="wgo" class="collapse wgo_block block">
    		<h2 class="blockhead">{vb:rawphrase whats_going_on}</h2>
    		<div class="blockbody formcontrols floatcontainer">
    			{vb:raw template_hook.forumhome_wgo_pos1}
    			<vb:if condition="$show['loggedinusers']">
    			<!-- logged-in users -->
    			<div id="wgo_onlineusers" class="wgo_subblock section">
    				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase currently_active_users}" />{vb:rawphrase currently_active_users}</h3>
    				<div>
    					<p>{vb:rawphrase there_are_x_y_online_link, {vb:raw totalonline}, {vb:raw session.sessionurl}} <span class="shade">{vb:rawphrase x_members_and_y_guests, {vb:raw numberregistered}, {vb:raw numberguest}}</span></p>
    					<p>{vb:rawphrase most_users_ever_online_was_x_y_at_z, {vb:raw recordusers}, {vb:raw recorddate}, {vb:raw recordtime}}</p>
    					<vb:if condition="$activeusers">
    					<ol class="commalist" id="wgo_onlineusers_list">
    						{vb:raw activeusers}
    					</ol>
    					</vb:if>
    				</div>
    			</div>
    			<!-- end logged-in users -->
    			</vb:if>
    			{vb:raw template_hook.forumhome_wgo_pos2}
    			<vb:if condition="$show['upcomingevents']">
    			<div id="wgo_events" class="wgo_subblock section">
    				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}" /><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
    				<ol>
    					{vb:raw upcomingevents}
    				</ol>
    			</div>
    			</vb:if>
    			{vb:raw template_hook.forumhome_wgo_pos3}
    			<vb:if condition="$show['birthdays']">
    			<!-- today's birthdays -->
    			<div id="wgo_birthdays" class="wgo_subblock section">
    				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" />{vb:rawphrase todays_birthdays}</h3>
    				<ol class="commalist">
    					{vb:raw birthdays}
    				</ol>
    			</div>
    			<!-- end today's birthdays -->
    			</vb:if>
    			{vb:raw template_hook.forumhome_wgo_pos4}
    			<div id="wgo_stats" class="wgo_subblock section">
    				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/forum_stats.png" alt="{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}" />{vb:rawphrase x_statistics, {vb:raw vboptions.bbtitle}}</h3>
    				<div>
    					<dl>
    						<dt>{vb:rawphrase threads}</dt>
    							<dd>{vb:raw totalthreads}</dd>
    						<dt>{vb:rawphrase posts}</dt>
    							<dd>{vb:raw totalposts}</dd>
    						<dt>{vb:rawphrase members}</dt>
    							<dd>{vb:raw numbermembers}</dd>
    						<vb:if condition="$show['activemembers']">
                                                    <dt>{vb:rawphrase active_members}</dt>
                                                             <dd>{vb:raw activemembers}</dd>
                                                    </vb:if>
    					</dl>
    					<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
    					{vb:raw template_hook.forumhome_wgo_stats}
    				</div>
    			</div>
    			<div id="wgo_legend" class="wgo_subblock section">
    				<h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/legend.png" alt="{vb:rawphrase icon_legend}" />{vb:rawphrase icon_legend}</h3>
    				<div>
    					<dl id="icon_legends" class="icon_legends">
    						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_new-16.png" alt="{vb:rawphrase new_posts_forum}" /></dt><dd>{vb:rawphrase new_posts_forum}</dd>
    						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_old-16.png" alt="{vb:rawphrase no_new_posts_forum}" /></dt><dd>{vb:rawphrase no_new_posts_forum}</dd>
    						<dt><img src="{vb:stylevar imgdir_statusicon}/category-16.png" alt="{vb:rawphrase category_forum}" /></dt><dd>{vb:rawphrase category_forum}</dd>
    						<dt><img src="{vb:stylevar imgdir_statusicon}/forum_link-16.png" alt="{vb:rawphrase link_forum}" /></dt><dd>{vb:rawphrase link_forum}</dd>
    					<vb:if condition="$vboptions['pt_hasprojectforums']">
    						<dt><img src="{vb:stylevar imgdir_statusicon}/project_new-16.png" alt="{vb:rawphrase project_forum}" /></dt><dd>{vb:rawphrase project_forum}</dd>
    					</vb:if>
    					</dl>
    				</div>
    			</div>
    			{vb:raw template_hook.forumhome_wgo_pos5}
    		</div>
    	</div>
    	<!-- end what's going on box -->
    
    	{vb:raw ad_location.board_below_whats_going_on}
    	<vb:if condition="$show['sidebar']">
    		</div>
    	</div>
    
    	<div id="sidebar_container"<vb:if condition="$show['sidebarposition'] == 'left'"> class="sidebarleft"</vb:if>>
    		<a id="sidebar_button_link" href="#">
    			<vb:if condition="$show['sidebarposition'] == 'left'">
    			<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed-left.png" alt="" />
    			<vb:else />
    			<img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed.png" alt="" />
    			</vb:if>
    		</a>
    		<ul id="sidebar">
    			{vb:raw sidebar}
    		</ul>
    	</div>
    	</vb:if>
    
    	{vb:raw footer}
    </body>
    </html>
    header
    HTML Code:
    		<div class="page-width">
    			<div id="header">
    				<h1>{vb:raw vboptions.bbtitle}</h1>
    				<div class="top-bar">
    					<div class="left">
    						<p><a href="http://mindfulmum.mumdadbabygroup.co.uk/product-reviews/">Product Reviews</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;<a href="http://mindfulmum.mumdadbabygroup.co.uk/product-recalls/">Product Recalls</a>&nbsp;&nbsp;&nbsp;&nbsp;</p>
    						<vb:if condition="$vboptions['enablesearches']">
    						<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
    							<vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
    							<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
    							<input type="hidden" name="do" value="process" />
    							<label class="screen-reader-text" for="query">Search for:</label>
    							<input type="text" value="" name="query" class="textbox" tabindex="99"/>&nbsp;&nbsp;<input type="submit" id="searchsubmit" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/>
    						</form>
    						<p>[ <a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a> ]</p>
    						</vb:if>
    					</div>
    					<div class="right">
    						<p><a href="http://mindfulmum.mumdadbabygroup.co.uk/">Magazine</a>&nbsp;&nbsp;&#124;&nbsp;&nbsp;<a href="http://mindfulmum.mumdadbabygroup.co.uk/newsletter/">Newsletter</a>&nbsp;&nbsp;&nbsp;&nbsp;</p>
    						<div class="social"><a href="http://www.facebook.com/pages/Mindful-Mum/170228969960"><img src="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/gfx/facebook.png" /></a>&nbsp;&nbsp;<a href="http://www.twitter.com/mindfulmum/"><img src="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/gfx/twitter.png" /></a></div><br class="clear" />
    					</div><br class="clear" />
    				</div>
    				<div class="logo-bar">
    					<div class="home-link"><a href="http://mindfulmum.mumdadbabygroup.co.uk/" title="Mindful Mum"><img src="http://mindfulmum.mumdadbabygroup.co.uk/wp-content/themes/mindfulmum/files/gfx/clr.gif" alt="Mindful Mum" /></a></div>
    					<div class="forum-login">
    						
    						<vb:if condition="$show['member']">
    						<ul class="isuser">
    							<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
    							<vb:if condition="$show['registerbutton']"><li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li></vb:if>
    							<li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase control_panel}</a></li>
    							<li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
    							<vb:if condition="$notifications_total">
    							<li class="popupmenu notifications" id="notifications">
    								<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
    								<ul class="popupbody popuphover">
    									{vb:raw notifications_menubits}
    								</ul>
    							</li>
    							<vb:else />
    							<li class="popupmenu nonotifications" id="nonotifications">
    								<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
    								<ul class="popupbody popuphover">
    									<li>{vb:rawphrase no_new_messages}</li>
    									<li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li>
    								</ul>
    							</li>
    							</vb:if>
    							<li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
    							<vb:if condition="$vboptions['enablefacebookconnect']">
    								{vb:raw facebook_header}
    							</vb:if>
    						</ul>
    						{vb:raw template_hook.header_userinfo}
    						<vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>
    						<vb:else />
    						<ul class="nouser">
    							<vb:if condition="$show['registerbutton']"><li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li></vb:if>
    							<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
    							<li>
    						<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
    						<form id="navbar_loginform" action="login.php?{vb:raw session.sessionurl}do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
    							<fieldset id="logindetails" class="logindetails">
    								<div>
    									<div>
    								<input type="text" class="textbox<vb:if condition="!$username"> default-value</vb:if>" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" />
    								<input type="password" class="textbox" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
    								<input type="text" class="textbox default-value" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" />
    								<input type="submit" class="loginbutton" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
    									</div>
    								</div>
    							</fieldset>
    							<div id="remember" class="remember">
    								<label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label>
    							</div>
    			
    							<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
    							<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
    							<input type="hidden" name="do" value="login" />
    							<input type="hidden" name="vb_login_md5password" />
    							<input type="hidden" name="vb_login_md5password_utf" />
    						</form>
    						<script type="text/javascript">
    						YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
    						YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
    						vB_XHTML_Ready.subscribe(function()
    						{
    						//
    							YAHOO.util.Event.on('navbar_username', "focus", navbar_username_focus);
    							YAHOO.util.Event.on('navbar_username', "blur", navbar_username_blur);
    							YAHOO.util.Event.on('navbar_password_hint', "focus", navbar_password_hint);
    							YAHOO.util.Event.on('navbar_password', "blur", navbar_password);
    						});
    						
    						function navbar_username_focus(e)
    						{
    						//
    							var textbox = YAHOO.util.Event.getTarget(e);
    							if (textbox.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>')
    							{
    							//
    								textbox.value='';
    								textbox.style.color='{vb:stylevar toplinks_form_input.color}';
    							}
    						}
    			
    						function navbar_username_blur(e)
    						{
    						//
    							var textbox = YAHOO.util.Event.getTarget(e);
    							if (textbox.value == '')
    							{
    							//
    								textbox.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>';
    								textbox.style.color='{vb:stylevar toplinks_form_input_defaultValue.color}';
    							}
    						}
    						
    						function navbar_password_hint(e)
    						{
    						//
    							var textbox = YAHOO.util.Event.getTarget(e);
    							
    							YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "none");
    							YAHOO.util.Dom.setStyle('navbar_password', "display", "inline");
    							YAHOO.util.Dom.get('navbar_password').focus();
    						}
    			
    						function navbar_password(e)
    						{
    						//
    							var textbox = YAHOO.util.Event.getTarget(e);
    							
    							if (textbox.value == '')
    							{
    								YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
    								YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
    							}
    						}
    						</script>
    							</li>
    							<vb:if condition="$vboptions['enablefacebookconnect']">
    								{vb:raw facebook_header}
    							</vb:if>
    						</ul>
    						</vb:if>
    						
    					</div>
    				</div>
    				<div class="leaderboard">
    					<div class="advert"><iframe id='aaba8472' name='aaba8472' src='http://www.mumdadbabygroup.co.uk/ad-network/www/delivery/afr.php?zoneid=1&amp;cb=516390017' frameborder='0' scrolling='no' width='728' height='90'><a href='http://www.mumdadbabygroup.co.uk/ad-network/www/delivery/ck.php?n=a73798c1&amp;cb=1612087894' target='_top'><img src='http://www.mumdadbabygroup.co.uk/ad-network/www/delivery/avw.php?zoneid=1&amp;cb=260481168&amp;n=a73798c1' border='0' alt='' /></a></iframe></div>
    				</div>
    				<div class="nav-bar">
    					{vb:raw navbar}
    				</div>
    			</div>
    			<div id="content">
    If you visit the site (not yet public but you can visit it, please don't register) you'll notice I'm still hacking the styling to bits, I'm just trying to get my markup working first.

    Any idea what might be going wrong?


    Cheers,
    Robert

  • #2
    If you've had a look you'll have noticed that I've moved the navbar back into FORUMHOME, although I'd still like to get around this issue.


    Cheers,
    Robert

    Comment


    • #3
      I haven't looked at your code, because it makes me dizzy, but I was wondering if your class= value for the navbar is superceded or not recognized in its new position. I had a similar experience with widgets, and stumbled on that as the cause of the problem.

      Comment


      • #4
        Originally posted by jtp View Post
        I haven't looked at your code, because it makes me dizzy, but I was wondering if your class= value for the navbar is superceded or not recognized in its new position. I had a similar experience with widgets, and stumbled on that as the cause of the problem.
        Clarification: My widget did NOT include the correct "class=" value and therefore was not formatted properly and didn't display. It may be worth your while to determine if yours is CSS related. Good luck.

        Comment


        • #5
          that {vb:raw navbar}

          most probably cannot work in header template. it can only be use in forumhome template.
          Get Our New Flat Theme Pro Pack or Grab all 34 vb5.5.1 skins @sultantheme.com -vb3 responsive style or vb4 responsive style and vbcloud custom style

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X