aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-10-04 14:00:31 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-10-04 14:00:31 +0000
commit54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37 (patch)
tree7a77501c3575e324269d7f2f9f4c9be3f861dfe5
parent7c940b9dc23e67d7bad8f592bcf6534f36b4d78a (diff)
downloadforums-54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37.tar
forums-54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37.tar.gz
forums-54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37.tar.bz2
forums-54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37.tar.xz
forums-54a3a8e2dbd0dc9a04a4b8eb7e5ac3255ae46b37.zip
Add "Add Friend" to viewprofile
git-svn-id: file:///svn/phpbb/trunk@4528 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/language/en/lang_main.php5
-rw-r--r--phpBB/memberlist.php5
-rw-r--r--phpBB/styles/subSilver/template/memberlist_view.html5
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' => '<b>Changed topic type</b> 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&amp;i=zebra&amp;add=" . urlencode($member['username']),
'U_ACTIVE_FORUM' => "viewforum.$phpEx$SID&amp;f=$active_f_id",
'U_ACTIVE_TOPIC' => "viewtopic.$phpEx$SID&amp;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 @@
<tr>
<td align="center">{ONLINE_IMG}</td>
</tr>
+ <!-- IF S_USER_LOGGED_IN -->
+ <tr>
+ <td class="genmed" align="center">[ <a href="{U_ADD_FRIEND}">{L_ADD_FRIEND}</a> ]</td>
+ </tr>
+ <!-- ENDIF -->
</table></td>
<td class="row1" valign="top"><table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr>