I have this mod installed and I was wondering if someone could help me with a problem.
I have a section of code at the top of this page which displays a news ticker. I have an option in User CP > Edit Options to enable this ticker on other areas of my forum. I have an <if> statement which checks for the profile field to be true and then shows the banner.
I've edited the vaispy.php file to include the ticker but how can I control who sees it via the profile field?
This is where the code is...
Code:
</script>
<title>bla bla bla</title>
</head>
<body onload="spyinit();">
$header
$navbar
$mgc_cb_evo_var <!-- shoutbox -->
<if condition="$vbulletin->userinfo['field6'] & YES">
<!-- code is inserted here -->
</if>
<table width="90%" align="center"><tr><td width="50%" align="left"><input type="checkbox" id="subscribe" value="1"> subscribed threads only</td>
<td width="50%" align="right">
<img id="vaplay" src="images/misc/play_down.gif" style="cursor:pointer;" alt="Play" title="Play Comments" onclick="playSpy();" />
<img id="vapause" src="images/misc/pause_up.gif" style="cursor:pointer;" alt="Pause" title="Pause Comments" onclick="pauseSpy();" />
</td></tr></table>
<br />
VAPRINT;
if (is_browser('opera'))
{
$output .= <<<VAPRINT
<table class="tborder" cellpadding="0" cellspacing="0" border="0" width="100%" align="center" id="spy_table">
<tr><td width="20" class="tcat" nowrap="nowrap" style="height:25px;"> </td>
<td class="tcat" width="225" nowrap="nowrap" style="height:25px;">By</td>
<td class="tcat" width="80%" style="height:25px;">Thread/Post</td>
<td class="tcat" width="200" nowrap="nowrap" style="height:25px;">Forum
</tr>
<tr><td colspan="4" class="alt1">
$prefetched
<div id="row21" style="display:none;" class="spyfade1"></div>
<div id="row22" style="display:none;" class="spyfade2"></div>
<div id="row23" style="display:none;" class="spyfade3"></div>
<div id="row24" style="display:none;" class="spyfade4"></div>
<div id="row25" style="display:none;" class="spyfade5"></div>
</td></tr>
</table>
VAPRINT;
}
else
{
$output .= <<<VAPRINT
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" id="spy_table">
<thead>
<tr align="center"><td class="thead" width="100">Event</td><td class="thead" width="190">By</td><td class="thead">Thread/Post</td><td class="thead" width="190">Forum</td></tr>
</thead>
<tbody class="alt1">
$prefetched
<tr id="row21" style="display: none;" class="spyfade1"><td align="center"> </td><td> </td><td> </td><td align="center"> </td></tr>
<tr id="row22" style="display: none;" class="spyfade2"><td align="center"> </td><td> </td><td> </td><td align="center"> </td></tr>
<tr id="row23" style="display: none;" class="spyfade3"><td align="center"> </td><td> </td><td> </td><td align="center"> </td></tr>
<tr id="row24" style="display: none;" class="spyfade4"><td align="center"> </td><td> </td><td> </td><td align="center"> </td></tr>
<tr id="row25" style="display: none;" class="spyfade5"><td align="center"> </td><td> </td><td> </td><td align="center"> </td></tr>
</tbody>
</table>
VAPRINT;
}
$output .= <<<VAPRINT
$footer
VAPRINT;
echo $output;
?>
I'm guessing the
$vbulletin->userinfo bit is not a known variable within this file so it's not working.
Any help would be appreciated.
Thanks