Add "Add Friend" to viewprofile

git-svn-id: file:///svn/phpbb/trunk@4528 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-10-04 14:00:31 +00:00
parent 7c940b9dc2
commit 54a3a8e2db
3 changed files with 11 additions and 4 deletions

View file

@ -1052,6 +1052,7 @@ $lang += array(
'SEARCH_USER_POSTS' => 'Search users posts', 'SEARCH_USER_POSTS' => 'Search users posts',
'USER_ONLINE' => 'Online', 'USER_ONLINE' => 'Online',
'USER_OFFLINE' => 'Offline', 'USER_OFFLINE' => 'Offline',
'ADD_FRIEND' => 'Add friend',
'SEND_IM' => 'Instant Messaging', 'SEND_IM' => 'Instant Messaging',
'IM_RECIPIENT' => 'Recipient', 'IM_RECIPIENT' => 'Recipient',
@ -1212,7 +1213,7 @@ $lang += array(
'VIEWING_FAQ' => 'Viewing FAQ' 'VIEWING_FAQ' => 'Viewing FAQ'
); );
//---- MCP lang strings // mcp
$lang += array( $lang += array(
'NOT_MODERATOR' => 'You are not a moderator of this forum', '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' 'logm_make_global' => '<b>Changed topic type</b> to Global Announcement'
); );
//----- Post reporting // report
$lang += array( $lang += array(
'REASON' => 'Reason', 'REASON' => 'Reason',
'MORE_INFO' => 'Further information', 'MORE_INFO' => 'Further information',

View file

@ -415,6 +415,7 @@ switch ($mode)
'S_PROFILE_ACTION' => "groupcp.$phpEx$SID", 'S_PROFILE_ACTION' => "groupcp.$phpEx$SID",
'S_GROUP_OPTIONS' => $group_options, '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_FORUM' => "viewforum.$phpEx$SID&amp;f=$active_f_id",
'U_ACTIVE_TOPIC' => "viewtopic.$phpEx$SID&amp;t=$active_t_id",) 'U_ACTIVE_TOPIC' => "viewtopic.$phpEx$SID&amp;t=$active_t_id",)
); );
@ -517,12 +518,12 @@ switch ($mode)
} }
else 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']; $error[] = $user->lang['EMPTY_ADDRESS_EMAIL'];
} }
if ($name == '') if (!$name)
{ {
$error[] = $user->lang['EMPTY_NAME_EMAIL']; $error[] = $user->lang['EMPTY_NAME_EMAIL'];
} }

View file

@ -40,6 +40,11 @@
<tr> <tr>
<td align="center">{ONLINE_IMG}</td> <td align="center">{ONLINE_IMG}</td>
</tr> </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> </table></td>
<td class="row1" valign="top"><table width="100%" cellspacing="1" cellpadding="2" border="0"> <td class="row1" valign="top"><table width="100%" cellspacing="1" cellpadding="2" border="0">
<tr> <tr>