PDA

View Full Version : Hide a members profile page


T3MEDIA
04-29-2005, 04:37 AM
Is there a way to hide a member's profile page?
I cant seem to find a way to do this.

I want members to see the page and guest to see nothing. as if the users isnt even a member.

I know how to make them un searchable but not hidden.

For example when you delete a user their page is gone. You get an error if you try to goto their page.

I want that same effect but controlable by usergroup.

Thanks.

Paul M
04-29-2005, 04:40 AM
This is already a usergroup permission ;

General Permissions > Can View Member Info = Yes or No

Adrian Schneider
04-29-2005, 04:43 AM
You could add something like

if ($bbuserinfo[usergroupid] == X)
{
$errormessage = "Custom Error Message";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
Or if there are multiple, you could use in_member_of($bbuserinfo, X,Y,Z)

This is already a usergroup permission ;

General Permissions > Can View Member Info = Yes or No
Your method is probably easier. :)

T3MEDIA
04-29-2005, 11:08 AM
This is already a usergroup permission ;

General Permissions > Can View Member Info = Yes or NoPaul that is if the member of the group can see member info.

I want it to be like this. say I bann you. NOT delte you just ban you.

No one on the site can see your page. except the admin. Understand now?
I prob. wasnt clear before.

T3MEDIA
05-01-2005, 10:17 AM
bump... can this work.. please look at the code....

if ($bbuserinfo[usergroupid] != X)
{ do the normal stuff.
else
$errormessage = "Custom Error Message";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}
unfortunately I do not know the proper syntax or the proper place to put this really.

I wouldnt want the sandard error. I would like that no results page. (like when you do a search and it has nothing to return)

Adrian Schneider
05-01-2005, 04:21 PM
Pretty close. You were missing the closing }

{ do the normal stuff . }


Personally it would be easier to go == instead of != then you won't need to put all of the normal stuff inside the if. How many groups do you want to deny it to? All but admins?

You can customize the error by changing "Custom Error Message".

T3MEDIA
05-01-2005, 04:44 PM
What I am doing is making banned members profile page disapear to all other members on the site.

At the moment when a member is banned you can still view thier profile.

Adrian Schneider
05-01-2005, 04:57 PM
Oh okay, I misunderstood then.

I think it would be

$userinfo instead of $bbuserinfo.

So this alone should work:

if ($userinfo[usergroupid] == X)
{
$errormessage = "You may not view banned users' profiles.";
eval('print_output("' . fetch_template('STANDARD_ERROR') . '");');
}

where X is banned usergroup

T3MEDIA
05-01-2005, 05:06 PM
sorry where do I place this code?
only admin can view the profiles btw.
looking at this code its doesnt seem like it would work.
I want the OPPOSITE of this.

Ok. IF you get banned... your banned... good by. This isnt about you... its about the other members.

now joe blow wants to goto your page. he cant. He gets the error your page does not exist.

actually everyone gets this error except admins. Its like saying soft delete users.

This does not exist on vb. This is what I am trying to do.

Adrian Schneider
05-01-2005, 05:15 PM
What it does is if user-your-trying-to-views['usergroupid'] is equal to X (banned group) then show error message.

You could change it to if ($userinfo[usergroupid] == X AND $bbuserinfo[usergroupid] != 6) to allow admins. I'll check quickly where to insert this.

Stick it right before eval('print_output("' . fetch_template($templatename) . '");');

T3MEDIA
05-01-2005, 05:33 PM
ok... sounds cool. I will await what file Im supposed to place this in.
Thanks for the help that is real nice of you.

Adrian Schneider
05-01-2005, 05:34 PM
member.php

T3MEDIA
05-01-2005, 05:36 PM
This actually would be a cool hack. and a addition to it would be if the user is banned the ip they used is automatically placed in the banned ip section as well. Now that would be hot. a one click ban and all your worries are gone.

A step up from that would be the option to add users in this group automatically to "Tachy Goes to Coventry"

Just thinking out loud.

Adrian Schneider
05-01-2005, 05:41 PM
lol :)

Did it work?

T3MEDIA
05-01-2005, 05:45 PM
That is HOT! works like a charm. Why they dont have that in place anyway? I dont get the object.

Thanks!