$ssl_state = (local_user() ? true : false);
- $profile_owner = 0;
$live_update_div = '';
$blocklist = conv_get_blocklist();
if ($mode === 'network') {
$items = conversation_add_children($items, false, $order, $uid);
- $profile_owner = local_user();
if (!$update) {
/*
* The special div is needed for liveUpdate to kick in for this page.
}
} elseif ($mode === 'profile') {
$items = conversation_add_children($items, false, $order, $uid);
- $profile_owner = $a->profile['uid'];
if (!$update) {
$tab = 'posts';
*/
$live_update_div = '<div id="live-profile"></div>' . "\r\n"
- . "<script> var profile_uid = " . $a->profile['uid']
+ . "<script> var profile_uid = " . $uid
. "; var netargs = '?f='; </script>\r\n";
}
}
} elseif ($mode === 'notes') {
$items = conversation_add_children($items, false, $order, local_user());
- $profile_owner = local_user();
if (!$update) {
$live_update_div = '<div id="live-notes"></div>' . "\r\n"
}
} elseif ($mode === 'display') {
$items = conversation_add_children($items, false, $order, $uid);
- $profile_owner = $a->profile['uid'];
if (!$update) {
$live_update_div = '<div id="live-display"></div>' . "\r\n"
}
} elseif ($mode === 'community') {
$items = conversation_add_children($items, true, $order, $uid);
- $profile_owner = 0;
if (!$update) {
$live_update_div = '<div id="live-community"></div>' . "\r\n"
}
} elseif ($mode === 'contacts') {
$items = conversation_add_children($items, false, $order, $uid);
- $profile_owner = 0;
if (!$update) {
$live_update_div = '<div id="live-contact"></div>' . "\r\n"
$live_update_div = '<div id="live-search"></div>' . "\r\n";
}
- $page_dropping = ((local_user() && local_user() == $profile_owner) ? true : false);
+ $page_dropping = ((local_user() && local_user() == $uid) ? true : false);
if (!$update) {
$_SESSION['return_path'] = DI::args()->getQueryString();
use Friendica\App;
use Friendica\Content\Text\BBCode;
-use Friendica\Content\Text\HTML;
+use Friendica\Content\Widget;
use Friendica\Core\ACL;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Model\Contact;
use Friendica\Model\Item;
use Friendica\Model\Post;
-use Friendica\Model\Profile;
-use Friendica\Module\Objects;
+use Friendica\Module\ActivityPub\Objects;
use Friendica\Network\HTTPException;
use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\DFRN;
}
}
- Profile::load($a, $nick, $profiledata);
+ DI::page()['aside'] = Widget\VCard::getHTML($profiledata);
}
function display_fetchauthor($a, $item)
$is_remote_contact = false;
$item_uid = local_user();
+ $page_uid = 0;
$parent = null;
if (!empty($parent_uri_id)) {
}
if (DBA::isResult($parent)) {
- $a->profile['uid'] = ($a->profile['uid'] ?? 0) ?: $parent['uid'];
- $is_remote_contact = Session::getRemoteContactID($a->profile['uid']);
+ $page_uid = ($page_uid ?? 0) ?: $parent['uid'];
+ $is_remote_contact = Session::getRemoteContactID($page_uid);
if ($is_remote_contact) {
$item_uid = $parent['uid'];
}
} else {
- $a->profile = ['uid' => intval($item['uid'])];
+ $page_uid = $item['uid'];
}
- $page_contact = DBA::selectFirst('contact', [], ['self' => true, 'uid' => $a->profile['uid']]);
+ $page_contact = DBA::selectFirst('contact', [], ['self' => true, 'uid' => $page_uid]);
if (DBA::isResult($page_contact)) {
$a->page_contact = $page_contact;
}
- $is_owner = (local_user() && (in_array($a->profile['uid'], [local_user(), 0])) ? true : false);
+ $is_owner = (local_user() && (in_array($page_uid, [local_user(), 0])) ? true : false);
if (!empty($a->profile['hidewall']) && !$is_owner && !$is_remote_contact) {
throw new HTTPException\ForbiddenException(DI::l10n()->t('Access to this profile has been restricted.'));
];
$o .= status_editor($a, $x, 0, true);
}
- $sql_extra = Item::getPermissionsSQLByUserId($a->profile['uid']);
+ $sql_extra = Item::getPermissionsSQLByUserId($page_uid);
- if (local_user() && (local_user() == $a->profile['uid'])) {
+ if (local_user() && (local_user() == $page_uid)) {
$condition = ['parent-uri-id' => $parent_uri_id, 'uid' => local_user(), 'unseen' => true];
$unseen = Post::exists($condition);
} else {
$condition = ["`uri-id` = ? AND `uid` IN (0, ?) " . $sql_extra, $uri_id, $item_uid];
$fields = ['parent-uri-id', 'body', 'title', 'author-name', 'author-avatar', 'plink', 'author-id', 'owner-id', 'contact-id'];
- $item = Post::selectFirstForUser($a->profile['uid'], $fields, $condition);
+ $item = Post::selectFirstForUser($page_uid, $fields, $condition);
if (!DBA::isResult($item)) {
throw new HTTPException\NotFoundException(DI::l10n()->t('The requested item doesn\'t exist or has been deleted.'));
*/
use Friendica\App;
+use Friendica\Content\Widget;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\DI;
// Don't try to add a pending contact
$user_contact = DBA::selectFirst('contact', ['pending'], ["`uid` = ? AND ((`rel` != ?) OR (`network` = ?)) AND
- (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
+ (`nurl` = ? OR `alias` = ? OR `alias` = ?) AND `network` != ?",
$uid, Contact::FOLLOWER, Protocol::DFRN, Strings::normaliseLink($url),
Strings::normaliseLink($url), $url, Protocol::STATUSNET]);
DI::page()['aside'] = '';
if ($protocol != Protocol::PHANTOM) {
- Profile::load($a, '', $contact, false);
+ DI::page()['aside'] = Widget\VCard::getHTML(Contact::getByURL($contact['url'], false));
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'),
['$title' => DI::l10n()->t('Status Messages and Posts')]
*/
use Friendica\App;
+use Friendica\Content\Widget;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
-use Friendica\Model\Profile;
use Friendica\Model\User;
use Friendica\Util\Strings;
]);
DI::page()['aside'] = '';
- Profile::load($a, '', Contact::getByURL($contact['url'], false));
+ DI::page()['aside'] = Widget\VCard::getHTML(Contact::getByURL($contact['url'], false));
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), ['$title' => DI::l10n()->t('Status Messages and Posts')]);
--- /dev/null
+<?php
+/**
+ * @copyright Copyright (C) 2010-2021, the Friendica project
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Friendica\Content\Widget;
+
+use Friendica\Content\Text\BBCode;
+use Friendica\Core\Protocol;
+use Friendica\Core\Renderer;
+use Friendica\DI;
+use Friendica\Model\Contact;
+use Friendica\Util\Strings;
+
+/**
+ * VCard widget
+ *
+ * @author Michael Vogel
+ */
+class VCard
+{
+ /**
+ * Get HTML for vcard block
+ *
+ * @template widget/vcard.tpl
+ * @return string
+ */
+ public static function getHTML(array $contact)
+ {
+ if (($contact['network'] != '') && ($contact['network'] != Protocol::DFRN)) {
+ $network_link = Strings::formatNetworkName($contact['network'], $contact['url']);
+ } else {
+ $network_link = '';
+ }
+
+ $follow_link = '';
+ $unfollow_link = '';
+ $wallmessage_link = '';
+
+ if (local_user()) {
+ if ($contact['uid']) {
+ $id = $contact['id'];
+ $rel = $contact['rel'];
+ $pending = $contact['pending'];
+ } else {
+ $pcontact = Contact::selectFirst(['id', 'rel', 'pending'], ['uid' => local_user(), 'uri-id' => $contact['uri-id']]);
+ $id = $pcontact['id'] ?? 0;
+ $rel = $pcontact['rel'] ?? Contact::NOTHING;
+ $pending = $pcontact['pending'] ?? false;
+ }
+
+ if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
+ if (in_array($rel, [Contact::SHARING, Contact::FRIEND])) {
+ $unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
+ } elseif(!$pending) {
+ $follow_link = 'follow?url=' . urlencode($contact['url']) . '&auto=1';
+ }
+ }
+
+ if (in_array($rel, [Contact::FOLLOWER, Contact::FRIEND]) && Contact::canReceivePrivateMessages($contact)) {
+ $wallmessage_link = 'message/new/' . $id;
+ }
+ }
+
+ return Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [
+ '$contact' => $contact,
+ '$photo' => Contact::getPhoto($contact),
+ '$url' => Contact::magicLinkByContact($contact, $contact['url']),
+ '$about' => BBCode::convertForUriId($contact['uri-id'] ?? 0, $contact['about'] ?? ''),
+ '$xmpp' => DI::l10n()->t('XMPP:'),
+ '$location' => DI::l10n()->t('Location:'),
+ '$network_link' => $network_link,
+ '$network' => DI::l10n()->t('Network:'),
+ '$account_type' => Contact::getAccountType($contact),
+ '$follow' => DI::l10n()->t('Follow'),
+ '$follow_link' => $follow_link,
+ '$unfollow' => DI::l10n()->t('Unfollow'),
+ '$unfollow_link' => $unfollow_link,
+ '$wallmessage' => DI::l10n()->t('Message'),
+ '$wallmessage_link' => $wallmessage_link,
+ ]);
+ }
+}
// Checking if there is already an item with the same guid
$condition = ['guid' => $item['guid'], 'network' => $item['network'], 'uid' => $item['uid']];
if (Post::exists($condition)) {
- Logger::notice('Found already existing item', [
- 'guid' => $item['guid'],
- 'uid' => $item['uid'],
- 'network' => $item['network']
- ]);
+ Logger::notice('Found already existing item', $condition);
return true;
}
$condition = ['uri-id' => $item['uri-id'], 'uid' => $item['uid'],
'network' => [$item['network'], Protocol::DFRN]];
if (Post::exists($condition)) {
- Logger::notice('duplicated item with the same uri found.', $item);
+ Logger::notice('duplicated item with the same uri found.', $condition);
return true;
}
if (in_array($item['network'], [Protocol::DFRN, Protocol::DIASPORA])) {
$condition = ['guid' => $item['guid'], 'uid' => $item['uid']];
if (Post::exists($condition)) {
- Logger::notice('duplicated item with the same guid found.', $item);
+ Logger::notice('duplicated item with the same guid found.', $condition);
return true;
}
} elseif ($item['network'] == Protocol::OSTATUS) {
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
- public static function load(App $a, $nickname, array $profiledata = [], $show_connect = true)
+ public static function load(App $a, $nickname)
{
- $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]);
-
- if (!DBA::isResult($user) && empty($profiledata)) {
- Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG);
- return;
- }
-
- if (count($profiledata) > 0) {
- // Ensure to have a "nickname" field
- if (empty($profiledata['nickname']) && !empty($profiledata['nick'])) {
- $profiledata['nickname'] = $profiledata['nick'];
- }
-
- // Add profile data to sidebar
- DI::page()['aside'] .= self::sidebar($a, $profiledata, true, $show_connect);
-
- if (!DBA::isResult($user)) {
- return;
- }
- }
-
- $profile = !empty($user['uid']) ? User::getOwnerDataById($user['uid'], false) : [];
-
- if (empty($profile) && empty($profiledata)) {
+ $profile = User::getOwnerDataByNick($nickname);
+ if (empty($profile)) {
Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG);
return;
}
- if (empty($profile)) {
- $profile = ['uid' => 0, 'name' => $nickname];
- }
-
$a->profile = $profile;
$a->profile_uid = $profile['uid'];
DI::page()['title'] = $a->profile['name'] . ' @ ' . DI::config()->get('config', 'sitename');
- if (!$profiledata && !DI::pConfig()->get(local_user(), 'system', 'always_my_theme')) {
+ if (!DI::pConfig()->get(local_user(), 'system', 'always_my_theme')) {
$a->setCurrentTheme($a->profile['theme']);
$a->setCurrentMobileTheme($a->profile['mobile-theme']);
}
require_once $theme_info_file;
}
- $block = ((DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) ? true : false);
+ $block = (DI::config()->get('system', 'block_public') && !Session::isAuthenticated());
/**
* @todo
* By now, the contact block isn't shown, when a different profile is given
* But: When this profile was on the same server, then we could display the contacts
*/
- if (!$profiledata) {
- DI::page()['aside'] .= self::sidebar($a, $a->profile, $block, $show_connect);
- }
+ DI::page()['aside'] .= self::sidebar($a, $a->profile, $block);
return;
}
* @hooks 'profile_sidebar'
* array $arr
*/
- private static function sidebar(App $a, array $profile, $block = 0, $show_connect = true)
+ private static function sidebar(App $a, array $profile, $block = 0)
{
$o = '';
$location = false;
|| in_array($profile_contact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]);
$visitor_base_path = self::getMyURL() ? preg_replace('=/profile/(.*)=ism', '', self::getMyURL()) : '';
- if (!$local_user_is_self && $show_connect) {
+ if (!$local_user_is_self) {
if (!$visitor_is_authenticated) {
// Remote follow is only available for local profiles
if (!empty($profile['nickname']) && strpos($profile_url, DI::baseUrl()->get()) === 0) {
$p['photo'] = Contact::getAvatarUrlForId($cid, ProxyUtils::SIZE_SMALL);
- $p['url'] = Contact::magicLinkById($cid);
+ $p['url'] = Contact::magicLinkById($cid, $profile['url']);
$tpl = Renderer::getMarkupTemplate('profile/vcard.tpl');
$o .= Renderer::replaceMacros($tpl, [
$a->data['contact'] = $contact;
- if (($contact['network'] != '') && ($contact['network'] != Protocol::DFRN)) {
- $network_link = Strings::formatNetworkName($contact['network'], $contact['url']);
- } else {
- $network_link = '';
- }
-
- $follow_link = '';
- $unfollow_link = '';
- if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) {
- if ($contact['uid'] && in_array($contact['rel'], [Model\Contact::SHARING, Model\Contact::FRIEND])) {
- $unfollow_link = 'unfollow?url=' . urlencode($contact['url']) . '&auto=1';
- } elseif(!$contact['pending']) {
- $follow_link = 'follow?url=' . urlencode($contact['url']) . '&auto=1';
- }
- }
-
- $wallmessage_link = '';
- if ($contact['uid'] && Model\Contact::canReceivePrivateMessages($contact)) {
- $wallmessage_link = 'message/new/' . $contact['id'];
- }
-
- $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [
- '$name' => $contact['name'],
- '$photo' => Model\Contact::getPhoto($contact),
- '$url' => Model\Contact::magicLinkByContact($contact, $contact['url']),
- '$addr' => $contact['addr'] ?? '',
- '$network_link' => $network_link,
- '$network' => DI::l10n()->t('Network:'),
- '$account_type' => Model\Contact::getAccountType($contact),
- '$follow' => DI::l10n()->t('Follow'),
- '$follow_link' => $follow_link,
- '$unfollow' => DI::l10n()->t('Unfollow'),
- '$unfollow_link' => $unfollow_link,
- '$wallmessage' => DI::l10n()->t('Message'),
- '$wallmessage_link' => $wallmessage_link,
- ]);
+ $vcard_widget = Widget\VCard::getHTML($contact);
$findpeople_widget = '';
$follow_widget = '';
Model\Contact::MIRROR_FORWARDED => DI::l10n()->t('Mirror as forwarded posting'),
Model\Contact::MIRROR_OWN_POST => DI::l10n()->t('Mirror as my own posting')];
} elseif (in_array($contact['network'], [Protocol::ACTIVITYPUB])) {
- $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
+ $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
Model\Contact::MIRROR_NATIVE_RESHARE => DI::l10n()->t('Native reshare')];
} elseif (in_array($contact['network'], [Protocol::DFRN])) {
- $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
+ $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
Model\Contact::MIRROR_OWN_POST => DI::l10n()->t('Mirror as my own posting'),
Model\Contact::MIRROR_NATIVE_RESHARE => DI::l10n()->t('Native reshare')];
} else {
- $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
+ $remote_self_options = [Model\Contact::MIRROR_DEACTIVATED => DI::l10n()->t('No mirroring'),
Model\Contact::MIRROR_OWN_POST => DI::l10n()->t('Mirror as my own posting')];
}
$contact['remote_self'],
DI::l10n()->t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.'),
$remote_self_options
- ],
+ ],
]);
$arr = ['contact' => $contact, 'output' => $o];
}
if (DBA::isResult($contact)) {
- DI::page()['aside'] = '';
-
if (!$update) {
$profiledata = Model\Contact::getByURLForUser($contact['url'], local_user());
- Model\Profile::load($a, '', $profiledata, true);
+ DI::page()['aside'] = Widget\VCard::getHTML($profiledata);
+ } else {
+ DI::page()['aside'] = '';
}
if ($contact['uid'] == 0) {
$o = self::getTabsHTML($contact, self::TAB_POSTS);
if (DBA::isResult($contact)) {
- DI::page()['aside'] = '';
-
$profiledata = Model\Contact::getByURLForUser($contact['url'], local_user());
if (local_user() && in_array($profiledata['network'], Protocol::FEDERATED)) {
$profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
}
- Model\Profile::load($a, '', $profiledata, true);
+ DI::page()['aside'] = Widget\VCard::getHTML($profiledata);
if ($contact['uid'] == 0) {
$o .= Model\Contact::getPostsFromId($contact['id']);
'alt_text' => $alt_text,
'name' => $contact['name'],
'nick' => $contact['nick'],
- 'details' => $contact['location'],
+ 'details' => $contact['location'],
'tags' => $contact['keywords'],
'about' => $contact['about'],
'account_type' => Model\Contact::getAccountType($contact),
namespace Friendica\Module\Contact;
use Friendica\BaseModule;
+use Friendica\Content\Widget;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
throw new BadRequestException(DI::l10n()->t('Contact not found.'));
}
- Model\Profile::load(DI::app(), "", Model\Contact::getByURL($contact["url"], false));
+ DI::page()['aside'] = Widget\VCard::getHTML($contact);
$warning = DI::l10n()->t('<strong>WARNING: This is highly advanced</strong> and if you enter incorrect information your communications with this contact may stop working.');
$info = DI::l10n()->t('Please use your browser \'Back\' button <strong>now</strong> if you are uncertain what to do on this page.');
$localContactId = Model\Contact::getPublicIdByUserId(local_user());
- Model\Profile::load($app, '', $contact);
+ DI::page()['aside'] = Widget\VCard::getHTML($contact);
$condition = [
'blocked' => false,
namespace Friendica\Module\Contact;
use Friendica\BaseModule;
+use Friendica\Content\Widget;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
throw new HTTPException\NotFoundException();
}
- Model\Profile::load(DI::app(), '', Model\Contact::getByURL($contact["url"], false));
+ DI::page()['aside'] = Widget\VCard::getHTML(Model\Contact::getByURL($contact["url"], false));
$verbs = [];
foreach (DI::l10n()->getPokeVerbs() as $verb => $translations) {
Protocol::OSTATUS, Protocol::DFRN, Protocol::DIASPORA];
if ($filter === 'comments') {
- $condition[0] .= " AND `object-type` = ? ";
- $condition[] = Activity\ObjectType::COMMENT;
+ $condition[0] .= " AND `gravity` = ? ";
+ $condition[] = GRAVITY_COMMENT;
}
if ($owner['account-type'] != User::ACCOUNT_TYPE_COMMUNITY) {
$ids = self::getContactsToUpdate($condition, [], $limit);
Logger::info('Fetched federated user contacts', ['count' => count($ids)]);
- $conditions = ["`id` IN (SELECT `author-id` FROM `post-user` WHERE `author-id` = `contact`.`id`)",
- "`id` IN (SELECT `owner-id` FROM `post-user` WHERE `owner-id` = `contact`.`id`)",
- "`id` IN (SELECT `causer-id` FROM `post-user` WHERE `causer-id` = `contact`.`id`)",
+ $conditions = ["`id` IN (SELECT `author-id` FROM `post` WHERE `author-id` = `contact`.`id`)",
+ "`id` IN (SELECT `owner-id` FROM `post` WHERE `owner-id` = `contact`.`id`)",
+ "`id` IN (SELECT `causer-id` FROM `post` WHERE `causer-id` = `contact`.`id`)",
"`id` IN (SELECT `cid` FROM `post-tag` WHERE `cid` = `contact`.`id`)",
"`id` IN (SELECT `cid` FROM `user-contact` WHERE `cid` = `contact`.`id`)"];
-
<div class="vcard h-card">
- <div class="fn p-name" dir="auto">{{$name}}</div>
- {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
- {{if $about}}<div class="title p-about" dir="auto">{{$about nofilter}}</div>{{/if}}
+ <div class="fn p-name" dir="auto">{{$contact.name}}</div>
+ {{if $contact.addr}}<div class="p-addr">{{$contact.addr}}</div>{{/if}}
{{if $url}}
<div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
{{else}}
<div id="profile-photo-wrapper"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></div>
{{/if}}
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
+ {{if $about}}<div class="title p-about" dir="auto">{{$about nofilter}}</div>{{/if}}
+ {{if $contact.xmpp}}
+ <dl class="xmpp">
+ <dt class="xmpp-label">{{$xmpp}}</dt>
+ <dd class="xmpp-data">{{$contact.xmpp}}</dd>
+ </dl>
+ {{/if}}
+ {{if $contact.location}}
+ <dl class="location" dir="auto">
+ <dt class="location-label">{{$location}}</dt>
+ <dd class="adr h-adr">
+ <p class="p-location">{{$contact.location}}</p>
+ </dd>
+ </dl>
+ {{/if}}
{{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
<div id="profile-extra-links">
<div id="profile-photo-wrapper">
{{if $url}}
- <a href="{{$url}}"><img class="photo u-photo" src="{{$photo}}" alt="{{$name}}" /></a>
+ <a href="{{$url}}"><img class="photo u-photo" src="{{$photo}}" alt="{{$contact.name}}" /></a>
{{else}}
- <img class="photo u-photo" src="{{$photo}}" alt="{{$name}}" />
+ <img class="photo u-photo" src="{{$photo}}" alt="{{$contact.name}}" />
{{/if}}
</div>
<div id="vcard-short-info-wrapper" style="display: none;">
<div id="vcard-short-info" class="media" style="display: none">
<div id="vcard-short-photo-wrapper" class="pull-left">
- <img class="media-object" src="{{$photo}}" alt="{{$name}}" />
+ <img class="media-object" src="{{$photo}}" alt="{{$contact.name}}" />
</div>
<div id="vcard-short-desc" class="media-body">
- <h4 class="media-heading" dir="auto">{{$name}}</h4>
- {{if $addr}}<div class="vcard-short-addr">{{$addr}}</div>{{/if}}
+ <h4 class="media-heading" dir="auto">{{$contact.name}}</h4>
+ {{if $contact.addr}}<div class="vcard-short-addr">{{$contact.addr}}</div>{{/if}}
</div>
</div>
</div>
<div class="panel-body">
<div class="profile-header">
- <h3 class="fn p-name" dir="auto">{{$name}}</h3>
+ <h3 class="fn p-name" dir="auto">{{$contact.name}}</h3>
- {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
+ {{if $contact.addr}}<div class="p-addr">{{$contact.addr}}</div>{{/if}}
{{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
{{if $about}}<div class="title" dir="auto">{{$about nofilter}}</div>{{/if}}
-
- {{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
</div>
<div id="profile-extra-links">
</div>
{{/if}}
</div>
+
+ <div class="clear"></div>
+
+ {{if $contact.location}}
+ <div class="location detail">
+ <span class="location-label icon"><i class="fa fa-map-marker"></i></span>
+ <span class="adr">
+ <p class="p-location">{{$contact.location}}</p>
+ </span>
+ </div>
+ {{/if}}
+
+ {{if $contact.xmpp}}
+ <div class="xmpp">
+ <span class="xmpp-label icon"><i class="fa fa-comments"></i></span>
+ <span class="xmpp-data"><a href="xmpp:{{$contact.xmpp}}" rel="me" target="_blank" rel="noopener noreferrer">{{include file="sub/punct_wrap.tpl" text=$contact.xmpp}}</a></span>
+ </div>
+ {{/if}}
+
+ {{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
</div>
</div>