Basically, I lifted the code from this modification, the first part that was supposed to be in BoardIndex.template.php (which puts the data at the bottom of the screen) and copied it into the default theme's index.template.php -- my addition is clearly marked:
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{
echo ' </span>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
<select name="cookielength">
<option value="60">', $txt['smf53'], '</option>
<option value="1440">', $txt['smf47'], '</option>
<option value="10080">', $txt['smf48'], '</option>
<option value="43200">', $txt['smf49'], '</option>
<option value="-1" selected="selected">', $txt['smf50'], '</option>
</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
// begin TC CARL mod move chat data up here
// users in chat
if(count($context['users_in_chat_links'])==0)
{
echo '<br />' . $txt['no_user_in_chat'];
}elseif(count($context['users_in_chat_links'])==1)
{
echo '<br /> 1' . $txt['user_in_chat']. '<br />', implode($context['users_in_chat_links']);
}else
{
echo '<br /> ' . count($context['users_in_chat_links']). $txt['users_in_chat']. '<br />', implode(', ', $context['users_in_chat_links']);
}
// end TC CARL mod move chat data up here
echo '
</td>';
//Welcome Ads
if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
The error I get in the forum error log is:
8: Undefined index: users_in_chat_links
File: /forum/Themes/default/Packages.template.php (eval?)
Line: 340
The file listed changes, it can be
File: /forum/Themes/default/Admin.template.php (eval?)
File: /forum/Themes/default/Errors.template.php (eval?)
File: /forum/Themes/default/Login.template.php (eval?)
File: /forum/Themes/default/Recent.template.php (eval?)
This was a cheap attempt to get the chat user data up into the header, and probably violates a boxful of rules. Maybe this is just a variable scoping issue, I seem to know enough to get myself in trouble, so I do all of this on a "practice" simulator site first. This might be the only sensible thing I do!
Carl