Page 1 of 5

[2.0.16] Profile Only For Logged In

Posted: Sun Jul 03, 2005 1:29 am
by Extensions Robot
MOD Name: Profile Only For Logged In
Author: ymDevelopment
MOD Description: Adds the option of requiring users to log in before viewing profiles.


MOD Version: 1.0.3

Download File: Profile_only_for_logged_in_1.0.3.mod
mods overview page: View
File Size: 4867 Bytes

Security Score: 0

Posted: Mon Jul 11, 2005 12:44 pm
by ycl6
MOD Validated/Released

Notes:
This MOD allows admins to configure (in ACP) if member profiles are viewable by guests.

Posted: Thu Jul 21, 2005 1:59 am
by Spongemom
I'm not saying this MOD is causing my problem, but this is where I was told to post.

http://www.phpbb.com/phpBB/viewtopic.php?t=308898

They said to post in a thread for one of the MODs I have, and this MOD is the last one I installed.

That link explains my whole problem, I thought that would be better than reposting the whole thing here.

Anyone have an idea of what I need to do? They said to "check the related profile files", but they didn't say what to check them for.

:cry:

Posted: Fri Jul 22, 2005 12:17 am
by ymDevelopment
Well, I read your other post and the response to it, but nothing comes to mind.

Here's what I change in profile.php; it was one of the files mentioned in the reponse to your post. All it does is check if the user hasn't logged in yet, and you want them to, they have to log in now.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
profile.php

#
#-----[ FIND ]------------------------------------------
#
		include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
		exit;
	}

#
#-----[ BEFORE, ADD ]------------------------------------------
#
		//Requires a user to be logged in to view a profile.
		if ( !$userdata['session_logged_in'] && $board_config['allow_login_for_profile'])
		{
			redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=viewprofile&" . POST_USERS_URL . '=' . $HTTP_GET_VARS[POST_USERS_URL], true));
		}
It gets tricky when you have a lot of mods installed. While EasyMod doesn't have a rollback feature, it does seem to keep backups of the files it changes.
Now I notice that some of your mods are big ones, so it may not be feasible to "uninstall" all of them, but mine is prety easy. You might try replacing the changed files with the backups...

Let me know if it is my mod; I don't want it causing any problems.

HTH

Posted: Wed Nov 30, 2005 8:35 pm
by Thy73
I've just installed this mod, only it still seems that guests can view the profile and I can't find where I can configure (in ACP) if member profiles are viewable by guests.

Posted: Wed Nov 30, 2005 11:52 pm
by ymDevelopment
I don't remember if it defaults to "ON".
There's a radio toggle labled "Login for profile view" on the General Admin | Configuration page, under the heading "User and Forum Basic Settings".

HTH

Posted: Mon Dec 05, 2005 5:13 pm
by Thy73
ymDevelopment wrote: There's a radio toggle labled "Login for profile view" on the General Admin | Configuration page, under the heading "User and Forum Basic Settings".


No i don't see such thing in the ACP ... anywhere :(

It also say
#
#-----[ SQL ]------------------------------------------
#

INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_profile',1);


Is that something that needs to be added into the config file, the code in red ?

Posted: Tue Dec 06, 2005 12:22 am
by ymDevelopment
Is that something that needs to be added into the config file, the code in red ?

It sets the default value in the database. I'm not sure what happens when it doesn't get inserted.
No i don't see such thing in the ACP ... anywhere

Hmm.... Maybe it didn't apply the mod properly. What version of phpBB did you apply it to, and did you use easyMOD? As well, do you have a table in your database named phpbb_config?

Posted: Tue Dec 06, 2005 8:20 am
by emilycox
Hello,

i seem to be having the same problem. After installation i can see it on the ACP but it defaults to 'no' and continues to allow those not logged on to view profiles.

i think i was careful with all of the instructions but this worried me:

#
#-----[ SQL ]------------------------------------------
#

INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_profile',1);


When i looked at my config.php file there was a comment that said 'do not change this file' so i didn't. i think however that 'phpbb-config' may be a different file. If so my question is how do i make that insertion?

Thank you for your help.

em

Posted: Wed Dec 07, 2005 12:20 am
by ymDevelopment
emilycox wrote: Hello,

i seem to be having the same problem. After installation i can see it on the ACP but it defaults to 'no' and continues to allow those not logged on to view profiles.

...

When i looked at my config.php file there was a comment that said 'do not change this file' so i didn't. i think however that 'phpbb-config' may be a different file. If so my question is how do i make that insertion?

Thank you for your help.

em

You're right, it's not in a file. The code in the SQL section needs to be run in the database. EasyMOD does this for me, and I also have access to my database's console. If you don't have easyMOD, or access to your database, I don't know what to suggest.

Posted: Sat Dec 10, 2005 4:56 pm
by MoparTalk.co.uk
Easy to install, works like a charm, helps users regulate their privacy to other board members. I found it handy so I've voted for excellent :)

Posted: Sun Dec 11, 2005 8:17 pm
by Thy73
ymDevelopment wrote:
Is that something that needs to be added into the config file, the code in red ?

It sets the default value in the database. I'm not sure what happens when it doesn't get inserted.
No i don't see such thing in the ACP ... anywhere

Hmm.... Maybe it didn't apply the mod properly. What version of phpBB did you apply it to, and did you use easyMOD? As well, do you have a table in your database named phpbb_config?


I applied it to phpBB 2.0.17 and easyMOD 8O nope ... For the config file, the only config i have is the config.php in the root in the forum folder.

Posted: Tue Dec 13, 2005 2:55 am
by ymDevelopment
Thy73 wrote: I applied it to phpBB 2.0.17 and easyMOD 8O nope ... For the config file, the only config i have is the config.php in the root in the forum folder.


Well, I hope it's not a 2.0.17 problem; it sounds to me like a modding problem. Since it doesn't sound like you used easyMOD, I can be fairly certain that the database changes didn't go in.
ymDevelopment wrote: The code in the SQL section needs to be run in the database. EasyMOD does this for me, and I also have access to my database's console. If you don't have easyMOD, or access to your database, I don't know what to suggest.

There's what I sugested to emilycox earlier. It sounds like you two are having similar problems.

Ooh... It's occured to me that the radio button might not show up on your ACP if you don't MOD the admin file for the style you are using. By default I only list subSilver.

HTH

Where am I wrong?

Posted: Thu Dec 15, 2005 12:34 am
by Vinz
I applied this mod - and it seems to work! However, on the ACP, there is a new row, but no text. The radio buttons are there - but they don't get memorized. (However, the mod seems to work at all times.)

I am running ver 2.0.11 - is this too "old"?
Here's alook at the ACP:

Image

Thank you!

Re: Where am I wrong?

Posted: Thu Dec 15, 2005 12:59 am
by MHobbit
Vinz wrote: I am running ver 2.0.11 - is this too "old"?


Yes.