[2.0.15] Redirect anonymous users to login

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
102
73%
Very Good
25
18%
Good
3
2%
Fair
1
1%
Poor
8
6%
 
Total votes: 139

Marmotte
Registered User
Posts: 37
Joined: Thu Nov 25, 2004 3:20 am

Post by Marmotte »

I didn't have to modify anything on 2.0.11 for it to work. (applied it with EasyMOD)

I only surrounded the modifications with single line comments to show where the mod was done.
PeanutFarmer
Registered User
Posts: 33
Joined: Mon Oct 11, 2004 1:11 pm

Post by PeanutFarmer »

I was addressing StefanKausL. Looks like we posted at the same time. :lol:
PeanutFarmer
Registered User
Posts: 33
Joined: Mon Oct 11, 2004 1:11 pm

Post by PeanutFarmer »

StefanKausL wrote: If upgraded from 2.0.10 to 2.0.11 with "confirmation code" active and the MOD works without modifications.


Not sure if I mentioned this, but this is a brand new 2.0.11 install. I never had 2.0.10 installed on this server.

***Edit: This time, I applied if ($userdata['user_id'] == ANONYMOUS)
{
redirect(append_sid('login.'.$phpEx));
}

after all of the "else if" statements and it seems to work.
Hellboy
Registered User
Posts: 2
Joined: Tue Dec 07, 2004 11:30 am

Post by Hellboy »

Superb Mod.

Worked first time. Thank you for this. :)
Cavan
Registered User
Posts: 19
Joined: Sat Nov 20, 2004 8:59 am

Works great!

Post by Cavan »

I entered the following...

Code: Select all

if ($userdata['user_id'] == ANONYMOUS)
{
	redirect(append_sid('login.'.$phpEx));
}
...into the appropriate lines in groupcp.php, memberlist.php, viewonline.php, viewforum.php, profile.php and search.php and this mod works fine without my having to edit any user settings (permissions) via admin.
This mod is a good security measure to implement, especially if you want to keep prying eyes away from member's profile information and wish to maintain more control over who actually uses and views your forums.
Cavan
phpBB Version: 2.0.11
Mods Used: 15 Min. Who's Online, Avatar on Index, IP only by Admin, Multiple-choice Voting, Admin Toolkit, Random Logo, Redirect Anonymous User to Login, Login Box At Overall Header and View Profile in Signature.
Mackenzie
Registered User
Posts: 27
Joined: Sat Dec 07, 2002 3:06 am
Location: Stabroek (Antwerp) Belgium
Contact:

Post by Mackenzie »

i only receive a winamp file :?
You do NOT choose Silat...
Silat chooses YOU !!!

Pencak Silat Pamor Badai
Hotice
Registered User
Posts: 8
Joined: Thu Aug 19, 2004 9:41 pm
Contact:

I need help with mod trouble.

Post by Hotice »

I installed this mod everything went great.. When I checked.. back at my forum. I got this error:

Code: Select all

Template->make_filename(): Error - file does not exist
Mackenzie
Registered User
Posts: 27
Joined: Sat Dec 07, 2002 3:06 am
Location: Stabroek (Antwerp) Belgium
Contact:

Post by Mackenzie »

Mackenzie wrote: i only receive a winamp file :?


found it....just change to .text when saving :)
You do NOT choose Silat...
Silat chooses YOU !!!

Pencak Silat Pamor Badai
andyb
Registered User
Posts: 6
Joined: Tue May 27, 2003 12:53 am

Post by andyb »

Works fine with phpbb version 2.0.11

Andy
snoogly
Registered User
Posts: 9
Joined: Sun Jan 09, 2005 10:03 am

how can?

Post by snoogly »

Is it possible to actually prevent anonymous users from registering, but allow me (the admin) to register?

I want to do all the registering myself, and this MOD seems like it could help me do that.
StefanKausL
Registered User
Posts: 36
Joined: Fri Jul 09, 2004 7:20 pm
Location: Germany
Contact:

Post by StefanKausL »

See "General Board Settings -> Enable account activation -> Admin"
Gorgarath
Registered User
Posts: 4
Joined: Tue Jan 11, 2005 3:20 am

Post by Gorgarath »

I'm pretty sure I did everything correctly, but when I go to view a profile as an anonymous user, I can still see the profile and all the information. What did I miss?
the darkknight
Registered User
Posts: 4
Joined: Wed Feb 02, 2005 3:35 pm

codes

Post by the darkknight »

I am trying to make it so guest cannot see the membership list. I copied the codes like it said and this is what I got. I am in the profile, but no matter which one I go to memberslist etc I get the same errors. What am I doing wrong. It seems so easy to do.


$userdata = session_pagestart($user_ip, PAGE_PROFILE);
if ( $mode == 'viewprofile' )
{
if ($userdata['user_id'] == ANONYMOUS)
{
redirect(append_sid('login.'.$phpEx));
}


I then run the code and get this

Parse error: parse error in C:\php\phpBB2\_debug_tmp.php on line 139
StefanKausL
Registered User
Posts: 36
Joined: Fri Jul 09, 2004 7:20 pm
Location: Germany
Contact:

Re: codes

Post by StefanKausL »

the darkknight wrote: Parse error: parse error in C:\php\phpBB2\_debug_tmp.php on line 139

This file does not belong to the redirect_annonymous_users_to_login_mod. Are you sure the error is connected to the mod? Try to undo your changes. If the error still happens, fix it before installing the mod.
the darkknight
Registered User
Posts: 4
Joined: Wed Feb 02, 2005 3:35 pm

Post by the darkknight »

I did. I removed the code and got no errors at all. Put the code back in and the same thing happens.
Post Reply

Return to “[2.0.x] MOD Database Cleanup”