I posted this in Charter members yesterday but no response :(, so I'll try here.
I have this code at the very bottom of my index.template.php file. SMF 1.1 RC2 Default theme
It is used to get a display for the number of chat users.
It currently doesn't cause any parse errors but it isn't being called on yet...
function template_flash_chat()
{
$chatrequest = db_query("
SELECT COUNT(*) AS numb
FROM XXXXXX_XXX_fc_connections
WHERE userid IS NOT NULL", __FILE__, __LINE__);
list ($chatcount) = mysql_fetch_row($chatrequest);
mysql_free_result($chatrequest);
if ( @$_GET['action'] != "chat" ) {
if ( $chatcount == "1" ) {
$singularplural1 = " is ";
$singularplural2 = "";
} else {
$singularplural1 = " are ";
$singularplural2 = "s";
}
return 'Currently there ' . $singularplural1 . ' <font color="#FF0000">' . $chatcount . ' User'.$singularplural2.' in The XXXX XXXXX Chat</font><br/>';
}
}
?>
This is what I am having trouble with:
I'd like the info to display under the " Total time logged in:" line in the user info box of the new default in rc2
I can't make the
template_flash_chat(), '</td>
work.
In my RC1 forum, it is set to display on the same line as the search box and coded like this:
<td align="left">', template_flash_chat(), '</td>
So where exactly would I place the code, and what exactly should it say in this instance?
Thanks,
Cowboy
Got it.
Fixed.