[MOD DB][2.0.6-2.0.4] Profile Control Panel v 2.0.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 2:51 pm

Ok, actually the setting was ignored (because of NULL value) only in the memberlist. For other spot, the $userdata[]/$view_userdata[] array is used, and it is correctly filled. The users table field value is not changed on purpose, to avoid to process all the users table as long as it isn't necessary. The users row will be really updated the next time the users will be, but the value of the users table field is not necessary to take care of this overwrite.

I had to enhance the sql def classes definition to take care of this settings (that's the beauty of this way to proceed : quite all are parameters :)), so pick up this new definition in order to replace the $classes_fields array definition in profilcp/def/def_userfields.php (don't be too frightened by the sql definition itself : the admin tool provide it with only filling the three fields :)) :

Code: Select all

//--------------------------------------------------------------------------------------------------
//
// $classes_fields array
//
//		key = name of the class,
//
//			config_field	: the config value field set by the admin to force the usage of the class,
//			admin_field		: the users table field set by the admin to restrict to a particular user the class display,
//			user_field		: the users table field set by the user (preferences) to restrict the class display,
//			sql_def			: sql definition of the condition field
//
//--------------------------------------------------------------------------------------------------
$classes_fields = array(
	'email' => array(
		'config_field'	=> 'allow_viewemail',
		'admin_field'	=> 'user_allow_email',
		'user_field'	=> 'user_viewemail',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewemail] <> 0 OR [board.allow_viewemail_over] <> 1 ) AND [USERS].user_allow_email = 1 AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_viewemail = 1 OR ([board.allow_viewemail] = 1 AND [board.allow_viewemail_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_viewemail = 2 OR ([board.allow_viewemail] = 2 AND [board.allow_viewemail_over] = 1) ) ) ) )',
	),
	'generic' => array(
		'config_field'	=> '',
		'admin_field'	=> '',
		'user_field'	=> '',
		'sql_def'		=> '',
	),
	'messangers' => array(
		'config_field'	=> 'allow_viewmessengers',
		'admin_field'	=> 'user_allow_messanger',
		'user_field'	=> 'user_viewmessanger ',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewmessengers] <> 0 OR [board.allow_viewmessengers_over] <> 1 ) AND [USERS].user_allow_messanger = 1 AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_viewmessanger  = 1 OR ([board.allow_viewmessengers] = 1 AND [board.allow_viewmessengers_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_viewmessanger  = 2 OR ([board.allow_viewmessengers] = 2 AND [board.allow_viewmessengers_over] = 1) ) ) ) )',
	),
	'pm' => array(
		'config_field'	=> 'allow_viewpm',
		'admin_field'	=> 'user_allow_pm',
		'user_field'	=> 'user_viewpm',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewpm] <> 0 OR [board.allow_viewpm_over] <> 1 ) AND [USERS].user_allow_pm = 1 AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_viewpm = 1 OR ([board.allow_viewpm] = 1 AND [board.allow_viewpm_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_viewpm = 2 OR ([board.allow_viewpm] = 2 AND [board.allow_viewpm_over] = 1) ) ) ) )',
	),
	'real' => array(
		'config_field'	=> 'allow_viewreal',
		'admin_field'	=> 'user_allow_real',
		'user_field'	=> 'user_viewreal',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewreal] <> 0 OR [board.allow_viewreal_over] <> 1 ) AND [USERS].user_allow_real = 1 AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_viewreal = 1 OR ([board.allow_viewreal] = 1 AND [board.allow_viewreal_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_viewreal = 2 OR ([board.allow_viewreal] = 2 AND [board.allow_viewreal_over] = 1) ) ) ) )',
	),
	'viewonline' => array(
		'config_field'	=> 'allow_viewonline',
		'admin_field'	=> '',
		'user_field'	=> 'user_allow_viewonline',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewonline] <> 0 OR [board.allow_viewonline_over] <> 1 ) AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_allow_viewonline = 1 OR ([board.allow_viewonline] = 1 AND [board.allow_viewonline_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_allow_viewonline = 2 OR ([board.allow_viewonline] = 2 AND [board.allow_viewonline_over] = 1) ) ) ) )',
	),
	'webdisplay' => array(
		'config_field'	=> 'allow_viewwebsite',
		'admin_field'	=> 'user_allow_website',
		'user_field'	=> 'user_viewwebsite',
		'sql_def'		=> '[USERS].user_id = [view.user_id] OR ( ( [BUDDY_MY].buddy_ignore <> 1 OR [BUDDY_MY].buddy_ignore IS NULL ) AND ( [board.allow_viewwebsite] <> 0 OR [board.allow_viewwebsite_over] <> 1 ) AND [USERS].user_allow_website = 1 AND ( [BUDDY_OF].buddy_visible = 1 OR ( [USERS].user_viewwebsite = 1 OR ([board.allow_viewwebsite] = 1 AND [board.allow_viewwebsite_over] = 1) ) OR ( [BUDDY_OF].buddy_ignore = 0 AND ( [USERS].user_viewwebsite = 2 OR ([board.allow_viewwebsite] = 2 AND [board.allow_viewwebsite_over] = 1) ) ) ) )',
	),
);

g-funk
Registered User
Posts: 34
Joined: Tue Sep 09, 2003 5:58 pm

Post by g-funk » Wed Oct 15, 2003 2:56 pm

Hi
Ptirhiik - RPGnet-fr wrote: [*]with the button and the actuall address below it for all users.
This is easy to do : just add 'txt' => true to the user_email field in the PCP.buddy, def_usermaps.php file
[/list]


If I do this in def_usermaps.php

Code: Select all

                        'user_email' => array(
                                'ind'           =>  4,
                                'img'           => true,
                                'txt'           => true,
                        ),
Then I get the picture with the text "Send e-mail" behind it instead of the email address below it.

Is there another easy way ?

G-Funk

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 3:10 pm

So I guess you are using the phpBB form to send mail through the board, aren't you ?

g-funk
Registered User
Posts: 34
Joined: Tue Sep 09, 2003 5:58 pm

Post by g-funk » Wed Oct 15, 2003 3:27 pm

Hi again

updating the def_userfields.php fixed the override problem :) in the memberlist.

But in the Viewprofile and Viewtopic there are still problmes.
I have now set it to NO and override. And i still get the little email pic in viewprofile and Viewtopic. The user is set to no (0) in sql as well.
The Memberlist is ok.


:)
G-Funk

g-funk
Registered User
Posts: 34
Joined: Tue Sep 09, 2003 5:58 pm

Post by g-funk » Wed Oct 15, 2003 3:29 pm

Ptirhiik - RPGnet-fr wrote: So I guess you are using the phpBB form to send mail through the board, aren't you ?


Yes I am but in the Admin - Memberlist it shows the actuall email address.
And id like an option (or hack) to show it for all users.

:)
G-Funk

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 3:48 pm

This is restrict in the function pcp_output_user_email(), as it is of no use to display the email adress if you hide it using the board form. Anyway, you can re-allow it by modifying this function (it is settled in profilcp/def/def_userfuncs_std.php). You can also write your own and sotre it in a def_userfuncs_cust.php, and then affect it to the user_email field, as you want.

For the email adress and overwrite, I haven't this issue elsewhere than in member list (which was logical as the view_userdata[] array isn't what is used because of the sql request). In viewprofile and viewtopic, the $view_userdata[] is used, and the user value of a class field (here user_viewemail) is overided by the settings (mods_settings does perform this).

eviluncledave
Registered User
Posts: 17
Joined: Thu Jul 03, 2003 4:03 am
Location: Back of milk carton
Contact:

Post by eviluncledave » Wed Oct 15, 2003 4:48 pm

Is there a way to quickly disable the moderator's ability to see hidden administrators on the memberlist? Sometimes I don't have time to chat with them and just need to go in and get some things done, but if they can see that I'm there they think I'm ignoring or mad at them if I don't reply. Just curious.

Thanks for your help,
EUD

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 5:02 pm

If moderators are users administrators, not easely (i would require a more advanced sql function to determine this ability with their level too), but it is definitly possible :).

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 5:26 pm

Alpha 3 for the admin tools : the usermaps management is now included.

:arrow: alpha 3 of admin tools

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 8:40 pm

I jump directly to alpha 3 of the admin tools, as the ms-sql/mssql-odbc is written.

Now I'm waiting for some feedback from postgresql and mssql users, in order to validate this part :).

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Wed Oct 15, 2003 9:22 pm

A typo was in the admin_pcp_userfields.php preventing to add a field. This has been fixed in the download pack :).

Deriel
Registered User
Posts: 164
Joined: Tue Aug 27, 2002 5:16 pm
Location: Curitiba/PR - Brasil
Contact:

Post by Deriel » Thu Oct 16, 2003 2:00 pm

I'm getting "Invalid_session" when I tried to receive my password ("forgot password"). No idea where to look to solve :(

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Thu Oct 16, 2003 2:13 pm

Do you use an aol navigator ?

Deriel
Registered User
Posts: 164
Joined: Tue Aug 27, 2002 5:16 pm
Location: Curitiba/PR - Brasil
Contact:

Post by Deriel » Thu Oct 16, 2003 2:16 pm

Nope, it's just in the exact case of the "send password".

Thanks god AOL is irrelevant in Brazil :D

User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik » Thu Oct 16, 2003 2:22 pm

Ok, so I have to investigate a few :).

Locked

Return to “[2.0.x] MODs in Development”