vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Hide a members profile page (https://vborg.vbsupport.ru/showthread.php?t=80739)

T3MEDIA 04-29-2005 04:37 AM

Hide a members profile page
 
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
PHP Code:

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)

Quote:

Originally Posted by Paul M
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

Quote:

Originally Posted by Paul M
This is already a usergroup permission ;

General Permissions > Can View Member Info = Yes or No

Paul 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....

HTML 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 }
PHP Code:

{ 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:
PHP Code:

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
PHP Code:

eval('print_output("' fetch_template($templatename) . '");'); 



All times are GMT. The time now is 09:53 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01031 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete