Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [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.
|
@ -918,9 +918,10 @@ phpbb.toggleDropdown = function() {
|
|||
// Check dimensions when showing dropdown
|
||||
// !visible because variable shows state of dropdown before it was toggled
|
||||
if (!visible) {
|
||||
var windowWidth = $(window).width();
|
||||
|
||||
options.dropdown.find('.dropdown-contents').each(function() {
|
||||
var $this = $(this),
|
||||
windowWidth = $(window).width();
|
||||
var $this = $(this);
|
||||
|
||||
$this.css({
|
||||
marginLeft: 0,
|
||||
|
@ -938,6 +939,13 @@ phpbb.toggleDropdown = function() {
|
|||
$this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
|
||||
}
|
||||
});
|
||||
var freeSpace = parent.offset().left - 4;
|
||||
|
||||
if (direction == 'left') {
|
||||
options.dropdown.css('margin-left', '-' + freeSpace + 'px');
|
||||
} else {
|
||||
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent event propagation
|
||||
|
|
|
@ -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'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -167,6 +167,7 @@ $lang = array_merge($lang, array(
|
|||
'CONGRATULATIONS' => 'Congratulations to',
|
||||
'CONNECTION_FAILED' => 'Connection failed.',
|
||||
'CONNECTION_SUCCESS' => 'Connection was successful!',
|
||||
'CONTACT_USER' => 'Contact',
|
||||
'COOKIES_DELETED' => 'All board cookies successfully deleted.',
|
||||
'CURRENT_TIME' => 'It is currently %s',
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ $lang = array_merge($lang, array(
|
|||
'BEFORE' => 'Before',
|
||||
|
||||
'CC_EMAIL' => 'Send a copy of this email to yourself.',
|
||||
'CONTACT_USER' => 'Contact',
|
||||
|
||||
'DEST_LANG' => 'Language',
|
||||
'DEST_LANG_EXPLAIN' => 'Select an appropriate language (if available) for the recipient of this message.',
|
||||
|
|
|
@ -34,25 +34,30 @@
|
|||
<!-- EVENT ucp_pm_viewmessage_custom_fields_after -->
|
||||
|
||||
|
||||
<!-- IF U_PM or U_EMAIL or U_JABBER -->
|
||||
<dd class="profile-contact">
|
||||
<ul class="profile-icons">
|
||||
<!-- EVENT ucp_pm_viewmessage_contact_fields_before -->
|
||||
<!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_JABBER --><li class="jabber-icon"><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
|
||||
<!-- BEGIN custom_fields -->
|
||||
<!-- IF custom_fields.S_PROFILE_CONTACT -->
|
||||
<li class="{custom_fields.PROFILE_FIELD_IDENT}-icon">
|
||||
<a href="<!-- IF custom_fields.PROFILE_FIELD_CONTACT -->{custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{U_MESSAGE_AUTHOR}<!-- ENDIF -->">
|
||||
<span>{custom_fields.PROFILE_FIELD_NAME}</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END custom_fields -->
|
||||
<!-- EVENT ucp_pm_viewmessage_contact_fields_after -->
|
||||
</ul>
|
||||
</dd>
|
||||
<!-- IF .contact -->
|
||||
<dd class="profile-contact">
|
||||
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
||||
<div class="dropdown-container dropdown-left">
|
||||
<a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
|
||||
<div class="dropdown hidden">
|
||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||
<div class="dropdown-contents contact-icons">
|
||||
<!-- BEGIN contact -->
|
||||
{% set REMAINDER = contact.S_ROW_COUNT % 4 %}
|
||||
<!-- DEFINE $S_LAST_CELL = ((REMAINDER eq 3) or (contact.S_LAST_ROW and contact.S_NUM_ROWS < 4)) -->
|
||||
<!-- IF REMAINDER eq 0 -->
|
||||
<div>
|
||||
<!-- ENDIF -->
|
||||
<a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
|
||||
<span class="contact-icon {contact.ID}-icon"></span>
|
||||
</a>
|
||||
<!-- IF REMAINDER eq 3 or contact.S_LAST_ROW -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- END contact -->
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
|
||||
|
|
|
@ -143,26 +143,32 @@
|
|||
<!-- END custom_fields -->
|
||||
<!-- EVENT viewtopic_body_postrow_custom_fields_after -->
|
||||
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_JABBER -->
|
||||
<!-- IF not S_IS_BOT and .postrow.contact -->
|
||||
<dd class="profile-contact">
|
||||
<ul class="profile-icons">
|
||||
<!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_JABBER --><li class="jabber-icon"><a href="{postrow.U_JABBER}" onclick="popup(this.href, 550, 320); return false;" title="{L_JABBER}"><span>{L_JABBER}</span></a></li><!-- ENDIF -->
|
||||
<!-- BEGIN custom_fields -->
|
||||
<!-- IF postrow.custom_fields.S_PROFILE_CONTACT -->
|
||||
<li class="{postrow.custom_fields.PROFILE_FIELD_IDENT}-icon">
|
||||
<a href="<!-- IF postrow.custom_fields.PROFILE_FIELD_CONTACT -->{postrow.custom_fields.PROFILE_FIELD_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->">
|
||||
<span>{postrow.custom_fields.PROFILE_FIELD_NAME}</span>
|
||||
</a>
|
||||
</li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END custom_fields -->
|
||||
</ul>
|
||||
<strong>{L_CONTACT_USER}{L_COLON}</strong>
|
||||
<div class="dropdown-container dropdown-left">
|
||||
<a href="#" class="dropdown-trigger"><span class="imageset icon_contact"></span></a>
|
||||
<div class="dropdown hidden">
|
||||
<div class="pointer"><div class="pointer-inner"></div></div>
|
||||
<div class="dropdown-contents contact-icons">
|
||||
<!-- BEGIN contact -->
|
||||
{% set REMAINDER = postrow.contact.S_ROW_COUNT % 4 %}
|
||||
<!-- DEFINE $S_LAST_CELL = ((REMAINDER eq 3) or (postrow.contact.S_LAST_ROW and postrow.contact.S_NUM_ROWS < 4)) -->
|
||||
<!-- IF REMAINDER eq 0 -->
|
||||
<div>
|
||||
<!-- ENDIF -->
|
||||
<a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
|
||||
<span class="contact-icon {postrow.contact.ID}-icon"></span>
|
||||
</a>
|
||||
<!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- END contact -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
</dl>
|
||||
|
||||
|
|
|
@ -214,20 +214,53 @@ ul.profile-icons.responsive a.responsive-menu-link:before {
|
|||
max-width: 40%;
|
||||
}
|
||||
|
||||
.contact-icons.dropdown-contents {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.contact-icon {
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.contact-icons a {
|
||||
border-bottom: 1px dotted;
|
||||
border-right: 1px dotted;
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.contact-icons .last-cell {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.contact-icons div:last-child a {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.contact-icons div {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
|
||||
/* Profile & navigation icons */
|
||||
.email-icon, .email-icon a { background: none top left no-repeat; }
|
||||
.aim-icon, .aim-icon a { background: none top left no-repeat; }
|
||||
.phpbb_aol-icon, .phpbb_aol-icon a { background: none top left no-repeat; }
|
||||
.yahoo-icon, .yahoo-icon a { background: none top left no-repeat; }
|
||||
.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background: none top left no-repeat; }
|
||||
.web-icon, .web-icon a { background: none top left no-repeat; }
|
||||
.phpbb_website-icon, .phpbb_website-icon a { background: none top left no-repeat; }
|
||||
.msnm-icon, .msnm-icon a { background: none top left no-repeat; }
|
||||
.phpbb_wlm-icon, .phpbb_wlm-icon a { background: none top left no-repeat; }
|
||||
.icq-icon, .icq-icon a { background: none top left no-repeat; }
|
||||
.phpbb_icq-icon, .phpbb_icq-icon a { background: none top left no-repeat; }
|
||||
.jabber-icon, .jabber-icon a { background: none top left no-repeat; }
|
||||
.pm-icon, .pm-icon a { background: none top left no-repeat; }
|
||||
.pm-icon { background-position: 0 0; }
|
||||
.email-icon { background-position: -21px 0; }
|
||||
.jabber-icon { background-position: -80px 0; }
|
||||
.phpbb_icq-icon { background-position: -61px 0 ; }
|
||||
.phpbb_wlm-icon { background-position: -182px 0; }
|
||||
.phpbb_aol-icon { background-position: -244px 0; }
|
||||
.phpbb_website-icon { background-position: -40px 0; }
|
||||
.phpbb_youtube-icon { background-position: -98px 0; }
|
||||
.phpbb_facebook-icon { background-position: -119px 0; }
|
||||
.phpbb_google_plus-icon { background-position: -140px 0; }
|
||||
.phpbb_skype-icon { background-position: -161px 0; }
|
||||
.phpbb_twitter-icon { background-position: -203px 0; }
|
||||
.phpbb_yahoo-icon { background-position: -224px 0; }
|
||||
|
||||
.quote-icon, .quote-icon a { background: none top left no-repeat; }
|
||||
|
||||
/* Moderator icons */
|
||||
|
|
|
@ -710,6 +710,14 @@ Colours and backgrounds for buttons.css
|
|||
background-image: url("images/buttons.png");
|
||||
}
|
||||
|
||||
.contact-icons a {
|
||||
border-color: #DCDCDC;
|
||||
}
|
||||
|
||||
.contact-icons a:hover {
|
||||
background-color: #F2F6F9;
|
||||
}
|
||||
|
||||
/* Icon images
|
||||
---------------------------------------- */
|
||||
.icon-faq { background-image: url("./images/icon_faq.gif"); }
|
||||
|
@ -732,19 +740,8 @@ Colours and backgrounds for buttons.css
|
|||
.icon-print { background-image: url("./images/icon_print.gif"); }
|
||||
|
||||
/* Profile & navigation icons */
|
||||
.email-icon, .email-icon a { background-image: url("./images/icon_contact_email.gif"); }
|
||||
.phpbb_aol-icon, .phpbb_aol-icon a { background-image: url("./images/icon_contact_aim.gif"); }
|
||||
.aim-icon, .aim-icon a { background-image: url("./images/icon_contact_aim.gif"); }
|
||||
.yahoo-icon, .yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); }
|
||||
.phpbb_yahoo-icon, .phpbb_yahoo-icon a { background-image: url("./images/icon_contact_yahoo.gif"); }
|
||||
.web-icon, .web-icon a { background-image: url("./images/icon_contact_www.gif"); }
|
||||
.phpbb_website-icon, .phpbb_website-icon a { background-image: url("./images/icon_contact_www.gif"); }
|
||||
.msnm-icon, .msnm-icon a { background-image: url("./images/icon_contact_msnm.gif"); }
|
||||
.phpbb_wlm-icon, .phpbb_wlm-icon a { background-image: url("./images/icon_contact_msnm.gif"); }
|
||||
.icq-icon, .icq-icon a { background-image: url("./images/icon_contact_icq.gif"); }
|
||||
.phpbb_icq-icon, .phpbb_icq-icon a { background-image: url("./images/icon_contact_icq.gif"); }
|
||||
.jabber-icon, .jabber-icon a { background-image: url("./images/icon_contact_jabber.gif"); }
|
||||
.pm-icon, .pm-icon a { background-image: url("./en/icon_contact_pm.gif"); }
|
||||
.contact-icon { background-image: url("./images/icons_contact.png"); }
|
||||
|
||||
.quote-icon, .quote-icon a { background-image: url("./en/icon_post_quote.gif"); }
|
||||
ul.profile-icons.responsive a.responsive-menu-link { background-image: url("./images/icon_post_menu.png"); }
|
||||
|
||||
|
|
|
@ -470,6 +470,7 @@ ul.linklist.bulletin li.no-bulletin:before {
|
|||
border: 1px solid transparent;
|
||||
border-radius: 5px;
|
||||
padding: 9px 0 0;
|
||||
margin-right: -500px;
|
||||
}
|
||||
|
||||
.dropdown-container.topic-tools {
|
||||
|
@ -485,6 +486,8 @@ ul.linklist.bulletin li.no-bulletin:before {
|
|||
.dropdown-left .dropdown, .nojs .rightside .dropdown {
|
||||
left: auto;
|
||||
right: 0;
|
||||
margin-left: -500px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.dropdown-button-control .dropdown {
|
||||
|
|
|
@ -731,6 +731,20 @@ fieldset.polls dd div {
|
|||
height: auto !important;
|
||||
}
|
||||
|
||||
dd.profile-contact {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.profile-contact .dropdown-container {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.profile-contact .icon_contact {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.online {
|
||||
background-image: none;
|
||||
background-position: 100% 0;
|
||||
|
|
|
@ -7,16 +7,10 @@ ul.profile-icons li.edit-icon { width: 42px; height: 20px; }
|
|||
.online { background-image: url("./icon_user_online.gif"); }
|
||||
|
||||
/* Icon images */
|
||||
.pm-icon, .pm-icon a { background-image: url("./icon_contact_pm.gif"); }
|
||||
.quote-icon, .quote-icon a { background-image: url("./icon_post_quote.gif"); }
|
||||
.edit-icon, .edit-icon a { background-image: url("./icon_post_edit.gif"); }
|
||||
|
||||
/* EN Language Pack */
|
||||
.imageset.icon_contact_pm {
|
||||
background-image: url("./icon_contact_pm.gif");
|
||||
padding-left: 28px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
.imageset.icon_post_edit {
|
||||
background-image: url("./icon_post_edit.gif");
|
||||
padding-left: 42px;
|
||||
|
|
BIN
phpBB/styles/prosilver/theme/images/icon_contact.png
Normal file
After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 523 B |
Before Width: | Height: | Size: 562 B |
Before Width: | Height: | Size: 1,014 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 541 B |
BIN
phpBB/styles/prosilver/theme/images/icons_contact.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
|
@ -356,13 +356,14 @@ span.imageset {
|
|||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.imageset.icon_contact {
|
||||
background-image: url("./images/icon_contact.png");
|
||||
padding-left: 16px;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
|
||||
/* English images for fallback */
|
||||
.imageset.icon_contact_pm {
|
||||
background-image: url("./en/icon_contact_pm.gif");
|
||||
padding-left: 28px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
.imageset.icon_post_edit {
|
||||
background-image: url("./en/icon_post_edit.gif");
|
||||
padding-left: 42px;
|
||||
|
|
|
@ -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'],
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|