PDA

View Full Version : second navbar: viewing per usergroup


BobbeeV
02-10-2010, 04:12 PM
This code worked until 4.0. I put it in the breadcrumbs>navbar template and whenever a usergroup signed on, they only saw the link that their group should see. This does not work anymore. Any ideas why?

<!-- second nav button row -->
<div align="center"><table class="tborder" cellpadding="2"cellspacing="3"border=0" width="90%" align="center" style="border-top-width:0px">
<tr>
<if condition="is_member_of($vbulletin->userinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio2/Audio2Phunt.html">Audio Resources for Purpose Hunters</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User2PHunter.html">File Resources for Purpose Hunters </a></td></if>

<if condition="is_member_of($vbulletin->userinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio3/Audio3trainedc.html">Audio Resources for Trained Coaches</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User3Trained.html">File Resources for Trained Coaches </a></td></if>
</tr>
<tr>
<if condition="is_member_of($vbulletin->userinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio4/Audio4Certs.html">Audio Resources for Certified Coaches</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User4Certifying.html">File Resources for Certified Coaches </a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 1, 4, 2, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio1/Audio1.html">Audio Resources</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 1, 2)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User1.html">File Resources</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 4, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User0Visitor.html">File Resources</a></td></if></tr>
</t></div>
<!-- / second nav button row -->

compwhizii
02-10-2010, 04:50 PM
I have a look at this thread (https://vborg.vbsupport.ru/showthread.php?t=231525) about conditionals. I haven't tested this, but it should work.

<!-- second nav button row -->
<div align="center"><table class="tborder" cellpadding="2"cellspacing="3"border=0" width="90%" align="center" style="border-top-width:0px">
<tr>
<vb:if condition="is_member_of($bbuserinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio2/Audio2Phunt.html">Audio Resources for Purpose Hunters</a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User2PHunter.html">File Resources for Purpose Hunters </a></td></vb:if>

<vb:if condition="is_member_of($bbuserinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio3/Audio3trainedc.html">Audio Resources for Trained Coaches</a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User3Trained.html">File Resources for Trained Coaches </a></td></vb:if>
</tr>
<tr>
<vb:if condition="is_member_of($bbuserinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio4/Audio4Certs.html">Audio Resources for Certified Coaches</a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User4Certifying.html">File Resources for Certified Coaches </a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 1, 4, 2, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio1/Audio1.html">Audio Resources</a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 1, 2)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User1.html">File Resources</a></td></vb:if>
<vb:if condition="is_member_of($bbuserinfo, 4, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User0Visitor.html">File Resources</a></td></vb:if></tr>
</t></div>
<!-- / second nav button row -->

borbole
02-10-2010, 05:01 PM
Also in addition I want to point out that <div align has been depricated. It would be better if you would use style instead, like this:
<div style = "margin:0; text-align: center;"> code here</div>

BobbeeV
02-10-2010, 07:16 PM
borbole, how do change my code for that?

--------------- Added 1265836632 at 1265836632 ---------------

I have a look at this thread (https://vborg.vbsupport.ru/showthread.php?t=231525) about conditionals. I haven't tested this, but it should work.

Should...but doesnt

borbole
02-10-2010, 07:36 PM
Simply replace <div align="center"> with <div style = "margin:0; text-align: center;"> at the very first line of your code, under the comment.

BobbeeV
02-10-2010, 08:55 PM
thanks!

Any idea why I keep getting this error?

The conditional on line 5 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.

--------------- Added 1265842550 at 1265842550 ---------------

oh, heres the code:

<!-- second nav button row -->
<div style = "margin:0; text-align: center;"><table class="tborder" cellpadding="2"cellspacing="3"border=1" width="90%" align="center" style="border-top-width:5px">
<tr>
<if condition="is_member_of($vbulletin->userinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio2/Audio2Phunt.html">Audio Resources for Purpose Hunters</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 11)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User2PHunter.html">File Resources for Purpose Hunters </a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio3/Audio3trainedc.html">Audio Resources for Trained Coaches</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 13)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User3Trained.html">File Resources for Trained Coaches </a></td></if>
</tr>

<tr>
<if condition="is_member_of($vbulletin->userinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio4/Audio4Certs.html">Audio Resources for Certified Coaches</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 12, 10, 9, 6)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User4Certifying.html">File Resources for Certified Coaches </a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 1, 4, 2, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/MP3/Audio1/Audio1.html">Audio Resources</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 1, 2)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User1.html">File Resources</a></td></if>
<if condition="is_member_of($vbulletin->userinfo, 4, 3, 5, 7)"><td class="vbmenu_control"><a href="http://www.purposefulcoach.com/PDF/User0Visitor.html">File Resources</a></td></if>
</tr>
</t></div>

<!-- / second nav button row -->