Quote:
Originally Posted by Alfa1
Since I have changed tabs some time ago, I am not using the tabbars hack, but have just put the conditionals in my navbar and have added the following to my additional CSS definitions:
Code:
td.tab a:link,td.tab a:visited,td.tab a:active,a.tab,
td.tab2 a:link,td.tab2 a:visited,td.tab2 a:active,a.tab2,a:link.tab2,a:active.tab2,a:visited.tab2{
background:transparent url(http://www.mysite.com/test/images/tabc.gif) top right no-repeat;
font:12px tahoma,sans-serif;
width:71px;
height:24px;
text-align:center;
padding:3px 0 0;
margin:0 1px;
text-decoration:none;
float:right;
position:relative;
top:3px
}
td.tab a:hover,img.tab a:hover,.tab a:hover,a:hover.tab,
td.tab2 a:link,td.tab2 a:visited,td.tab2 a:active,a.tab2,a:link.tab2,a:active.tab2,a:visited.tab2{
background:transparent url(http://www.mysite.com/test/images/tab2c.gif) top right no-repeat;
}
- How would this translate to my current set up?
- Am I correct to use the $viewcatid variable like this? This is how I currently have conditionals in my navbar:
PHP Code:
<if condition="$show['member']">
<table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-bottom-width:0px;color:white;">
<tr>
<td class="nowrap" align="right" valign="center" style="padding:0px 20px 0;color:white">
<if condition="in_array($viewcatid[catid], array(126,39, 43))"><a href="http://www.mysite.com/test/local_links.php?catid=126" title="Watch video's" id="mytab" class="tab2">Video</a><else /><a href="http://www.mysite.com/test/local_links.php?catid=126" title="Watch video's" id="mytab" class="tab">Video</a></if>
<if condition="in_array($viewcatid[catid], array(127,42, 61))"><a href="http://www.mysite.com/test/local_links.php?catid=127" title="Listen to podcasts, music" id="mytab" class="tab2">Audio</a><else /><a href="http://www.mysite.com/test/local_links.php?catid=127" title="Listen to podcasts, music " id="mytab" class="tab">Audio</a></if>
<if condition="in_array($viewcatid[catid], array(1 , 2, 3, 4 ,5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150))"><a href="http://www.mysite.com/test/local_links.php" title="Read research & information" id="mytab" class="tab2">Documents</a><else /><a href="http://www.mysite.com/test/local_links.php" title="Read research & information" id="mytab" class="tab">Documents</a></if>
</tr></table>
</if>
|
It's a bit difficult to help at a distance. $viewcatid is a variable, not an array, so you should make the test something like in_array($viewcatid, array (1,2,3,4,5)). If you've put this into the navbar template rather as plugins a la tabbar hack, this should work correctly within LDM. $viewcatid will be undefined outside LDM, so the test would give the answer 'false' in other parts of the board and not cause an error.
|