View Full Version : Removing "New Posts" From Navbar
johnstires
08-19-2006, 10:36 PM
I tried to remove the "New Post" link from the navbar yet it messed up my search drop down menu functionality in IE.
This is what I am trying to remove:
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
and:
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
What am I doing wrong?
Stunner Inc.
08-20-2006, 12:30 AM
If you want to just remove the link:
Go to: Navigation/Breadcrumb Templates / navbar
Find and then remove the code in green or you could just easily place the <!-- & --> so you don't have to remove the code.
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<!-- <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if> -->
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
Hope I explained that right and it helps :)
Thankyou to LionDen for the info.
johnstires
08-20-2006, 11:36 AM
That worked great. However I am getting a stray "-->" on my page in IE. Also, in IE, the "New Post" does not go away.
I tried to delete the green code, but it mucks up the search dropdown on the navbar:
The code in green at the end is the stray characters that show on my page:
<!-- <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if> -->
Also, there are 2 places on the page where I need to apply this change.
Ntfu2
08-20-2006, 02:42 PM
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
Just remove that
johnstires
08-20-2006, 05:08 PM
It still keeps keeps the "Today's Posts" in the navbar. This is for IE only. When I remove this too, the search link looses it's popup feature in IE:
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
Kirk Y
08-20-2006, 08:23 PM
Find and Remove/Comment Out: (There are 2 instances of this code, only remove the first)
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
johnstires
08-20-2006, 10:21 PM
Thanks acidburn0520 but commenting out does not work with this code. I put <!-- and --> as tags, but the NEW POST and or TODAYS POST does not go away in IE.
WHen I remove the code entirely, the search link becomes a direct link to the search page and loses it's popup menu attribute.
Kirk Y
08-20-2006, 10:46 PM
Well that's strange. What version of vB are you running? Because I tested it on my 3.6.0 board, it worked fine; the Search dropdown still works.
Ntfu2
08-20-2006, 10:55 PM
Yea tested it with mine as well and everything acidburn and myself have suggested worked just fine.
Stunner Inc.
08-21-2006, 08:19 AM
My solution worked for me on 3.5.5 in IE. Sorry it didn't help you.
johnstires
08-21-2006, 12:06 PM
I am on 3.6.0 as well. I've been doing a ton of hacking to my navbar template, so it probably has to do with that. I am going to try to revert and rebuild it tonite. Maybe that will help. If not I'll post the code and maybe someone can spot something I am missing.
For those who say this worked you are on windows and using IE? It works fine in all other browsers, just not IE (of course that's 75% of my user base...)
Kirk Y
08-21-2006, 06:38 PM
I'm using IE7 and Firefox, both worked fine. If you'd make an admin account for me on your board, I'd be happy to take a look and see if I can find the problem.
johnstires
08-21-2006, 09:59 PM
It's weird. I tried removing the code on a default template and I got the same problem...
1. Search becomes a direct link to the search page, not a popup menu
2. Today's Post does not delete.
I'm using IE 5.2
Kirk Y
08-21-2006, 10:09 PM
Must be something on your end. Try clearing your cache and retrying?
johnstires
08-22-2006, 04:05 PM
I put a ticket in with the .com guys and I think it is straightened out. I still can't confirm whether this works on IE 5.2 or not. I'm having style issues with that browser version. I can't tell if my work's proxy server cache is cleared. If anyone has IE 5.2 and wants to go here:
http://www.prenatalyogacenter.com/forums/index.php
Let me know if it says "Mark Forums Read" on the right of the navbar or "search" with the triangle drop down on the right.
I want it to say search
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.