aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/admin/admin_board.php9
-rw-r--r--phpBB/db/mysql_basic.sql1
-rwxr-xr-xphpBB/db/postgres_basic.sql1
-rw-r--r--phpBB/groupcp.php13
-rw-r--r--phpBB/language/lang_english/lang_main.php4
-rw-r--r--phpBB/memberlist.php4
-rw-r--r--phpBB/privmsg.php11
-rw-r--r--phpBB/profile.php8
-rw-r--r--phpBB/templates/subSilver/admin/board_config_body.tpl4
-rw-r--r--phpBB/viewtopic.php11
10 files changed, 53 insertions, 13 deletions
diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php
index 9c4cd0ba7e..86f0edceac 100644
--- a/phpBB/admin/admin_board.php
+++ b/phpBB/admin/admin_board.php
@@ -84,6 +84,9 @@ $activation_none = ( $new['require_activation'] == USER_ACTIVATION_NONE ) ? "che
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
+$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
+$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";
+
$gzip_yes = ( $new['gzip_compress'] ) ? "checked=\"checked\"" : "";
$gzip_no = ( !$new['gzip_compress'] ) ? "checked=\"checked\"" : "";
@@ -136,7 +139,9 @@ $template->assign_vars(array(
"L_DISABLED" => $lang['Disabled'],
"L_ABILITIES_SETTINGS" => $lang['Abilities_settings'],
"L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
- "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
+ "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
+ "L_BOARD_EMAIL_FORM" => $lang['Board_email_form'],
+ "L_BOARD_EMAIL_FORM_EXPLAIN" => $lang['Board_email_form_explain'],
"L_TOPICS_PER_PAGE" => $lang['Topics_per_page'],
"L_POSTS_PER_PAGE" => $lang['Posts_per_page'],
"L_HOT_THRESHOLD" => $lang['Hot_threshold'],
@@ -193,6 +198,8 @@ $template->assign_vars(array(
"ACTIVATION_USER_CHECKED" => $activation_user,
"ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN,
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
+ "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes,
+ "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no,
"FLOOD_INTERVAL" => $new['flood_interval'],
"TOPICS_PER_PAGE" => $new['topics_per_page'],
"POSTS_PER_PAGE" => $new['posts_per_page'],
diff --git a/phpBB/db/mysql_basic.sql b/phpBB/db/mysql_basic.sql
index 0cd95709b8..86b229bcd8 100644
--- a/phpBB/db/mysql_basic.sql
+++ b/phpBB/db/mysql_basic.sql
@@ -40,6 +40,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','')
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
diff --git a/phpBB/db/postgres_basic.sql b/phpBB/db/postgres_basic.sql
index 9c35528b0d..1a6719fa63 100755
--- a/phpBB/db/postgres_basic.sql
+++ b/phpBB/db/postgres_basic.sql
@@ -40,6 +40,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','')
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php
index b3895a3dd2..f3b4983b3e 100644
--- a/phpBB/groupcp.php
+++ b/phpBB/groupcp.php
@@ -718,18 +718,19 @@ else if( $group_id )
$posts = ($group_members[$i]['user_posts']) ? $group_members[$i]['user_posts'] : 0;
-
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . " $poster\" border=\"0\" /></a>";
$pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$user_id") . "\"><img src=\"". $images['icon_pm'] . "\" alt=\"" . $lang['Private_messaging'] . "\" border=\"0\" /></a>";
if( !empty($group_members[$i]['user_viewemail']) )
{
- $email_img = ( $group_members[$i]['user_viewemail'] ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $group_members[$i]['user_id']) . "\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>" : "";
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $group_members[$i]['user_id']) : "mailto:" . $group_members[$i]['user_email'];
+
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " " . $group_members[$i]['username'] . "\" border=\"0\" /></a>";
}
else
{
- $email_img = "&nbsp;";
+ $email_img = "";
}
$www_img = ( $group_members[$i]['user_website'] ) ? "<a href=\"" . $group_members[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "&nbsp;";
@@ -880,11 +881,13 @@ else if( $group_id )
if( !empty($modgroup_pending_list[$i]['user_viewemail']) )
{
- $email_img = ( $modgroup_pending_list[$i]['user_viewemail'] ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $modgroup_pending_list[$i]['user_id']) . "\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>" : "";
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $modgroup_pending_list[$i]['user_id']) : "mailto:" . $modgroup_pending_list[$i]['user_email'];
+
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " " . $modgroup_pending_list[$i]['username'] . "\" border=\"0\" /></a>";
}
else
{
- $email_img = "&nbsp;";
+ $email_img = "";
}
$www_img = ( $modgroup_pending_list[$i]['user_website'] ) ? "<a href=\"" . $modgroup_pending_list[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
diff --git a/phpBB/language/lang_english/lang_main.php b/phpBB/language/lang_english/lang_main.php
index e5edbb813f..a393d0c797 100644
--- a/phpBB/language/lang_english/lang_main.php
+++ b/phpBB/language/lang_english/lang_main.php
@@ -956,7 +956,9 @@ $lang['Acct_activation'] = "Enable account activation";
$lang['Abilities_settings'] = "User/Forum Ability Settings";
$lang['Flood_Interval'] = "Flood Interval";
-$lang['Flood_Interval_explain'] = "Number of seconds a user must wait between posts";
+$lang['Flood_Interval_explain'] = "Number of seconds a user must wait between posts";
+$lang['Board_email_form'] = "User email via board";
+$lang['Board_email_form_explain'] = "Users send email to each other via this board";
$lang['Topics_per_page'] = "Topics Per Page";
$lang['Posts_per_page'] = "Posts Per Page";
$lang['Hot_threshold'] = "Hot Threshold";
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 36a7cedf24..a69aa383f6 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -187,7 +187,9 @@ if(($selected_members = $db->sql_numrows($result)) > 0)
if( !empty($members[$i]['user_viewemail']) )
{
- $email_img = "<a href=\"" . append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=$user_id") . "\"><img src=\"" . $images['icon_email'] . "\" border=\"0\" alt=\"" . $lang['Send_an_email'] . "\" /></a>";
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $members[$i]['user_id']) : "mailto:" . $members[$i]['user_email'];
+
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" border=\"0\" alt=\"" . $lang['Send_email'] . " " . $members[$i]['username'] . "\" /></a>";
}
else
{
diff --git a/phpBB/privmsg.php b/phpBB/privmsg.php
index e92d9c9d0b..ba0f42b04c 100644
--- a/phpBB/privmsg.php
+++ b/phpBB/privmsg.php
@@ -388,7 +388,16 @@ if( $mode == "read" )
$profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id_from") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . " $username_from\" border=\"0\" /></a>";
- $email_img = ( $privmsg['user_viewemail'] ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=$user_id_from") . "\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>" : "";
+ if( !empty($privmsg['user_viewemail']) )
+ {
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $user_id_from) : "mailto:" . $privmsg['user_email'];
+
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $username_from\" border=\"0\" /></a>";
+ }
+ else
+ {
+ $email_img = "";
+ }
$www_img = ( $privmsg['user_website']) ? "<a href=\"" . $privmsg['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
diff --git a/phpBB/profile.php b/phpBB/profile.php
index 471b0caf76..8b6c5649ef 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -258,12 +258,12 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
$percentage = 0;
}
- if( $profiledata['user_viewemail'] && $profiledata['user_email'] != "" )
+ if( !empty($profiledata['user_viewemail']) )
{
- $email_profile = append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL . "=" . $profiledata['user_id']);
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $profiledata['user_id']) : "mailto:" . $profiledata['user_email'];
- $email = "<a href=\"$email_profile\">" . $lang['Send_email'] . "</a>";
- $email_img = "<a href=\"$email_profile\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " " . $profiledata['username'] . "\" border=\"0\" /></a>";
+ $email = "<a href=\"$email_uri\">" . $lang['Send_email'] . "</a>";
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " " . $profiledata['username'] . "\" border=\"0\" /></a>";
}
else
{
diff --git a/phpBB/templates/subSilver/admin/board_config_body.tpl b/phpBB/templates/subSilver/admin/board_config_body.tpl
index bd729d30ae..5b720f816d 100644
--- a/phpBB/templates/subSilver/admin/board_config_body.tpl
+++ b/phpBB/templates/subSilver/admin/board_config_body.tpl
@@ -20,6 +20,10 @@
<td class="row2"><input type="radio" name="require_activation" value="{ACTIVATION_NONE}" {ACTIVATION_NONE_CHECKED}>{L_NO}ne&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_USER}" {ACTIVATION_USER_CHECKED}>User&nbsp; &nbsp;<input type="radio" name="require_activation" value="{ACTIVATION_ADMIN}" {ACTIVATION_ADMIN_CHECKED}>Admin</td>
</tr>
<tr>
+ <td class="row1">{L_BOARD_EMAIL_FORM}<br /><span class="gensmall">{L_BOARD_EMAIL_FORM_EXPLAIN}</span></td>
+ <td class="row2"><input type="radio" name="board_email_form" value="1" {BOARD_EMAIL_FORM_ENABLE}> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="board_email_form" value="0" {BOARD_EMAIL_FORM_DISABLE}> {L_DISABLED}</td>
+ </tr>
+ <tr>
<td class="row1">{L_FLOOD_INTERVAL} <br /><span class="gensmall">{L_FLOOD_INTERVAL_EXPLAIN}</span></td>
<td class="row2"><input type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}"></td>
</tr>
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index a845e4b447..988de9ec51 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -785,6 +785,17 @@ for($i = 0; $i < $total_posts; $i++)
$pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&amp;" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"". $images['icon_pm'] . "\" alt=\"" . $lang['Private_messaging'] . "\" border=\"0\" /></a>";
+ if( !empty($postrow[$i]['user_viewemail']) )
+ {
+ $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=" . $poster_id) : "mailto:" . $postrow[$i]['user_email'];
+
+ $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>";
+ }
+ else
+ {
+ $email_img = "";
+ }
+
$email_img = ( $postrow[$i]['user_viewemail'] ) ? "<a href=\"" . append_sid("profile.$phpEx?mode=email&amp;" . POST_USERS_URL ."=$poster_id") . "\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . " $poster\" border=\"0\" /></a>" : "";
$www_img = ($postrow[$i]['user_website']) ? "<a href=\"" . $postrow[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";