I have installed music online which users can hear online without any application from window. But I have problem that, I need some code to display online users in music box. So I had opened source/Boards.php and copy this code into music.php
QUOTE
//*********************************************/
// Add in show online users
//*********************************************/
$active = array( 'TOTAL' => 0 ,
'NAMES' => "",
'GUESTS' => 0 ,
'MEMBERS' => 0 ,
'ANON' => 0 ,
);
$stats_html = "";
if ($ibforums->vars['show_active'])
{
if ($ibforums->vars['au_cutoff'] == "")
{
$ibforums->vars['au_cutoff'] = 15;
}
// Get the users from the DB
$cut_off = $ibforums->vars['au_cutoff'] * 60;
$time = time() - $cut_off;
$DB->query("SELECT s.id, s.member_id, s.member_name, s.login_type, g.suffix, g.prefix
FROM ibf_sessions s
LEFT JOIN ibf_groups g ON (g.g_id=s.member_group)
WHERE running_time > $time
ORDER BY s.running_time DESC");
// cache all printed members so we don't double print them
$this->sep_char = trim( $this->html->active_list_sep() );
$cached = array();
while ($result = $DB->fetch_row() )
{
if ( strstr( $result['id'], '_session' ) )
{
if ( $ibforums->vars['spider_anon'] )
{
if ( $ibforums->member['mgroup'] == $ibforums->vars['admin_group'] )
{
$active['NAMES'] .= "{$result['member_name']}*{$this->sep_char} \n";
}
}
else
{
$active['NAMES'] .= "{$result['member_name']}{$this->sep_char} \n";
}
}
else if ($result['member_id'] == 0 )
{
$active['GUESTS']++;
}
else
{
if ( empty( $cached[ $result['member_id'] ] ) )
{
$cached[ $result['member_id'] ] = 1;
if ($result['login_type'] == 1)
{
if ( ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) and ($ibforums->vars['disable_admin_anon'] != 1) )
{
$active['NAMES'] .= "<a href='{$ibforums->base_url}showuser={$result['member_id']}'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>*{$this->sep_char} \n";
$active['ANON']++;
}
else
{
$active['ANON']++;
}
}
else
{
$active['MEMBERS']++;
$active['NAMES'] .= "<a href='{$ibforums->base_url}showuser={$result['member_id']}'>{$result['prefix']}{$result['member_name']}{$result['suffix']}</a>{$this->sep_char} \n";
}
}
}
}
$active['NAMES'] = preg_replace( "/".preg_quote($this->sep_char)."$/", "", trim($active['NAMES']) );
$active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON'];
}
//active users
and modified some area in skin_music.php so it could display active users. But it displayed the same active users in
http://domain.com/forum/index.php?act=idx (users online in the main board). I regconized that I have used the same code so they pick up the same data from database. Therefore, I want you to help me adding some code to seperate 2 location. One is in index.php?act=idx and last one is music index.php?act=Music. I meant that if users active in main board, it only would display the users activing in main board and if users active in music, it would display the users activiting in music. According to that. Active users in main board (index.php?act=idx) and active users in music are not the same one. If users are not in music so the active music board does not display their name. Finally, sorry for my English

.
Demo -->
http://khungtroinho.net/nhatky/index.php?act=Musicuser: test
pass: test