Topic: Something simple: Being able to view one's Profile

I don't really believe mr. Andersson checks these threads, but hey if you do, here's a simple feature request.

I'd like PunBB to allow people to check their own profiles without logging off. See, I for one can't check my own profile, because I'm redirected to the Profile Editor page, which isn't a bad thing, but in there, there's no option to let me preview my profile or anything.

I believe this issue annoys other people as well, so if you find the time and will, do add the ability to check one's profile. Thanks.

2 (edited by Jansson 2006-09-18 13:25)

Re: Something simple: Being able to view one's Profile

Personally, I haven't ever really wanted to preview the profile, except for when I'm making changes to it.

3

Re: Something simple: Being able to view one's Profile

What I find even more annoying is that if you are logged in as admin or as a mod then you get the edit view of everybody's profile. Thats a pain when you just wanted a quick look at something. At one point I thought of requesting that the normal view be the default not only for admins/mods but also when looking at your own profile with a button/link to switch to edit mode. I didn't pursue it though as I thought it was just me being fussy.

Re: Something simple: Being able to view one's Profile

Just add a link to the profile menu to view profile =P

I usually just open an IE Tab, as I'm not logged in there, but then I'm on IE sad

5

Re: Something simple: Being able to view one's Profile

We can have the name be the view and have an additional edit link if we are an admin or mod.

6 (edited by deadram 2006-09-18 20:52)

Re: Something simple: Being able to view one's Profile

Hurm, this should be easy...

line 300ish in ./include/functions.php

find:
                <ul>
?>">Preview</a></li>
                    <li<?php if ($page == 'essentials') echo ' class="isactive"'; ?>><a href="profile.php?section=essentials&id=<?php echo $id ?>"><?php echo $lang_profile['Section essentials'] ?></a></li>
                    <li<?php if ($page == 'personal') echo ' class="isactive"'; ?>><a href="profile.php?section=personal&id=<?php echo $id ?>"><?php echo $lang_profile['Section personal'] ?></a></li>

replace with:
                <ul>
                    <li<?php if ($page == 'preview') echo ' class="isactive"'; ?>><a href="profile.php?section=preview&id=<?php echo $id ?>">Preview</a></li>
                    <li<?php if ($page == 'essentials') echo ' class="isactive"'; ?>><a href="profile.php?section=essentials&id=<?php echo $id ?>"><?php echo $lang_profile['Section essentials'] ?></a></li>
                    <li<?php if ($page == 'personal') echo ' class="isactive"'; ?>><a href="profile.php?section=personal&id=<?php echo $id ?>"><?php echo $lang_profile['Section personal'] ?></a></li>

Now profile.php line 910ish

find:

// View or edit?
if ($pun_user['id'] != $id &&
    ($pun_user['g_id'] > PUN_MOD ||
    ($pun_user['g_id'] == PUN_MOD && $pun_config['p_mod_edit_users'] == '0') ||
    ($pun_user['g_id'] == PUN_MOD && $user['g_id'] < PUN_GUEST)))
{

replace with:

// View or edit?
if (($pun_user['id'] != $id &&
    ($pun_user['g_id'] > PUN_MOD ||
    ($pun_user['g_id'] == PUN_MOD && $pun_config['p_mod_edit_users'] == '0') ||
    ($pun_user['g_id'] == PUN_MOD && $user['g_id'] < PUN_GUEST)))
    || (!$section ||  $section == 'preview'))
{

again in profile.php, around line 1050

find:
}
else
{
    if (!$section || $section == 'essentials')
    {

replace with:

}
else
{
    if ($section == 'essentials')
    {

Now you default to the preview, and still have all the admin, mod, and personal options big_smile

You can visit my website, and sign-up for an account to see this in action, great idea! big_smile This bugged me too tongue

echo "deadram"; echo; fortune;

7 (edited by deadram 2006-09-18 22:21)

Re: Something simple: Being able to view one's Profile

Woops forgot one more thing....

profile.php line 960ish

find:

    $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
    define('PUN_ALLOW_INDEX', 1);
    require PUN_ROOT.'header.php';
?>


EDIT -- This section needed to be changed... (Admins didn't get the side menu)
replace with:

    $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
    define('PUN_ALLOW_INDEX', 1);
    require PUN_ROOT.'header.php';
    if ($pun_user['id'] == $id ||
    (($pun_user['g_id'] == PUN_MOD && $pun_config['p_mod_edit_users'] == '1') &&
    ($pun_user['g_id'] == PUN_MOD && (! ($user['g_id'] < PUN_GUEST)))) ||
    ($pun_user['g_id'] == PUN_ADMIN))
    {
        generate_profile_menu('preview');
    }
?>

There you go big_smile

echo "deadram"; echo; fortune;

Re: Something simple: Being able to view one's Profile

There's a mod for this already: http://punbb.org/forums/viewtopic.php?id=8427

It would be a nice feature to see though.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Something simple: Being able to view one's Profile

Glad this spawned a discussion.  Indeed, it would be a nice feature.

BTW, good job, deadram.