Topic: 5 little errors/things i need help with :)

hi there i've spent a lot of time modifying this amazing forum and i'm almost done but there's still 5 things i can't sort out

1. guests can view "User list" page (i want this off for guests)

2. guests can search (i want this off for guests)

3. weird menu on "User list" page and also "Online Users" page that's not on any other (i can't seem to figure how to take it off)
http://img176.imageshack.us/img176/206/46601312gt5.jpg

4. when a profile has an empty value it displays in there profile as "(Unknown)" and looks really bad

5. blogger section in profile that be turned off (as far as i know)

any help with these 5 things would make my day!!! wink

Re: 5 little errors/things i need help with :)

1. http://www.punres.org/viewtopic.php?id=3211
2. That's a user group permission, edit it through User groups in the administration panel
3. That's not standard PunBB, ask the person who made whatever version you downloaded
4. What would you rather it say?
5. Same as #3

Re: 5 little errors/things i need help with :)

wow fast repy!!

1. worked perfect!
2. worked perfect!
3. are the "User list" page and "Active Members" not parts of punbb? if not i can't find them on punres.org
4. i think it'd be best to not show the options if the user didn't enter any smile
5. again i can't find this on punres.org :\

Re: 5 little errors/things i need help with :)

The userlist is standard, but the menu thingy isn't.

5 (edited by steve51184 2008-03-18 18:32)

Re: 5 little errors/things i need help with :)

elbekko wrote:

The userlist is standard, but the menu thingy isn't.

ahh right :\

here is my online.php file

<?php

define('PUN_ALT4',1);

define ('PUN_ROOT', './');

require PUN_ROOT.'include/common.php';



if ($pun_user['is_guest'] && $pun_user['g_read_board'] == '0')

        message($lang_common['No permission']);





// Load the userlist.php language file



require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';

// Load the online.php language file

require PUN_ROOT.'lang/'.$pun_user['language'].'/online.php';



$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_online['Online List'];

require PUN_ROOT.'header.php';

?>

<div class="blocktable">

    <h2><span><?echo $lang_online['Online List']?></span></h2>

    <div class="box">

        <div class="inbox">

            <table cellspacing="0">

            <thead><tr>

                <th scope="col"><?php echo $lang_common['Username'] ?></th>

                <th scope="col"><?php echo $lang_online['Last action'] ?></th>

                <th scope="col"><?php echo $lang_online['Time'] ?></th>

<?if($pun_user['g_id'] <= PUN_MOD):?>                <th class="tcr" scope="col"><?php echo $lang_online['IP'] ?></th><?echo"\n";endif?>

            </thead>

            <tbody>

<?php





// Grab the users

$result = $db->query('SELECT * FROM '.$db->prefix.'online WHERE user_id > 0 AND idle=0 ORDER BY ident') or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

$num_users_page = $db->num_rows($result);



if ($num_users_page) {

  while ($num_users_page--) {

   $user_data = $db->fetch_assoc($result);

    if ($user_data['current_page']) {

        echo"\t\t\t\t".'<tr>'."\n";

        

    if ($user_data['user_id'] > 1) 

          echo "\t\t\t\t\t".'<td><a href="'.PUN_ROOT.'profile.php?id='.$user_data['user_id'].'">'.$user_data['ident'].'</a></td>'."\n";

    else 

        echo "\t\t\t\t\t".'<td>'.$lang_online['Guest'].'</td>'."\n";



$pathinfo = pathinfo($user_data['current_page']);

$current_page = $pathinfo['basename'];



if ($user_data['current_page_id'] > 0) {

    if ($current_page == "viewtopic.php" || $current_page == "post.php") { $current_page_name = $db->query('SELECT subject FROM '.$db->prefix.'topics WHERE id=\''.$user_data['current_page_id'].'\'') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error()); }

    if ($current_page == "viewforum.php") { $current_page_name = $db->query('SELECT forum_name FROM '.$db->prefix.'forums WHERE id=\''.$user_data['current_page_id'].'\'') or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error()); }

    if ($current_page == "profile.php") { $current_page_name = $db->query('SELECT username FROM '.$db->prefix.'users WHERE id=\''.$user_data['current_page_id'].'\'') or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); }

    if ($current_page == "post.php" || $current_page == "edit.php") { echo"\t\t\t\t\t".'<td>'.$lang_online[$user_data['current_page']].': <b><a href="'.PUN_ROOT.'viewtopic.php?id='.$user_data['current_page_id'].'">'.$db->result($current_page_name, 0).'</a></b></td>'."\n";}

    else { echo"\t\t\t\t\t".'<td>'.$lang_online[$user_data['current_page']].': <b><a href="'.$user_data['current_page'].'?id='.$user_data['current_page_id'].'">'.$db->result($current_page_name, 0).'</a></b></td>'."\n";}



}else if ((@$lang_online[$user_data['current_page']]) == '')

        echo"\t\t\t\t\t".'<td>'.$lang_online['Hiding Somewhere'].'</td>'."\n";

    else

        echo"\t\t\t\t\t".'<td><a href="'.$user_data['current_page'].'">'.$lang_online[$user_data['current_page']].'</a></td>'."\n";    





echo"\t\t\t\t\t".'<td>'.format_time($user_data['logged']).'</td>'."\n";



if ($pun_user['g_id'] <= PUN_MOD) echo"\t\t\t\t\t".'<td><a href="'.PUN_ROOT.'admin_users.php?show_users='.$user_data['current_ip'].'">'.$user_data['current_ip'].'</a></td>'."\n";

echo"\t\t\t\t".'</tr>'."\n";

} } }

else { echo "\t\t\t\t".'<tr><td colspan="4">'.$lang_online['No users'].'</td>'."\n\t\t\t\t".'</tr>'."\n"; }

?>

            </tbody>

            </table>

        </div>

    </div>

</div>



<?php

require PUN_ROOT.'footer.php';

here is my userlist.php file


<?php

define('PUN_ALT4',1);



if (isset($_GET['bloggers']))

{

define('PUN_ROOT', './');

require PUN_ROOT.'include/common.php';

require PUN_ROOT.'include/blog.php'; 



define('PUN_BLOG', 1);

if ($pun_user['g_read_board'] == '0')

    message($lang_common['No view']);





// Load the userlist.php language file

require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';



// Load the search.php language file

require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';





// Determine if we are allowed to view post counts

$show_post_count = ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST) ? true : false;



$username = (isset($_GET['username']) && $pun_user['g_search_users'] == '1') ? pun_trim($_GET['username']) : '';

$show_group = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']);

$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_blogs')) ? 'username' : $_GET['sort_by'];

$sort_dir = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']);





$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['User list'];

if ($pun_user['g_search_users'] == '1')

    $focus_element = array('userlist', 'username');



define('PUN_ALLOW_INDEX', 1);

require PUN_ROOT.'header.php';



?>

<div class="blockform">

    <h2><span><?php echo $lang_search['User search'] ?></span></h2>

    <div class="box">

    <form id="userlist" method="get" action="blog.php">

        <div class="inform">

            <fieldset> <input type="hidden" name="bloggers" value="bloggers" />

                <legend><?php echo $lang_ul['User find legend'] ?></legend>

                <div class="infldset">

<?php if ($pun_user['g_search_users'] == '1'): ?>                    <label class="conl"><?php echo $lang_common['Username'] ?><br /><input class="textbox" type="text" name="username" value="<?php echo pun_htmlspecialchars($username) ?>" size="25" maxlength="25" /><br /></label>

<?php endif; ?>                    <label class="conl"><?php echo $lang_ul['User group']."\n" ?>

                    <br /><select class="textbox" name="show_group">

                        <option value="-1"<?php if ($show_group == -1) echo ' selected="selected"' ?>><?php echo $lang_ul['All users'] ?></option>

<?php



$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());



while ($cur_group = $db->fetch_assoc($result))

{

    if ($cur_group['g_id'] == $show_group)

        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";

    else

        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";

}



?>

                    </select>

                    <br /></label>

                    <label class="conl"><?php echo $lang_search['Sort by']."\n" ?>

                    <br /><select class="textbox" name="sort_by">

                        <option value="username"<?php if ($sort_by == 'username') echo ' selected="selected"' ?>><?php echo $lang_common['Username'] ?></option>

                        <option value="registered"<?php if ($sort_by == 'registered') echo ' selected="selected"' ?>><?php echo $lang_common['Registered'] ?></option>

                        <option value="num_blogs"<?php if ($sort_by == 'num_blogs') echo ' selected="selected"' ?>>No of blogs</option>

                    </select>

                    <br /></label>

                    <label class="conl"><?php echo $lang_search['Sort order']."\n" ?>

                    <br /><select class="textbox" name="sort_dir">

                        <option value="ASC"<?php if ($sort_dir == 'ASC') echo ' selected="selected"' ?>><?php echo $lang_search['Ascending'] ?></option>

                        <option value="DESC"<?php if ($sort_dir == 'DESC') echo ' selected="selected"' ?>><?php echo $lang_search['Descending'] ?></option>

                    </select>

                    <br /></label>

                    <p class="clearb"><?php echo $lang_ul['User search info'] ?></p>

                </div>

            </fieldset>

        </div>

        <p><input class="button" type="submit" name="search" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

    </form>

    </div>

</div>

<?php





// Create any SQL for the WHERE clause

$where_sql = array();

$like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE';



if ($pun_user['g_search_users'] == '1' && $username != '')

    $where_sql[] = 'u.username '.$like_command.' \''.$db->escape(str_replace('*', '%', $username)).'\'';

if ($show_group > -1)

    $where_sql[] = 'u.group_id='.$show_group;



// Fetch user count

$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users AS u WHERE u.num_blogs>0 AND u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '')) or error('Unable to fetch user list count', __FILE__, __LINE__, $db->error());

$num_users = $db->result($result);





// Determine the user offset (based on $_GET['p'])

$num_pages = ceil($num_users / 50);



$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];

$start_from = 50 * ($p - 1);



// Generate paging links

$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir));





?>

<div class="linkst">

    <div class="inbox">

        <p class="pagelink"><?php echo $paging_links ?></p>

    </div>

</div>



<div id="users1" class="blocktable">

    <h2><span><?php echo $lang_common['User list'] ?></span></h2>

    <div class="box">

        <div class="inbox">

        <table cellspacing="0">

        <thead>

            <tr>

                <th class="tcl" scope="col"><?php echo $lang_common['Username'] ?></th>

                <th class="tc2" scope="col"><?php echo $lang_common['Title'] ?></th>

                <th class="tc3" scope="col"><?php echo $lang_common['Blogs'] ?></th>

                <th class="tcr" scope="col"><?php echo $lang_common['Registered'] ?></th>

            </tr>

        </thead>

        <tbody>

<?php



// Grab the users

$result = $db->query('SELECT u.id, u.username, u.title, u.num_blogs, u.registered, g.g_id, g.g_user_title, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.num_blogs>0 AND u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());

if ($db->num_rows($result))

{

    while ($user_data = $db->fetch_assoc($result))

    {

        $user_title_field = get_title($user_data);



?>

                <tr>

                    <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'"><span style="color:'.$user_data['g_color'].'">'.pun_htmlspecialchars($user_data['username']).'</span></a>' ?></td>

                                <!-- Give Admins and Mods Some Color -->
                        <?php
                        if ($user_title_field == $lang_common['Administrator']) {
                                ?><td class="tc2"><font color="<?php echo $lang_common['Admin Title Color'] ?>"><b><?php echo $user_title_field ?></b></font></td><?php 
                        }
                        elseif ($user_title_field == $lang_common['Moderator']) {
                                ?><td class="tc2"><font color="<?php echo $lang_common['Mod Title Color'] ?>"><b><?php echo $user_title_field ?></b></font></td><?php
                        }
                        else { ?><td class="tc2"><?php echo $user_title_field ?></td><?php }
                        ?>
            <!-- End of the color thing -->

<?php if ($show_post_count): ?>                    <td class="tc3"><?php echo $user_data['num_blogs'] ?></td>

<?php endif; ?>

                    <td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>

                </tr>

<?php



    }

}

else

    echo "\t\t\t".'<tr>'."\n\t\t\t\t\t".'<td class="tcl" colspan="'.(($show_post_count) ? 4 : 3).'">'.$lang_search['No hits'].'</td></tr>'."\n";



?>

            </tbody>

            </table>

        </div>

    </div>

</div>



<div class="linksb">

    <div class="inbox">

        <p class="pagelink"><?php echo $paging_links ?></p>

    </div>

</div>

<?php



require PUN_ROOT.'footer.php';

    

}



else

{

define('PUN_ROOT', './');

require PUN_ROOT.'include/common.php';





if ($pun_user['g_read_board'] == '0')

    message($lang_common['No view']);





// Load the userlist.php language file

require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';



// Load the search.php language file

require PUN_ROOT.'lang/'.$pun_user['language'].'/search.php';

require PUN_ROOT.'lang/'.$pun_user['language'].'/profile.php';



// Determine if we are allowed to view post counts

$show_post_count = ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST) ? true : false;



$username = (isset($_GET['username']) && $pun_user['g_search_users'] == '1') ? pun_trim($_GET['username']) : '';

$show_group = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']);

$sort_by = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$show_post_count)) ? 'username' : $_GET['sort_by'];

$sort_dir = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']);





$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['User list'];

if ($pun_user['g_search_users'] == '1')

    $focus_element = array('userlist', 'username');



define('PUN_ALLOW_INDEX', 1);

require PUN_ROOT.'header.php';



?>

<div class="blockform">

    <h2><span><?php echo $lang_search['User search'] ?></span></h2>

    <div class="box">

    <form id="userlist" method="get" action="userlist.php">

        <div class="inform">

            <fieldset>

                <legend><?php echo $lang_ul['User find legend'] ?></legend>

                <div class="infldset">

<?php if ($pun_user['g_search_users'] == '1'): ?>                    <label class="conl"><?php echo $lang_common['Username'] ?><br /><input class="textbox" type="text" name="username" value="<?php echo pun_htmlspecialchars($username) ?>" size="25" maxlength="25" /><br /></label>

<?php endif; ?>                    <label class="conl"><?php echo $lang_ul['User group']."\n" ?>

                    <br /><select class="textbox" name="show_group">

                        <option value="-1"<?php if ($show_group == -1) echo ' selected="selected"' ?>><?php echo $lang_ul['All users'] ?></option>

<?php



$result = $db->query('SELECT g_id, g_title FROM '.$db->prefix.'groups WHERE g_id!='.PUN_GUEST.' ORDER BY g_id') or error('Unable to fetch user group list', __FILE__, __LINE__, $db->error());



while ($cur_group = $db->fetch_assoc($result))

{

    if ($cur_group['g_id'] == $show_group)

        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'" selected="selected">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";

    else

        echo "\t\t\t\t\t\t".'<option value="'.$cur_group['g_id'].'">'.pun_htmlspecialchars($cur_group['g_title']).'</option>'."\n";

}



?>

                    </select>

                    <br /></label>

                    <label class="conl"><?php echo $lang_search['Sort by']."\n" ?>

                    <br /><select class="textbox" name="sort_by">

                        <option value="username"<?php if ($sort_by == 'username') echo ' selected="selected"' ?>><?php echo $lang_common['Username'] ?></option>

                        <option value="registered"<?php if ($sort_by == 'registered') echo ' selected="selected"' ?>><?php echo $lang_common['Registered'] ?></option>

<?php if ($show_post_count): ?>                        <option value="num_posts"<?php if ($sort_by == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option>

<option value="num_blogs"<?php if ($sort_by == 'num_blogs') echo ' selected="selected"' ?>>No. of blogs</option>

<?php endif; ?>                    </select>

                    <br /></label>

                    <label class="conl"><?php echo $lang_search['Sort order']."\n" ?>

                    <br /><select class="textbox" name="sort_dir">

                        <option value="ASC"<?php if ($sort_dir == 'ASC') echo ' selected="selected"' ?>><?php echo $lang_search['Ascending'] ?></option>

                        <option value="DESC"<?php if ($sort_dir == 'DESC') echo ' selected="selected"' ?>><?php echo $lang_search['Descending'] ?></option>

                    </select>

                    <br /></label>

                    <p class="clearb"><?php echo $lang_ul['User search info'] ?></p>

                </div>

            </fieldset>

        </div>

        <p><input class="button" type="submit" name="search" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>

    </form>

    </div>

</div>

<?php





// Create any SQL for the WHERE clause

$where_sql = array();

$like_command = ($db_type == 'pgsql') ? 'ILIKE' : 'LIKE';



if ($pun_user['g_search_users'] == '1' && $username != '')

    $where_sql[] = 'u.username '.$like_command.' \''.$db->escape(str_replace('*', '%', $username)).'\'';

if ($show_group > -1)

    $where_sql[] = 'u.group_id='.$show_group;



// Fetch user count

$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'users AS u WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '')) or error('Unable to fetch user list count', __FILE__, __LINE__, $db->error());

$num_users = $db->result($result);





// Determine the user offset (based on $_GET['p'])

$num_pages = ceil($num_users / 50);



$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];

$start_from = 50 * ($p - 1);



// Generate paging links

$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir));





?>

<div class="linkst">

    <div class="inbox">

        <p class="pagelink"><?php echo $paging_links ?></p>

    </div>

</div>



<div id="users1" class="blocktable">

    <h2><span><?php echo $lang_common['User list'] ?></span></h2>

    <div class="box">

        <div class="inbox">

        <table cellspacing="0">

        <thead>

            <tr>

                <th class="tcl" scope="col"><?php echo $lang_common['Username'] ?></th>

                <th class="tc2" scope="col"><?php echo 'Group Title'; ?></th>

            <th class="tc4" scope="col">Avatar</th>

            <th class="tc3" scope="col">Karma</th>

<?php if ($show_post_count): ?>                <th class="tc3" scope="col"><?php echo $lang_common['Posts'] ?></th>                                    

<?php endif; ?>                <th class="tcr" scope="col"><?php echo $lang_common['Registered'] ?></th>

                     <th class="tcr" scope="col"><?php echo $lang_profile['Country'] ?></th>

                     <th class="tcr" scope="col"><?php echo $lang_common['Blogs'] ?></th>

            </tr>

        </thead>

        <tbody>

<?php



// Grab the users

$result = $db->query('SELECT u.karma, u.id, u.num_blogs, u.username, u.title, u.num_posts, u.registered, u.use_avatar, u.country, g.g_id, g.g_user_title, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());



if ($db->num_rows($result))

{

    while ($user_data = $db->fetch_assoc($result))

    {

        $user_group = $user_data['g_user_title'];

        $user_title_field = get_title($user_data);

        $user_country = $user_data['country'];

        $user_avatar = '';

        

 

        if ($pun_config['o_avatars'] == '1' && $user_data['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')

        {

            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$user_data['id'].'.gif'))

                $user_avatar = '<a href="profile.php?id=' . $user_data['id'] . '"><img src="'.$pun_config['o_avatars_dir'].'/'.$user_data['id'].'.gif" '.$img_size[3].' title="'.$user_data['username'].'\'s Avatar" alt="'.$user_data['username'].'\'s Avatar" /></a>';

            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$user_data['id'].'.jpg'))

                $user_avatar = '<a href="profile.php?id=' . $user_data['id'] . '"><img src="'.$pun_config['o_avatars_dir'].'/'.$user_data['id'].'.jpg" '.$img_size[3].' title="'.$user_data['username'].'\'s Avatar" alt="'.$user_data['username'].'\'s Avatar" /></a>';

            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$user_data['id'].'.png'))

                $user_avatar = '<a href="profile.php?id=' . $user_data['id'] . '"><img src="'.$pun_config['o_avatars_dir'].'/'.$user_data['id'].'.png" '.$img_size[3].' title="'.$user_data['username'].'\'s Avatar" alt="'.$user_data['username'].'\'s Avatar" /></a>';

        }

        else

            $user_avatar = '<a href="profile.php?id=' . $user_data['id'] . '"><img alt="" src="img/noimage.gif" /></a>';



?>

                <tr>

                    <td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'"><span style="color:'.$user_data['g_color'].'">'.pun_htmlspecialchars($user_data['username']).'</span></a>' ?><br /><?php echo $user_title_field ?></td>

        <td class="tc2"><?php echo $user_group ?></td>

        <td class="tc4"><?php echo $user_avatar ?></td>

        <td class="tc3"><?php echo $user_data['karma'] ?></td>

<?php if ($show_post_count): ?>

        <td class="tc3"><?php echo $user_data['num_posts'] ?></td>

<?php endif; ?>

        <td class="tcr"><?php echo format_time($user_data['registered'], true) ?></td>

        <td class="tcr">

<?php if ( $user_country != '' ) {

echo '<img src="./img/flags/'.$user_country.'.png" alt="'.$user_country.'" title="'.$user_country.'" />'; 

}else {

echo '<img src="./img/flags/no_flag.png" alt="no flag selected" title="no flag selected" />';

} 

 ?>

        </td>







<?php if ($show_post_count): ?>                    <td class="tc3"><?php echo $user_data['num_blogs'] ?></td>

<?php endif; ?>

            </tr>

<?php



    }

}

else

    echo "\t\t\t".'<tr>'."\n\t\t\t\t\t".'<td class="tcl" colspan="'.(($show_post_count) ? 4 : 3).'">'.$lang_search['No hits'].'</td></tr>'."\n";



?>

            </tbody>

            </table>

        </div>

    </div>

</div>



<div class="linksb">

    <div class="inbox">

        <p class="pagelink"><?php echo $paging_links ?></p>

    </div>

</div>

<?php



require PUN_ROOT.'footer.php';

}

any chance you can tell what's putting it there as i can't sad

Re: 5 little errors/things i need help with :)

also one last thing.. guests can view profiles?

Re: 5 little errors/things i need help with :)

Where did you download your punbb?

In relation to (3) and (5) it looks like you have installed something like the MegaPun heavily modded PunBB - http://www.punres.org/viewtopic.php?id=4369 -  not the vanilla PunBB you get when you download PunBB directly off http://punbb.org/downloads.php. In order to diagnose any problems with the code, you may have to contact the mod author(s) or other users of the respective version you have installed.

As to stopping guests viewing profiles, a solution is here: http://www.punres.org/viewtopic.php?pid=13645

Re: 5 little errors/things i need help with :)

i tried that mod to stopping guests viewing profiles but now no one can view them?

Re: 5 little errors/things i need help with :)

well i sent an msg over @ http://www.punres.org/viewtopic.php?pid=13645 will have to wait now smile