Integrate Skype plugin - refs BT#11956

1.10.x
Angel Fernando Quiroz Campos 9 years ago
parent 6662c64b54
commit 3d9c69cd0e
  1. 1
      main/inc/lib/social.lib.php
  2. 17
      main/social/profile.php
  3. 32
      main/template/default/social/user_block.tpl

@ -1724,6 +1724,7 @@ class SocialManager extends UserManager
$template->assign('chat_enabled', $chatEnabled);
$template->assign('user_relation', $userRelationType);
$template->assign('user_relation_type_friend', USER_RELATION_TYPE_FRIEND);
$template->assign('show_full_profile', $show_full_profile);
$templateName = $template->get_template('social/user_block.tpl');
if (in_array($groupBlock, ['groups', 'group_edit', 'member_list'])) {

@ -347,6 +347,9 @@ if ($show_full_profile) {
$extra_information_value = '<ul class="list-group">';
$extraField = new ExtraField('user');
foreach ($extra_user_data as $key => $data) {
if (empty($data)) {
continue;
}
// Avoiding parameters
if (in_array(
$key,
@ -365,6 +368,10 @@ if ($show_full_profile) {
$field_variable
);
if (in_array($extraFieldInfo['variable'], ['skype', 'linkedin_url'])) {
break;
}
if ($extraFieldInfo['visible'] != 1) {
continue;
}
@ -421,15 +428,7 @@ if ($show_full_profile) {
$extra_information_value .= '<li class="list-group-item">'.$data.'</li>';
break;
default:
if (!empty($data)) {
$extra_field_title = ucfirst($extraFieldInfo['display_text']);
if ($extra_field_title == 'Skype') {
$data = '<a href="skype:' . $data . '?chat">' . get_lang('Chat') . '</a>';
$extra_information_value .= '<li class="list-group-item">'.Display::return_icon('skype.png', $extraFieldInfo['display_text'], null, ICON_SIZE_TINY, false) . ' ' . $data.'</li>';
} else {
$extra_information_value .= '<dt>'.ucfirst($extraFieldInfo['display_text']).':</dt><dd>'.$data.'</dd>';
}
}
$extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']) . ': ' . $data . '</li>';
break;
}
}

@ -17,7 +17,7 @@
<li class="item">
{{ user.complete_name }}
</li>
{% if vcard_user_link %}
{% if show_full_profile %}
<li class="item">
<a href="{{ _p.web }}main/messages/new_message.php">
<img src="{{ "instant_message.png" | icon }}" alt="{{ "Email" | get_lang }}">
@ -30,6 +30,34 @@
{{ "BusinessCard" | get_lang }}
</a>
</li>
{% set skype_account = '' %}
{% set linkedin_url = '' %}
{% for extra in user.extra %}
{% if extra.value.getField().getVariable() == 'skype' %}
{% set skype_account = extra.value.getValue() %}
{% endif %}
{% if extra.value.getField().getVariable() == 'linkedin_url' %}
{% set linkedin_url = extra.value.getValue() %}
{% endif %}
{% endfor %}
{% if 'allow_show_skype_account'|get_setting == 'true' and not skype_account is empty %}
<li class="item">
<a href="skype:{{ skype_account }}?chat">
<span class="fa fa-skype fa-fw" aria-hidden="true"></span> {{ 'Skype'|get_lang }}
</a>
</li>
{% endif %}
{% if 'allow_show_linkedin_url'|get_setting == 'true' and not linkedin_url is empty %}
<li class="item">
<a href="{{ linkedin_url }}" target="_blank">
<span class="fa fa-linkedin fa-fw" aria-hidden="true"></span> {{ 'LinkedIn'|get_lang }}
</a>
</li>
{% endif %}
{% endif %}
{% if chat_enabled == 1 %}
{% if user.user_is_online_in_chat != 0 %}
@ -49,7 +77,7 @@
{% if not profile_edition_link is empty %}
<li class="item">
<a class="btn link btn-sm btn-block" href="{{ profile_edition_link }}">
<a class="btn btn-link btn-sm btn-block" href="{{ profile_edition_link }}">
<em class="fa fa-edit"></em>{{ "EditProfile" | get_lang }}
</a>
</li>

Loading…
Cancel
Save