Hi Hawk,
I'm trying to simply put the output in title tag like below, however, I'm just getting no echo.
Any thoughts on what I might be missing?
Thank you for your help.
Chris
HTML Code:
<a class="ajaxchat" style="float:left; position:relative; top:4px;" href="#" title="Chatting: {vb:raw chat_userlist}" onClick="ChatWindow=window.open('http://forums.usmilitarygamers.com/chat/index.php','ChatWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=800,height=600'); return false;">Chat ({vb:raw num_chatting})</a>
PHP Code:
$vbulletin;
$results = $vbulletin->db->query_read_slave("SELECT userName FROM ajax_chat_online");
while ($row = $vbulletin->db->fetch_array($results))
$chat_userlist[] = $row['userName'];
if (is_array($chat_userlist))
{
$chat_userlist = implode(', ', $chat_userlist);
$vbulletin->db->free_result($results);
}
else
{
// set $chat_userlist to a "no one chatting" message if you want, or leave blank.
$chat_userlist = '';
}
vB_Template::preRegister('header', array('chat_userlist' => $chat_userlist));