From 54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sat, 4 Oct 2003 14:00:31 +0000 Subject: [PATCH] Add "Add Friend" to viewprofile git-svn-id: file:///svn/phpbb/trunk@4528 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/language/en/lang_main.php | 5 +++-- phpBB/memberlist.php | 5 +++-- phpBB/styles/subSilver/template/memberlist_view.html | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index 220084fed0..3ef4ec1818 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -1052,6 +1052,7 @@ $lang += array( 'SEARCH_USER_POSTS' => 'Search users posts', 'USER_ONLINE' => 'Online', 'USER_OFFLINE' => 'Offline', + 'ADD_FRIEND' => 'Add friend', 'SEND_IM' => 'Instant Messaging', 'IM_RECIPIENT' => 'Recipient', @@ -1212,7 +1213,7 @@ $lang += array( 'VIEWING_FAQ' => 'Viewing FAQ' ); -//---- MCP lang strings +// mcp $lang += array( 'NOT_MODERATOR' => 'You are not a moderator of this forum', @@ -1379,7 +1380,7 @@ $lang += array( 'logm_make_global' => 'Changed topic type to Global Announcement' ); -//----- Post reporting +// report $lang += array( 'REASON' => 'Reason', 'MORE_INFO' => 'Further information', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index e4b1914e9b..004a24c954 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -415,6 +415,7 @@ switch ($mode) 'S_PROFILE_ACTION' => "groupcp.$phpEx$SID", 'S_GROUP_OPTIONS' => $group_options, + 'U_ADD_FRIEND' => "ucp.$phpEx$SID&i=zebra&add=" . urlencode($member['username']), 'U_ACTIVE_FORUM' => "viewforum.$phpEx$SID&f=$active_f_id", 'U_ACTIVE_TOPIC' => "viewtopic.$phpEx$SID&t=$active_t_id",) ); @@ -517,12 +518,12 @@ switch ($mode) } else { - if ($email == '' || !preg_match('#^.*?@(.*?\.)?[a-z0-9\-]+\.[a-z]{2,4}$#i', $email)) + if (!$email || !preg_match('#^.*?@(.*?\.)?[a-z0-9\-]+\.[a-z]{2,4}$#i', $email)) { $error[] = $user->lang['EMPTY_ADDRESS_EMAIL']; } - if ($name == '') + if (!$name) { $error[] = $user->lang['EMPTY_NAME_EMAIL']; } diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html index 8023ef6d63..3ef40dc23d 100644 --- a/phpBB/styles/subSilver/template/memberlist_view.html +++ b/phpBB/styles/subSilver/template/memberlist_view.html @@ -40,6 +40,11 @@ {ONLINE_IMG} + + + [ {L_ADD_FRIEND} ] + +