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));
}
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".
#
#-----[ 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 ?
No i don't see such thing in the ACP ... anywhere
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_profile',1);
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
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?
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.
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.
Vinz wrote: I am running ver 2.0.11 - is this too "old"?