1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 08:47:45 +02:00

Merge remote-tracking branch 'github-prototech/ticket/12265' into develop-ascraeus

* github-prototech/ticket/12265:
  [ticket/12265] Actually use $u_pm.
  [ticket/12265] Ensure that dropdown is always at the very left of the container
  [ticket/12265] Define a loop for contact icons.
  [ticket/12265] Break the icons that aren't in loop in case extensions add more
  [ticket/12265] Fix modulo logic.
  [ticket/12265] Adjust alignment of AIM and Jabber icons.
  [ticket/12265] Ensure that there's only 4 icons per row in IE & Opera.
  [ticket/12265] Add contact icon and remove border from last row & cells.
  [ticket/12265] Fix issue with dropdown being restricted by the width of parent
  [ticket/12265] Remove ugly logic.
  [ticket/12265] Simplify contact icon design and move to dropdown.

Conflicts:
	phpBB/viewtopic.php
This commit is contained in:
Nils Adermann
2014-05-02 18:29:50 +02:00
22 changed files with 229 additions and 79 deletions

View File

@@ -177,6 +177,18 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
}
}
$u_pm = $u_jabber = '';
if ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')))
{
$u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id);
}
if ($user_info['user_jabber'] && $auth->acl_get('u_sendim'))
{
$u_jabber = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id);
}
$msg_data = array(
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
@@ -208,8 +220,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'EDITED_MESSAGE' => $l_edited_by,
'MESSAGE_ID' => $message_row['msg_id'],
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($user_info['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&u=' . $author_id) : '',
'U_JABBER' => ($user_info['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $author_id) : '',
'U_PM' => $u_pm,
'U_JABBER' => $u_jabber,
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
'U_EMAIL' => $user_info['email'],
@@ -264,6 +276,32 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
$template->assign_vars($msg_data);
$contact_fields = array(
array(
'ID' => 'pm',
'NAME' => $user->lang['PRIVATE_MESSAGE'],
'U_CONTACT' => $u_pm,
),
array(
'ID' => 'email',
'NAME' => $user->lang['SEND_EMAIL'],
'U_CONTACT' => $user_info['email'],
),
array(
'ID' => 'jabber',
'NAME' => $user->lang['JABBER'],
'U_CONTACT' => $u_jabber,
),
);
foreach ($contact_fields as $field)
{
if ($field['U_CONTACT'])
{
$template->assign_block_vars('contact', $field);
}
}
// Display the custom profile fields
if (!empty($cp_row['row']))
{
@@ -272,6 +310,15 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
foreach ($cp_row['blockrow'] as $cp_block_row)
{
$template->assign_block_vars('custom_fields', $cp_block_row);
if ($cp_block_row['S_PROFILE_CONTACT'])
{
$template->assign_block_vars('contact', array(
'ID' => $cp_block_row['PROFILE_FIELD_IDENT'],
'NAME' => $cp_block_row['PROFILE_FIELD_NAME'],
'U_CONTACT' => $cp_block_row['PROFILE_FIELD_CONTACT'],
));
}
}
}