diff options
author | Nils Adermann <naderman@naderman.de> | 2014-05-02 18:29:50 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2014-05-02 18:29:50 +0200 |
commit | b187031082aa41e5d2da5537ca403677dc7e05ce (patch) | |
tree | 39a0d07cf8d7454ee3586f7896450a95ddad8708 /phpBB/viewtopic.php | |
parent | f0be9549ac14c49cad44b1476382aedf2a6f4af8 (diff) | |
parent | ed4b72d1f2e1cc96ebec845f9af97db406065c6b (diff) | |
download | forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.gz forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.bz2 forums-b187031082aa41e5d2da5537ca403677dc7e05ce.tar.xz forums-b187031082aa41e5d2da5537ca403677dc7e05ce.zip |
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
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fc40dd65bb..0691355563 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1621,6 +1621,13 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) (($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm']) ); + $u_pm = ''; + + if ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) + { + $u_pm = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']); + } + // $post_row = array( 'POST_AUTHOR_FULL' => ($poster_id != ANONYMOUS) ? $user_cache[$poster_id]['author_full'] : get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), @@ -1660,7 +1667,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_DELETE' => ($delete_allowed) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '', 'U_SEARCH' => $user_cache[$poster_id]['search'], - 'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && $can_receive_pm) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&mode=compose&action=quotepost&p=' . $row['post_id']) : '', + 'U_PM' => $u_pm, 'U_EMAIL' => $user_cache[$poster_id]['email'], 'U_JABBER' => $user_cache[$poster_id]['jabber'], @@ -1744,11 +1751,46 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // Dump vars into template $template->assign_block_vars('postrow', $post_row); + $contact_fields = array( + array( + 'ID' => 'pm', + 'NAME' => $user->lang['PRIVATE_MESSAGES'], + 'U_CONTACT' => $u_pm, + ), + array( + 'ID' => 'email', + 'NAME' => $user->lang['SEND_EMAIL'], + 'U_CONTACT' => $user_cache[$poster_id]['email'], + ), + array( + 'ID' => 'jabber', + 'NAME' => $user->lang['JABBER'], + 'U_CONTACT' => $user_cache[$poster_id]['jabber'], + ), + ); + + foreach ($contact_fields as $field) + { + if ($field['U_CONTACT']) + { + $template->assign_block_vars('postrow.contact', $field); + } + } + if (!empty($cp_row['blockrow'])) { foreach ($cp_row['blockrow'] as $field_data) { $template->assign_block_vars('postrow.custom_fields', $field_data); + + if ($field_data['S_PROFILE_CONTACT']) + { + $template->assign_block_vars('postrow.contact', array( + 'ID' => $field_data['PROFILE_FIELD_IDENT'], + 'NAME' => $field_data['PROFILE_FIELD_NAME'], + 'U_CONTACT' => $field_data['PROFILE_FIELD_CONTACT'], + )); + } } } |