Topic: Dont allow the guests to see the mebers profile.

What if the administrator can choice that in Admin menu -> User groups? I think that would be good.

Re: Dont allow the guests to see the mebers profile.

Try adding this after common.php is called:

if ($pun_user['is_guest'])
    message($lang_common['No view']);

(in profile.php)

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

Re: Dont allow the guests to see the mebers profile.

Thats great. Thanks.

Re: Dont allow the guests to see the mebers profile.

Is it possible to prevent guests from even seeing the "You do not have permission to view these forums" message (when they try accessing a profile) and instead make them land straight on the forum index page instead?

I dont want any denial of access messages to be displayed.

5 (edited by Strofanto 2006-10-06 08:11)

Re: Dont allow the guests to see the mebers profile.

Try

if ($pun_user['is_guest'])
    header("Location: http://www.yoursite.tld/forum");

Re: Dont allow the guests to see the mebers profile.

This would be nice too... in include/functions.php

//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
    global $pun_config, $lang_common, $pun_user;

    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

    if ($pun_config['o_rules'] == '1')
        $links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($pun_user['is_guest'])
    {
        if ($pun_user['g_search'] == '1')
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';
        $links[] = '<li id="navlogin"><a href="login.php">'.$lang_common['Login'].'</a>';

        $info = $lang_common['Not logged in'];
    }
    else
    {
        if ($pun_user['g_id'] > PUN_MOD)
        {
            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

##
##----------- Replace with
##

//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
    global $pun_config, $lang_common, $pun_user;

    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';

    if ($pun_config['o_rules'] == '1')
        $links[] = '<li id="navrules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';

    if ($pun_user['is_guest'])
    {
        if ($pun_user['g_search'] == '1')
            $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

        $links[] = '<li id="navregister"><a href="register.php">'.$lang_common['Register'].'</a>';
        $links[] = '<li id="navlogin"><a href="login.php">'.$lang_common['Login'].'</a>';

        $info = $lang_common['Not logged in'];
    }
    else
    {
        if ($pun_user['g_id'] > PUN_MOD)
        {
            $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

            if ($pun_user['g_search'] == '1')
                $links[] = '<li id="navsearch"><a href="search.php">'.$lang_common['Search'].'</a>';

Course you can use your imaginations with this tongue Maybe only users who can search can see user list? Whatever you want big_smile

echo "deadram"; echo; fortune;

Re: Dont allow the guests to see the mebers profile.

Interesting dearam...
Also there's the UserAccess Restriction mod by Atis.  That's what we tried and works just as we wish.  Find it at punres - search for userlist. (Don't know how carefule I should be about posting links... is it better to just tell someone how to find it like this?)
Cheers,

TwoHawks
Love is the Function
No Form is the Tool

Re: Dont allow the guests to see the mebers profile.

Thanks guys.