diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-06-16 18:31:58 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-06-16 18:31:58 +0000 |
commit | b0b5cc368d9fbd461d23c7ad3e5181612d5d9268 (patch) | |
tree | df12b8fd47ba67b2f174d559931cf517504980aa | |
parent | 3479343882bd0e9e767723ad6cbd8bc17c156568 (diff) | |
download | forums-b0b5cc368d9fbd461d23c7ad3e5181612d5d9268.tar forums-b0b5cc368d9fbd461d23c7ad3e5181612d5d9268.tar.gz forums-b0b5cc368d9fbd461d23c7ad3e5181612d5d9268.tar.bz2 forums-b0b5cc368d9fbd461d23c7ad3e5181612d5d9268.tar.xz forums-b0b5cc368d9fbd461d23c7ad3e5181612d5d9268.zip |
Added a profile preference for recieving notification on new PMs
git-svn-id: file:///svn/phpbb/trunk@504 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/db/mysql_schema.sql | 4 | ||||
-rw-r--r-- | phpBB/db/postgres_schema.sql | 8 | ||||
-rwxr-xr-x | phpBB/language/lang_english.php | 3 | ||||
-rw-r--r-- | phpBB/profile.php | 19 | ||||
-rw-r--r-- | phpBB/templates/PSO/profile_add_body.tpl | 4 |
5 files changed, 29 insertions, 9 deletions
diff --git a/phpBB/db/mysql_schema.sql b/phpBB/db/mysql_schema.sql index 599b9e263a..dd6e6811a8 100644 --- a/phpBB/db/mysql_schema.sql +++ b/phpBB/db/mysql_schema.sql @@ -467,7 +467,9 @@ CREATE TABLE phpbb_users ( user_attachsig tinyint(1), user_allowhtml tinyint(1), user_allowbbcode tinyint(1), - user_allowsmile tinyint(1), + user_allowsmile tinyint(1), + user_allow_pm tinyint(1) DEFAULT '1' NOT NULL, + user_notify_pm tinyint(1) DEFAULT '1' NOT NULL, user_regdate int(11) DEFAULT '0' NOT NULL, user_rank int(11) DEFAULT '0', user_avatar varchar(100), diff --git a/phpBB/db/postgres_schema.sql b/phpBB/db/postgres_schema.sql index e657fdfb51..081e9f20ad 100644 --- a/phpBB/db/postgres_schema.sql +++ b/phpBB/db/postgres_schema.sql @@ -452,6 +452,7 @@ CREATE TABLE phpbb_user_groups ( -------------------------------------------------------- */ CREATE TABLE phpbb_users ( user_id int4 DEFAULT nextval('phpbb_users_id_seq'::text) NOT NULL, + user_active int2, username varchar(40) DEFAULT '' NOT NULL, user_regdate int4 DEFAULT '0' NOT NULL, user_password varchar(32) DEFAULT '' NOT NULL, @@ -473,17 +474,18 @@ CREATE TABLE phpbb_users ( user_allowhtml int2, user_allowbbcode int2, user_allowsmile int2, + user_allow_pm int2 DEFAULT '1' NOT NULL, user_rank int4 DEFAULT '0', user_avatar varchar(100), user_level int4 DEFAULT '1', user_lang varchar(255), + user_template varchar(50), user_timezone int4 DEFAULT '0' NOT NULL, user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL, + user_notify_pm int2 DEFAULT '1' NOT NULL, + user_notify int2, user_actkey varchar(32), user_newpasswd varchar(32), - user_notify int2, - user_active int2, - user_template varchar(50), CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id) ); diff --git a/phpBB/language/lang_english.php b/phpBB/language/lang_english.php index 27b9be96ac..6857703a79 100755 --- a/phpBB/language/lang_english.php +++ b/phpBB/language/lang_english.php @@ -214,6 +214,8 @@ $lang['Send_a_new_message'] = "Send a new private message"; $lang['Send_a_reply'] = "Reply to a private message"; $lang['Edit_message'] = "Edit private message"; +$lang['Notification_email'] = "Hello " . $username . "\n\n, You have received a new private message on your account at " . $forum_title . ". To view it immediately click the following link " . $pm_url . ", you may of course visit the site later your message will be stored in your Inbox.\n\n" . $board_config['email_from'] . "\n\n-------------------\n" . $board_config['email_sig']; + // // Profiles/Registration // @@ -230,6 +232,7 @@ $lang['Upload_Image'] = "Upload Image"; $lang['Delete_Image'] = "Delete Image"; $lang['Current_Image'] = "Current Image"; +$lang['Notify_on_privmsg'] = "Notify on Private Message"; // diff --git a/phpBB/profile.php b/phpBB/profile.php index 1213fc8481..b5c19e8076 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -336,6 +336,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $signature = (!empty($HTTP_POST_VARS['signature'])) ? trim(str_replace("<br />", "\n", $HTTP_POST_VARS['signature'])) : ""; $viewemail = $HTTP_POST_VARS['viewemail']; + $notifypm = $HTTP_POST_VARS['notifypm']; $attachsig = $HTTP_POST_VARS['attachsig']; $allowhtml = $HTTP_POST_VARS['allowhtml']; $allowbbcode = $HTTP_POST_VARS['allowbbcode']; @@ -474,7 +475,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) { $sql = "UPDATE ".USERS_TABLE." - SET username = '$username'".$passwd_sql.", user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_template = '$user_template', user_theme = $user_theme".$avatar_sql." + SET username = '$username'".$passwd_sql.", user_email = '$email', user_icq = '$icq', user_website = '$website', user_occ = '$occupation', user_from = '$location', user_interests = '$interests', user_sig = '$signature', user_viewemail = $viewemail, user_aim = '$aim', user_yim = '$yim', user_msnm = '$msn', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_notify_pm = $notifypm, user_timezone = $user_timezone, user_dateformat = '$user_dateformat', user_lang = '$user_lang', user_template = '$user_template', user_theme = $user_theme".$avatar_sql." WHERE user_id = $user_id"; if($result = $db->sql_query($sql)) @@ -542,6 +543,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $signature = $userdata['user_sig']; $viewemail = $userdata['user_viewemail']; + $notifypm = $userdata['user_notify_pm']; $attachsig = $userdata['user_attachsig']; $allowhtml = $userdata['user_allowhtml']; $allowbbcode = $userdata['user_allowbbcode']; @@ -581,7 +583,9 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "WEBSITE" => stripslashes($website), "SIGNATURE" => stripslashes(str_replace("<br />", "\n", $signature)), "VIEW_EMAIL_YES" => ($viewemail) ? "CHECKED" : "", - "VIEW_EMAIL_NO" => (!$viewemail) ? "CHECKED" : "", + "VIEW_EMAIL_NO" => (!$viewemail) ? "CHECKED" : "", + "NOTIFY_PM_YES" => ($notifypm) ? "CHECKED" : "", + "NOTIFY_PM_NO" => (!$notifypm) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_NO" => (!$attachsig) ? "CHECKED" : "", "ALWAYS_ALLOW_BBCODE_YES" => ($allowbbcode) ? "CHECKED" : "", @@ -629,7 +633,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_DELETE_IMAGE" => $lang['Delete_Image'], "L_CURRENT_IMAGE" => $lang['Current_Image'], "L_SIGNATURE" => $l_signature, - "L_SIGNATURE_EXPLAIN" => $l_sigexplain, + "L_SIGNATURE_EXPLAIN" => $l_sigexplain, + "L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'], "L_PREFERENCES" => $l_preferences, "L_PUBLIC_VIEW_EMAIL" => $l_publicmail, "L_ITEMS_REQUIRED" => $l_itemsreq, @@ -666,6 +671,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) $signature = (!empty($HTTP_POST_VARS['signature'])) ? trim($HTTP_POST_VARS['signature']) : ""; $viewemail = (!empty($HTTP_POST_VARS['viewemail'])) ? $HTTP_POST_VARS['viewemail'] : 0; + $notifypm = (!empty($HTTP_POST_VARS['notifypm'])) ? $HTTP_POST_VARS['notifypm'] : 1; $attachsig = (!empty($HTTP_POST_VARS['attachsig'])) ? $HTTP_POST_VARS['attachsig'] : 0; $allowhtml = (!empty($HTTP_POST_VARS['allowhtml'])) ? $HTTP_POST_VARS['allowhtml'] : $board_config['allow_html']; $allowbbcode = (!empty($HTTP_POST_VARS['allowbbcode'])) ? $HTTP_POST_VARS['allowbbcode'] : $board_config['allow_bbcode']; @@ -870,8 +876,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) { $md_pass = md5($password); - $sql = "INSERT INTO ".USERS_TABLE." (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_timezone, user_dateformat, user_lang, user_template, user_theme, user_level, user_active, user_actkey) - VALUES ($new_user_id, '$username', '$regdate', '$md_pass', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$avatar_filename', '$viewemail', '$aim', '$yim', '$msn', $attachsig, $allowsmilies, '$allowhtml', $allowbbcode, $user_timezone, '$user_dateformat', '$user_lang', '$user_template', $user_theme, 0, "; + $sql = "INSERT INTO ".USERS_TABLE." (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_avatar, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_notify_pm, user_timezone, user_dateformat, user_lang, user_template, user_theme, user_level, user_active, user_actkey) + VALUES ($new_user_id, '$username', '$regdate', '$md_pass', '$email', '$icq', '$website', '$occupation', '$location', '$interests', '$signature', '$avatar_filename', '$viewemail', '$aim', '$yim', '$msn', $attachsig, $allowsmilies, '$allowhtml', $allowbbcode, $notifypm, $user_timezone, '$user_dateformat', '$user_lang', '$user_template', $user_theme, 0, "; if($require_activation || $coppa == 1) { $act_key = generate_activation_key(); @@ -1015,6 +1021,8 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "SIGNATURE" => stripslashes($signature), "VIEW_EMAIL_YES" => ($viewemail) ? "CHECKED" : "", "VIEW_EMAIL_NO" => (!$viewemail) ? "CHECKED" : "", + "NOTIFY_PM_YES" => ($notifypm) ? "CHECKED" : "", + "NOTIFY_PM_NO" => (!$notifypm) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_YES" => ($attachsig) ? "CHECKED" : "", "ALWAYS_ADD_SIGNATURE_NO" => (!$attachsig) ? "CHECKED" : "", "ALWAYS_ALLOW_BBCODE_YES" => ($allowbbcode) ? "CHECKED" : "", @@ -1058,6 +1066,7 @@ if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode'])) "L_CURRENT_IMAGE" => $lang['Current_Image'], "L_SIGNATURE" => $l_signature, "L_SIGNATURE_EXPLAIN" => $l_sigexplain, + "L_NOTIFY_ON_PRIVMSG" => $lang['Notify_on_privmsg'], "L_PREFERENCES" => $l_preferences, "L_PUBLIC_VIEW_EMAIL" => $l_publicmail, "L_ITEMS_REQUIRED" => $l_itemsreq, diff --git a/phpBB/templates/PSO/profile_add_body.tpl b/phpBB/templates/PSO/profile_add_body.tpl index 26842860b0..259e2e03aa 100644 --- a/phpBB/templates/PSO/profile_add_body.tpl +++ b/phpBB/templates/PSO/profile_add_body.tpl @@ -73,6 +73,10 @@ <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="viewemail" value="1" {VIEW_EMAIL_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="viewemail" value="0" {VIEW_EMAIL_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> </tr> <tr> + <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NOTIFY_ON_PRIVMSG}:</font></td> + <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="notifypm" value="1" {NOTIFY_PM_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="notifypm" value="0" {NOTIFY_PM_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> + </tr> + <tr> <td bgcolor="{T_TD_COLOR1}"><font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_ALWAYS_ADD_SIGNATURE}:</font></td> <td bgcolor="{T_TD_COLOR2}"><input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_YES}</font> <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO}> <font face="{T_FONTFACE1}" size="{T_FONTSIZE2}">{L_NO}</font></td> </tr> |