Topic: How would I...

Alright on my site i have the Modification for colored users on the online list, and etc. I want to be able to make it so when you hover your mouse over like an admin which is red, it will go to light red. the cs files have this in it:

.pun A:link, .pun A:visited {COLOR: #60A0DC}
.pun A:hover {COLOR: #80D6FF}

This guy I know made it so its like this as an extra:

.administrators A:link.username, .administrators A:visited.username {COLOR: #DB0000}
.administrators A:hover.username {COLOR: #DB3300}

.moderators A:link.username, .moderators A:visited.username {COLOR: #00CC33}
.moderators A:hover.username {COLOR: #00FF33}

How would I make .administrators? Because its .pun atm..

Re: How would I...

Anyone?

Re: How would I...

):

Re: How would I...

open index.php
find

if ($pun_config['o_users_online'] == '1')
{
        // Fetch users online info and generate strings for output
        $num_guests = 0;
        $users = array();
        $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

        while ($pun_user_online = $db->fetch_assoc($result))
        {
                if ($pun_user_online['user_id'] > 1)
                        $users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
                else
                        ++$num_guests;
        }

        $num_users = count($users);
        echo "\t\t\t\t".'<dd>'. $lang_index['Users online'].': <strong>'.$num_users.'</strong></dd>'."\n\t\t\t\t".'<dd>'.$lang_index['Guests online'].': <strong>'.$num_guests.'</strong></dd>'."\n\t\t\t".'</dl>'."\n";


        if ($num_users > 0)
                echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_index['Online'].': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n";
        else
                echo "\t\t\t".'<div class="clearer"></div>'."\n";

}

replace with

if ($pun_config['o_users_online'] == '1')
{
    // Fetch users online info and generate strings for output
    $num_guests = 0;
    $users = array();
    $result = $db->query('SELECT o.user_id, o.ident, u.group_id FROM '.$db->prefix.'online as o LEFT JOIN '.$db->prefix.'users as u ON u.id=o.user_id WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
            $users[] = "\n\t\t\t\t".'<dd class="g_'.$pun_user_online['group_id'].'"><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        else
            ++$num_guests;
    }

    $num_users = count($users);
    echo "\t\t\t\t".'<dd>'. $lang_index['Users online'].': <strong>'.$num_users.'</strong></dd>'."\n\t\t\t\t".'<dd>'.$lang_index['Guests online'].': <strong>'.$num_guests.'</strong></dd>'."\n\t\t\t".'</dl>'."\n";


    if ($num_users > 0)
        echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>'.$lang_index['Online'].': </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n";
    else
        echo "\t\t\t".'<div class="clearer"></div>'."\n";

}

then use

.g_groupid A:link, .g_groupid A:visited {COLOR: #DB0000}
.g_groupid A:hover {COLOR: #DB3300}

so .g_1 would be admins etc

That is just for the online list, not the username in posts etc.