############################################################## 
## MOD Title:		Advanced Private Messages - PCP
## MOD Author:		Ptirhiik < ptirhiik@clanmckeen.com > (Pierre) http://rpgnet.clanmckeen.com
## MOD Description:
##			PCP part : this part is an extension for the Profile Control Panel mod
## MOD Version:		0.0.7 - beta
## 
## Installation Level:	Easy
## Installation Time:	5 Minutes
## Files To Edit:
##			profile.php
##			profilcp/def/def_usermaps.php
##			profilcp/def/def_userfields.php
## Included Files:
##			profilcp/profilcp_home_privmsga.php
##			profilcp/profilcp_privmsga.php
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
##
##	o Install first the standard version, then this one
##
##	o Files to delete (you can rename them x_*):
##			profilcp/profilcp_home_privmsgs.php
##			profilcp/profilcp_privmsg.php
##			profilcp/profilcp_privmsg_popup.php
##			templates/subSilver/profilcp/privmsgs_body.tpl
##			templates/subSilver/profilcp/privmsgs_box.tpl
##
##	Don't forget to set to CHMOD 666 the def_usermaps & def_userfields after modifications.
##	You can also modify them using the PCP admin tools.
## 
############################################################## 
## MOD History:
##
##	see MOD-avanced_pm.txt
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
ALTER TABLE phpbb_users ADD user_max_inbox_privmsgs SMALLINT(5) DEFAULT '50' NOT NULL;
ALTER TABLE phpbb_users ADD user_max_sentbox_privmsgs SMALLINT(5) DEFAULT '50' NOT NULL;
ALTER TABLE phpbb_users ADD user_max_savebox_privmsgs SMALLINT(5) DEFAULT '150' NOT NULL;
ALTER TABLE phpbb_users ADD user_apm_save_to_mail TINYINT(1) DEFAULT '1' NOT NULL;
#
#-----[ COPY ]------------------------------------------------
#
copy profilcp/profilcp_home_privmsga.php to profilcp/profilcp_home_privmsga.php
copy profilcp/profilcp_privmsga.php to profilcp/profilcp_privmsga.php
#
#-----[ OPEN ]------------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------------
#
$submit = ( isset($HTTP_POST_VARS['submit']) || (($mode=='privmsg') && isset($HTTP_POST_VARS['post'])) );
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
$submit = isset($HTTP_POST_VARS['submit']);
#
#-----[ OPEN ]------------------------------------------------
#
profilcp/def/def_usermaps.php
#
#-----[ FIND ]------------------------------------------------
#
	'PCP.profil.profile_prefer.admin' => array(
#
#-----[ REPLACE WITH ]---------------------------------------- 
#
	'PCP.profil.profile_prefer.admin_main' => array(
		'order'		=> 20,
		'title'		=> 'profilcp_admin_shortcut',
	),

	'PCP.profil.profile_prefer.admin_main.admin_sub' => array(
#
#-----[ FIND ]------------------------------------------------
#
);

?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#

	'PCP.profil.profile_prefer.admin_main.privmsga_settings' => array(
		'order'		=> 10,
		'title'		=> 'privmsga_settings',
		'fields'	=> array(
			'user_max_inbox_privmsgs' => array(
				'type'         => 'VARCHAR',
				'get_mode'     => 'SMALLINT',
			),
			'user_max_sentbox_privmsgs' => array(
				'type'         => 'VARCHAR',
				'get_mode'     => 'SMALLINT',
			),
			'user_max_savebox_privmsgs' => array(
				'type'         => 'VARCHAR',
				'get_mode'     => 'SMALLINT',
			),
			'user_max_userlist' => array(
				'type'         => 'VARCHAR',
				'get_mode'     => 'SMALLINT',
			),
			'user_apm_save_to_mail' => array(
				'type'         => 'VARCHAR',
			),
		),
	),
#
#-----[ OPEN ]------------------------------------------------
#
profilcp/def/def_userfields.php
#
#-----[ FIND ]------------------------------------------------
#
);


?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
	'user_max_inbox_privmsgs' => array(
		'lang_key'     => 'max_inbox_privmsgs',
		'class'        => 'generic',
		'type'         => 'SMALLINT',
		'leg'          => true,
		'txt'          => true,
		'input_id'     => 'max_inbox_privmsgs',
		'default'      => '50',
		'auth'         => ADMIN,
	),
	'user_max_savebox_privmsgs' => array(
		'lang_key'     => 'max_savebox_privmsgs',
		'class'        => 'generic',
		'type'         => 'SMALLINT',
		'leg'          => true,
		'txt'          => true,
		'input_id'     => 'max_savebox_privmsgs',
		'default'      => '150',
		'auth'         => ADMIN,
	),
	'user_max_sentbox_privmsgs' => array(
		'lang_key'     => 'max_sentbox_privmsgs',
		'class'        => 'generic',
		'type'         => 'SMALLINT',
		'leg'          => true,
		'txt'          => true,
		'input_id'     => 'max_sentbox_privmsgs',
		'default'      => '50',
		'auth'         => ADMIN,
	),
	'user_max_userlist' => array(
		'lang_key'     => 'apm_max_userlist',
		'class'        => 'generic',
		'type'         => 'SMALLINT',
		'leg'          => true,
		'txt'          => true,
		'input_id'     => 'max_userlist',
		'default'      => '2',
		'auth'         => ADMIN,
	),
	'user_apm_save_to_mail' => array(
		'lang_key'     => 'apm_save_to_mail',
		'class'        => 'generic',
		'type'         => 'TINYINT',
		'leg'          => true,
		'txt'          => true,
		'input_id'     => 'apm_save_to_mail',
		'get_mode'     => 'LIST_RADIO',
		'default'      => '1',
		'values'       => 'list_yes_no',
		'auth'         => ADMIN,
	),
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM