Topic: Pls Help : how to remove "Newest registered user"

Hi

i've just installed PunBB and love it ... however i have two questions.

I am using PunBB as a quasi-article manager and wish to further cut down minimise on it's features.

1. I wish to remove the bit that says "Newest registered user" as i don't want this to show.

2. Since there will only be a handful of moderators updating the forums, i want to remove the part that shows I.P address.

Please help / appreciated

Terry

Re: Pls Help : how to remove "Newest registered user"

1. not quite sure

2. Only mods and admins can see IPs

Re: Pls Help : how to remove "Newest registered user"

In index.php, remove line 208:

                <dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>

If you do that and then get a white (blank) screen when you reload the page, put <!-- --> around it like this:

                <!-- <dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd> -->

Re: Pls Help : how to remove "Newest registered user"

Thanks Heaps Scott
it worked like charm

Re: Pls Help : how to remove "Newest registered user"

how do you get rid of that whole box?

6 (edited by neubrain 2005-10-06 05:48)

Re: Pls Help : how to remove "Newest registered user"

hey Trance, I think you can hide IP information by the following:

in viewtopic.php

REPLACE

$user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

WITH

$user_info[] = '';

Note that there should be two replacements total in 'viewtopic.php'.

Re: Pls Help : how to remove "Newest registered user"

ross3093 wrote:

how do you get rid of that whole box?

in index.php

DELETE

<div id="brdstats" class="block">
    <h2><span><?php echo $lang_index['Board info'] ?></span></h2>
    <div class="box">
        <div class="inbox">
            <dl class="conr">
                <dt><strong><?php echo $lang_index['Board stats'] ?></strong></dt>
                <dd><?php echo $lang_index['No of users'].': <strong>'. $stats['total_users'] ?></strong></dd>
                <dd><?php echo $lang_index['No of topics'].': <strong>'.$stats['total_topics'] ?></strong></dd>
                <dd><?php echo $lang_index['No of posts'].': <strong>'.$stats['total_posts'] ?></strong></dd>
            </dl>
            <dl class="conl">
                <dt><strong><?php echo $lang_index['User info'] ?></strong></dt>
                <dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>
<?php

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";

}
else
    echo "\t\t".'</dl>'."\n\t\t\t".'<div class="clearer"></div>'."\n";


?>
        </div>
    </div>
</div>