[2.0.16] Profile Only For Logged In

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

Rating:

Excellent!
18
75%
Very Good
3
13%
Good
3
13%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 24

ashmanj
Registered User
Posts: 4
Joined: Wed May 01, 2002 11:28 pm
Location: CA

Troubles with Profile_only_for_logged_in_1.0.3.mod

Post by ashmanj »

I recently installed the mod using easy_mod on phpbb version 2.0.20 and even though installation was "totally successful" I get this error after I enable the feature on the configuration page and click submit:

Code: Select all

Failed to update general configuration for ('allow_login_for_profile',1);

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'allow_login_for_profile',1);'' at line 3

UPDATE phpbb_config SET config_value = '(''allow_login_for_profile'',1);' WHERE config_name = '('allow_login_for_profile',1);'

Line : 62
File : admin_board.php
Ironically enough the mod appears to be working nonetheless but that error is somewhat annoying. I have access to my database and my assumptions indicated that I was simply supposed to add:

Code: Select all

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

INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_login_for_profile',1);
into the database but I'm a little confused how. There is a 'NAME' entry and a cooresponding 'VALUE' entry on the phpbb_config page of my SQL database. My question is what is the 'NAME'? and I assume the VALUE ='('allow_login_for_profile',1);'

http://www.3dcharacters.com/img.jpg

I don't believe that easymod was able to access and make these changes to my database effectively so if necessary I can do it by hand. I just need some help indicating if my assumption above is true or not. Based on the image link provided above all that needs to happen is another row needs to be added to the end but the directions in the mod aren't clear. Can you please clarify?
datalife
Registered User
Posts: 8
Joined: Thu Aug 25, 2005 11:52 am

One simple questioon

Post by datalife »

Installed mod to phpbb 2.0.21. All work fine, but

how to show the Profile link in the overall header only for logged users?

PLEASE HELP ME.

Thanks
mikestev
Registered User
Posts: 24
Joined: Wed Jun 28, 2006 4:01 pm

Profile display from Forum View

Post by mikestev »

I think this may be just what I am looking for. Does this mod stop profiles from being displayed when a guest (not logged in) clicks on the links in the 'Who is Online' section in Forum View for 'The newest registered user is ......' and 'Registered users: .......'?

I'm new to phpbb and installing mods, etc. I have installed easymod, though so thnk I am ready. Will this function properly in phpbb2 v2.0.21?

Thanks.

Edited 1/8/2006
Went ahead and installed mod, works great. Thanks again.
User avatar
homebrewtj
Registered User
Posts: 33
Joined: Wed Mar 15, 2006 6:22 pm

Post by homebrewtj »

Works great- thanks!
Nite§talker
Registered User
Posts: 1
Joined: Sun Jul 23, 2006 7:37 pm

Post by Nite§talker »

Great feature!
Here's my contrib to this contrib

--[OPEN]
memberlist.php

--[FIND]
# Line 32

//
// End session management
//

---[AFTER ADD]

//Requires a user to be logged in to view the memberlist (used in tandem with the log-in for profile view).
if ( !$userdata['session_logged_in'] && $board_config['allow_login_for_profile'])
{
redirect(append_sid("login.$phpEx?redirect=memberlist.php", true));
}

----

This requires users to be logged in to view the member list also.

Requires you have completed installation of View Profile mod.
angryhobbit
Registered User
Posts: 89
Joined: Fri Jul 07, 2006 4:20 am
Location: Missouri
Contact:

Post by angryhobbit »

The only problem I encountered was with coding.

This is the error message I received while trying to install using easyMod.

Code: Select all

Critical Error

FIND FAILED: In file [templates/subSilver/admin/board_config_body.tpl] could not find:

<tr>
<th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
</tr>

MOD script line #79
Just a simple search and replace of each of the HTML codes for < and > solves the problem.

The second issue is that once it is installed the section in the ACP with the new addition has this minor issue after the option button for Yes.

Code: Select all

Yes&nbsp;&nbsp;
Can anyone please point me to the file I need to modify to eliminate the two codes for spaces?
angryhobbit
Registered User
Posts: 89
Joined: Fri Jul 07, 2006 4:20 am
Location: Missouri
Contact:

Update: Error

Post by angryhobbit »

After doing some further testing with the features, I have gotten an error.

Code: Select all

Parse error: parse error, unexpected ';' in /homepages/9/d153282895/htdocs/freak/phpBB2/profile.php on line 88
Here is the line before and after the line 88 in this file.

Code: Select all

if ( $mode == 'viewprofile' )
	{
		include($phpbb_root_path . 'includes/usercp_viewprofile.'.$phpEx);
		exit;
	}
	else if ( $mode == 'editprofile' || $mode == 'register' )
	{
		if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
		{	redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
		}

		include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
		exit;
	}
	else if ( $mode == 'confirm' )
	{
		// Visual Confirmation
		if ( $userdata['session_logged_in'] )
		{
			exit;
		}

		include($phpbb_root_path . 'includes/usercp_confirm.'.$phpEx);
		exit;
	}
Here is the actual line 88 that it flagged. This error occurs when a guest tries to click on a username for someone registered to view the profile and an actual registered tries to view their own profile or use the memberlist.

Code: Select all

redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
angryhobbit
Registered User
Posts: 89
Joined: Fri Jul 07, 2006 4:20 am
Location: Missouri
Contact:

Update: Solution

Post by angryhobbit »

Ok first of I was accidently looking in the wrong file even though I was reading the error message correctly.

This is directly linked to the fact that this mod is not easyMod friendly with the most current version because of old HTML code used in place for expected code.

For example:

Code: Select all

< rather than < and > rather than > that caused critical errors with easy mod.
The way I fixed my current error and issue was by doing the following.

Code: Select all

Replacing & about 4 times with just &.
This was causing an error in an if statement and would have caused errors later where it appeared in a normal statement.

This mod was slightly frustrating due to these simple error that are very simple to fix. And a tip to anyone planning to install this using easyMod, which with my first fix worked fine until errors occurred, is to remove the HTML tags at the top and bottom of the mod document. easyMod will not see the document as an mod document with those tags within it.
SDGR-Chewy
Registered User
Posts: 5
Joined: Wed Sep 13, 2006 8:58 pm

Post by SDGR-Chewy »

If needed: I made a translation to Dutch. I also added the explanation in the template.

Will post addition if there is any need for it.
Sooz123
Registered User
Posts: 16
Joined: Sat May 27, 2006 3:13 am

Post by Sooz123 »

Before I start, let me just apologize for being a moron who shouldn't attempt to MOD anything. :roll:

Several weeks ago, I installed a (different) mod that I couldn't get to work so I just (gasp) deleted the files and hoped for the best. That messed with the registration process on my forum and the only way I could figure to get that fixed (which is obviously a huge issue and I was in a pinch) was to overwrite the admin php files with the original versions and again... hope for the best. All is restored, except obviously it wiped out several of my working MODS. I can deal without most, but I need my memberlist locked down to registered members and...

This wouldn't ordinarily be a big rush issue but we've got ads running in the newspaper and I don't want crazies able to see that info.

Well, honestly I'm too much of an idiot and afraid of what I would do to make it worse if I tried to fix it manually myself. Anybody willing to help?
User avatar
RMcGirr83
Former Team Member
Posts: 21688
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

This mod seems a little overkill to simply stop an unlogged in member from seeing someone's profile.

Just my .02
User avatar
Ultra Newbie
Registered User
Posts: 30
Joined: Mon Aug 21, 2006 5:57 am

Post by Ultra Newbie »

Just installed the MOD manually on my test board and it worked like a charm!! I'm using 2.0.21, with several MODs and themes. Great MOD~!

Thanx for the great work.
Munken
Registered User
Posts: 2
Joined: Sat Oct 14, 2006 3:48 am

Problem when need to registeret!

Post by Munken »

Okay, maybe I am a little stupid... but I just put the code in, and now no guests can see the profil's, and that is good!!
BUT, now no guest can register... :( and that is a problem..

Can't someone help me so guest stil can't se the profil's but can registeret?
Munken
Registered User
Posts: 2
Joined: Sat Oct 14, 2006 3:48 am

Re: Problem when need to registeret!

Post by Munken »

Munken wrote: Okay, maybe I am a little stupid... but I just put the code in, and now no guests can see the profil's, and that is good!!
BUT, now no guest can register... :( and that is a problem..

Can't someone help me so guest stil can't se the profil's but can registeret?


No problem... i found out that I just where stupid.. :oops: ups
User avatar
SmokerMI
Registered User
Posts: 26
Joined: Wed Nov 01, 2006 9:51 pm
Location: Michigan

Re: [2.0.16] Profile Only For Logged In

Post by SmokerMI »

When I click on
MOD Database Manager wrote: Download File: Profile_only_for_logged_in_1.0.3.mod


I get an error message

"Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found."

Is this a known problem ?
Smoker
Post Reply

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