Make Memberlist Private?

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
thinkhappy
Registered User
Posts: 84
Joined: Fri Nov 16, 2007 10:29 pm

Make Memberlist Private?

Post by thinkhappy »

How can I make my memberlist private? I want only registered users to be able to view who are members are.

Any help? I use phpbb 2.0.1.8

Thank you!
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: Make Memberlist Private?

Post by Ricky_Racer »

Quick & simple

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
	exit;
}
// End 'Restrict Guest Access' MOD
It is part of old 'Restrict Guest Access' MOD.
thinkhappy
Registered User
Posts: 84
Joined: Fri Nov 16, 2007 10:29 pm

Re: Make Memberlist Private?

Post by thinkhappy »

This might sound stupid, sorry if it does, but where do I put that? In what file exactly and where in the file?

Thank you so much! I really appreciate your time!
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: Make Memberlist Private?

Post by dellsystem »

thinkhappy wrote:This might sound stupid, sorry if it does, but where do I put that? In what file exactly and where in the file?

Thank you so much! I really appreciate your time!
It's right there in the instructions ;)

OPEN memberlist.php
FIND // End session management
AFTER, ADD the code below

:)
Former moderator and website team member | My MODs, and more (GitHub)
thinkhappy
Registered User
Posts: 84
Joined: Fri Nov 16, 2007 10:29 pm

Re: Make Memberlist Private?

Post by thinkhappy »

oh, i see now..sorry, and thank you!
thinkhappy
Registered User
Posts: 84
Joined: Fri Nov 16, 2007 10:29 pm

Re: Make Memberlist Private?

Post by thinkhappy »

YIKES - I added it but it gave me a blank Membership screen. I added it exactly as you said - started after the // after End Session and..

What should I do now? I deleted it until I hear back. Thanks!!
User avatar
Ricky_Racer
Registered User
Posts: 609
Joined: Wed Feb 12, 2003 10:02 pm

Re: Make Memberlist Private?

Post by Ricky_Racer »

I thought that code still worked, anyway, here is one that should still work.

Code: Select all

#
#------[ OPEN ]------------------------------------------
#
memberlist.php
#
#------[ FIND ]------------------------------------------
#
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
#
#------[ AFTER, ADD ]------------------------------------
#
//
// Begin Restrict Guest Access
//
if( !$userdata['session_logged_in'] || !isset($userdata))
{
	redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
	exit;
}
//
// End Restrict Guest Access
//
Now then, I have made one that I use, (installed here) it gives the Information page, before redirecting to the Login page, it requires edits to language file, it adds maybe 2 minutes to install time. ;)

Code: Select all

#
#------[ OPEN ]----------------------------------------
#
memberlist.php
#
#------[ FIND ]----------------------------------------
#
<?php
#
#------[AFTER, ADD:]----------------------------------
#
//-- mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
#
#------[ FIND ]----------------------------------------
#
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
#
#------[ AFTER, ADD ]----------------------------------
#
//-- add mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
if( !$userdata['session_logged_in'] || !isset($userdata))
{
	$redirect = append_sid('memberlist.'.$phpEx);
	$template->assign_vars(array(
		'META' => "<meta http-equiv=\"refresh\" content=\"5;url=login.$phpEx?redirect=$redirect\">")
	);
	$message = sprintf($lang['Sorry_auth_viewmembers'], $lang['Auth_Registered_Users'] ). '<br /><br />' . sprintf($lang['Click_to_register'], '<a href="' . append_sid('profile.'.$phpEx.'?mode=register') . '">', '</a>');
	message_die(GENERAL_MESSAGE, $message);
}
//-- end add : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
#
#------[ OPEN ]----------------------------------------
#
language/lang_english/lang_main.php
#
#------[ FIND ]----------------------------------------
#
<?php
#
#------[ AFTER, ADD ]----------------------------------
#
//-- mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
#
#------[FIND:]----------------------------------------
#
$lang['Click_return_group'] = 'Click %sHere%s to return to group information';
#
#------[ AFTER, ADD ]----------------------------------
#
//-- add mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
$lang['Click_to_register'] = 'Click %sHere%s to Register. Registration is <b>FREE !!!</b>';
//-- end mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
#
#------[FIND:]----------------------------------------
#
$lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.';
#
#------[ AFTER, ADD ]----------------------------------
#
//-- add mod : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
$lang['Sorry_auth_viewmembers'] = 'Sorry, but only %s can view the memberlist of our forum.';
//-- end add : restrict guest access w/message v.1.0.0 [Ricky_Racer] -----------
kathleenf
Registered User
Posts: 7
Joined: Sat Sep 13, 2008 7:42 pm

Re: Make Memberlist Private?

Post by kathleenf »

Hi, forgive the likely to be dumb question. I'd like to make my memberlist private too.

I'm running phpBB 2.0.22. In my memberlist.php, I'm not finding any of the lines pasted in from this thread. Or maybe that's the point but if that's the case, I don't know what I should be pasting and where. My file opens with:

Code: Select all

<?php
/***************************************************************************
 *                              memberlist.php
 *                            -------------------
 *   begin                : Friday, May 11, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : [email protected]
 *
 *   $Id: memberlist.php,v 1.36.2.13 2006/12/16 13:11:24 acydburn Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
Can you please dumb this down for me? Where is the point of insertion? I appreciate your help. Thanks.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make Memberlist Private?

Post by Lumpy Burgertushie »

what do you mean? the code that the instructions tell you to find is right there in your file.

as a matter of fact, you posted the exact code that you say you can not find.


robert
ok, you can't "dumb it down" anymore that it already is.
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#It is the last lines that you posted of your file above
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
#on a new line after it
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
then save the file and upload it back to your server and you are done.
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
kathleenf
Registered User
Posts: 7
Joined: Sat Sep 13, 2008 7:42 pm

Re: Make Memberlist Private?

Post by kathleenf »

Lumpy Burgertushie wrote:what do you mean? ... you posted the exact code that you say you can not find.
#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
#It is the last lines that you posted of your file above
//
// End session management
//
#
#-----[ AFTER, ADD ]------------------------------------
Try as I may, I do not see these specific lines below in my file, hence my confusion. You say the insertion point is indicated...but if my file does not contain the coding above this, and while I appreciate your acumen, surely you can see why I remain confused.

Code: Select all

#-----[ OPEN ]------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Make Memberlist Private?

Post by RMcGirr83 »

the instructions state these in order.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
memberlist.php
(means to open the file memberlist.php in a text editor (notepad++ is recommended)

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
//
// End session management
//
means to find within that file those lines, specifically

Code: Select all

//
// End session management
//
and finally,

Code: Select all

#
#-----[ AFTER, ADD ]------------------------------------
#
// Begin 'Restrict Guest Access' MOD
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
exit;
}
// End 'Restrict Guest Access' MOD
means to add after the above find on new seperate lines the above code. So when all is said and done the code then looks like this

Code: Select all

    <?php
    /***************************************************************************
    *                              memberlist.php
    *                            -------------------
    *   begin                : Friday, May 11, 2001
    *   copyright            : (C) 2001 The phpBB Group
    *   email                : [email protected]
    *
    *   $Id: memberlist.php,v 1.36.2.13 2006/12/16 13:11:24 acydburn Exp $
    *
    ***************************************************************************/

    /***************************************************************************
    *
    *   This program is free software; you can redistribute it and/or modify
    *   it under the terms of the GNU General Public License as published by
    *   the Free Software Foundation; either version 2 of the License, or
    *   (at your option) any later version.
    *
    ***************************************************************************/

    define('IN_PHPBB', true);
    $phpbb_root_path = './';
    include($phpbb_root_path . 'extension.inc');
    include($phpbb_root_path . 'common.'.$phpEx);

    //
    // Start session management
    //
    $userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
    init_userprefs($userdata);
    //
    // End session management
    //

	// Begin 'Restrict Guest Access' MOD
	if ( !$userdata['session_logged_in'] )
	{
	redirect(append_sid("login.".$phpEx."?redirect=memberlist.".$phpEx, true));
	exit;
	}
	// End 'Restrict Guest Access' MOD
hope it helps. :)
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
kathleenf
Registered User
Posts: 7
Joined: Sat Sep 13, 2008 7:42 pm

Re: Make Memberlist Private?

Post by kathleenf »

RMcGirr83 wrote:hope it helps. :)
It did indeed. I want to bear your children.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Make Memberlist Private?

Post by RMcGirr83 »

Better not tell my wife. ;)

Good luck!! :)
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
GaryC3
Registered User
Posts: 12
Joined: Fri Jan 04, 2008 11:39 pm

Re: Make Memberlist Private?

Post by GaryC3 »

I am unable to get any of this to work. I am running version 2.0.20 on one server as a test forum and if I can ever get it to work I will attempt to make the change on my main Foum which is version 2.0.13 on another server. I have not tried to make any mods. I open it in notepad and not really sure where the end of lines are so I may be putting this in where the lines are wrong. Is there something besides windows note pad that you are using ? Been working on this all evening with no success.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69224
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Make Memberlist Private?

Post by Lumpy Burgertushie »

GaryC3 wrote:I am unable to get any of this to work. I am running version 2.0.20 on one server as a test forum and if I can ever get it to work I will attempt to make the change on my main Foum which is version 2.0.13 on another server. I have not tried to make any mods. I open it in notepad and not really sure where the end of lines are so I may be putting this in where the lines are wrong. Is there something besides windows note pad that you are using ? Been working on this all evening with no success.
wordpad is better but it really doesn't matter that much.

you read what the instructions say and do what they tell you.

I am sorry, but it just doesn't get any simpler than those instructions.

you open the file.

you find the bit of code it tells you to find.

then, after that code, on the next line, you add the bit of code it tells you to add.

the end of the line is simply the end of whatever line you are looking at.

the end of this line is right here

see, now the end of this line is right here




robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Locked

Return to “2.0.x Support Forum”