Replace advanced profile display with custom profile fields
- Merge all profile/advanced.tpl theme templates into profile/index.tpl - Remove obsolete Model\Profile::getAdvanced method
This commit is contained in:
parent
3297d5c3e6
commit
d475cb5028
|
@ -292,6 +292,14 @@ abstract class DI
|
|||
return self::$dice->create(Repository\PermissionSet::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Repository\ProfileField
|
||||
*/
|
||||
public static function profileField()
|
||||
{
|
||||
return self::$dice->create(Repository\ProfileField::class);
|
||||
}
|
||||
|
||||
//
|
||||
// "Protocol" namespace instances
|
||||
//
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Content\Widget\ContactBlock;
|
||||
use Friendica\Core\Cache\Duration;
|
||||
use Friendica\Core\Hook;
|
||||
|
@ -25,7 +22,6 @@ use Friendica\Util\DateTimeFormat;
|
|||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
class Profile
|
||||
{
|
||||
|
@ -690,149 +686,6 @@ class Profile
|
|||
]);
|
||||
}
|
||||
|
||||
public static function getAdvanced(App $a)
|
||||
{
|
||||
$uid = intval($a->profile['uid']);
|
||||
|
||||
if ($a->profile['name']) {
|
||||
$profile = [];
|
||||
|
||||
$profile['fullname'] = [DI::l10n()->t('Full Name:'), $a->profile['name']];
|
||||
|
||||
if (Feature::isEnabled($uid, 'profile_membersince')) {
|
||||
$profile['membersince'] = [DI::l10n()->t('Member since:'), DateTimeFormat::local($a->profile['register_date'])];
|
||||
}
|
||||
|
||||
if ($a->profile['gender']) {
|
||||
$profile['gender'] = [DI::l10n()->t('Gender:'), DI::l10n()->t($a->profile['gender'])];
|
||||
}
|
||||
|
||||
if (!empty($a->profile['dob']) && $a->profile['dob'] > DBA::NULL_DATE) {
|
||||
$year_bd_format = DI::l10n()->t('j F, Y');
|
||||
$short_bd_format = DI::l10n()->t('j F');
|
||||
|
||||
$val = DI::l10n()->getDay(
|
||||
intval($a->profile['dob']) ?
|
||||
DateTimeFormat::utc($a->profile['dob'] . ' 00:00 +00:00', $year_bd_format)
|
||||
: DateTimeFormat::utc('2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format)
|
||||
);
|
||||
|
||||
$profile['birthday'] = [DI::l10n()->t('Birthday:'), $val];
|
||||
}
|
||||
|
||||
if (!empty($a->profile['dob'])
|
||||
&& $a->profile['dob'] > DBA::NULL_DATE
|
||||
&& $age = Temporal::getAgeByTimezone($a->profile['dob'], $a->profile['timezone'])
|
||||
) {
|
||||
$profile['age'] = [DI::l10n()->t('Age: ') , DI::l10n()->tt('%d year old', '%d years old', $age)];
|
||||
}
|
||||
|
||||
if ($a->profile['marital']) {
|
||||
$profile['marital'] = [DI::l10n()->t('Status:'), DI::l10n()->t($a->profile['marital'])];
|
||||
}
|
||||
|
||||
/// @TODO Maybe use x() here, plus below?
|
||||
if ($a->profile['with']) {
|
||||
$profile['marital']['with'] = $a->profile['with'];
|
||||
}
|
||||
|
||||
if (strlen($a->profile['howlong']) && $a->profile['howlong'] > DBA::NULL_DATETIME) {
|
||||
$profile['howlong'] = Temporal::getRelativeDate($a->profile['howlong'], DI::l10n()->t('for %1$d %2$s'));
|
||||
}
|
||||
|
||||
if ($a->profile['sexual']) {
|
||||
$profile['sexual'] = [DI::l10n()->t('Sexual Preference:'), DI::l10n()->t($a->profile['sexual'])];
|
||||
}
|
||||
|
||||
if ($a->profile['homepage']) {
|
||||
$profile['homepage'] = [DI::l10n()->t('Homepage:'), HTML::toLink($a->profile['homepage'])];
|
||||
}
|
||||
|
||||
if ($a->profile['hometown']) {
|
||||
$profile['hometown'] = [DI::l10n()->t('Hometown:'), HTML::toLink($a->profile['hometown'])];
|
||||
}
|
||||
|
||||
if ($a->profile['pub_keywords']) {
|
||||
$profile['pub_keywords'] = [DI::l10n()->t('Tags:'), $a->profile['pub_keywords']];
|
||||
}
|
||||
|
||||
if ($a->profile['politic']) {
|
||||
$profile['politic'] = [DI::l10n()->t('Political Views:'), $a->profile['politic']];
|
||||
}
|
||||
|
||||
if ($a->profile['religion']) {
|
||||
$profile['religion'] = [DI::l10n()->t('Religion:'), $a->profile['religion']];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['about'])) {
|
||||
$profile['about'] = [DI::l10n()->t('About:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['interest'])) {
|
||||
$profile['interest'] = [DI::l10n()->t('Hobbies/Interests:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['likes'])) {
|
||||
$profile['likes'] = [DI::l10n()->t('Likes:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['dislikes'])) {
|
||||
$profile['dislikes'] = [DI::l10n()->t('Dislikes:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['contact'])) {
|
||||
$profile['contact'] = [DI::l10n()->t('Contact information and Social Networks:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['music'])) {
|
||||
$profile['music'] = [DI::l10n()->t('Musical interests:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['book'])) {
|
||||
$profile['book'] = [DI::l10n()->t('Books, literature:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['tv'])) {
|
||||
$profile['tv'] = [DI::l10n()->t('Television:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['film'])) {
|
||||
$profile['film'] = [DI::l10n()->t('Film/dance/culture/entertainment:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['romance'])) {
|
||||
$profile['romance'] = [DI::l10n()->t('Love/Romance:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['work'])) {
|
||||
$profile['work'] = [DI::l10n()->t('Work/employment:'), $txt];
|
||||
}
|
||||
|
||||
if ($txt = BBCode::convert($a->profile['education'])) {
|
||||
$profile['education'] = [DI::l10n()->t('School/education:'), $txt];
|
||||
}
|
||||
|
||||
//show subcribed forum if it is enabled in the usersettings
|
||||
if (Feature::isEnabled($uid, 'forumlist_profile')) {
|
||||
$profile['forumlist'] = [DI::l10n()->t('Forums:'), ForumManager::profileAdvanced($uid)];
|
||||
}
|
||||
|
||||
if ($a->profile['uid'] == local_user()) {
|
||||
$profile['edit'] = [DI::baseUrl() . '/settings/profile', DI::l10n()->t('Edit profile'), '', DI::l10n()->t('Edit profile')];
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('profile/advanced.tpl');
|
||||
return Renderer::replaceMacros($tpl, [
|
||||
'$title' => DI::l10n()->t('Profile'),
|
||||
'$basic' => DI::l10n()->t('Basic'),
|
||||
'$advanced' => DI::l10n()->t('Advanced'),
|
||||
'$profile' => $profile
|
||||
]);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param App $a
|
||||
* @param string $current
|
||||
|
|
|
@ -3,16 +3,27 @@
|
|||
namespace Friendica\Module\Profile;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Profile as ProfileModel;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\Term;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
require_once 'boot.php';
|
||||
|
||||
|
@ -46,77 +57,245 @@ class Index extends BaseModule
|
|||
{
|
||||
$a = DI::app();
|
||||
|
||||
ProfileModel::load($a, $parameters['nickname']);
|
||||
Profile::load($a, $parameters['nickname']);
|
||||
|
||||
$remote_contact_id = Session::getRemoteContactID($a->profile['uid']);
|
||||
if (!$a->profile) {
|
||||
throw new HTTPException\NotFoundException(DI::l10n()->t('Profile not found.'));
|
||||
}
|
||||
|
||||
$remote_contact_id = Session::getRemoteContactID($a->profile_uid);
|
||||
|
||||
if (DI::config()->get('system', 'block_public') && !local_user() && !$remote_contact_id) {
|
||||
return Login::form();
|
||||
}
|
||||
|
||||
DI::page()['htmlhead'] .= "\n";
|
||||
$is_owner = local_user() == $a->profile_uid;
|
||||
|
||||
$blocked = !local_user() && !$remote_contact_id && DI::config()->get('system', 'block_public');
|
||||
$userblock = !local_user() && !$remote_contact_id && $a->profile['hidewall'];
|
||||
$o = '';
|
||||
if (!empty($a->profile['hidewall']) && !$is_owner && !$remote_contact_id) {
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Access to this profile has been restricted.'));
|
||||
}
|
||||
|
||||
if (!empty($a->profile['page-flags']) && $a->profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY) {
|
||||
DI::page()['htmlhead'] .= '<meta name="friendica.community" content="true" />' . "\n";
|
||||
}
|
||||
|
||||
if (!empty($a->profile['openidserver'])) {
|
||||
DI::page()['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\n";
|
||||
}
|
||||
|
||||
if (!empty($a->profile['openid'])) {
|
||||
$delegate = strstr($a->profile['openid'], '://') ? $a->profile['openid'] : 'https://' . $a->profile['openid'];
|
||||
DI::page()['htmlhead'] .= '<link rel="openid.delegate" href="' . $delegate . '" />' . "\n";
|
||||
}
|
||||
|
||||
// site block
|
||||
if (!$blocked && !$userblock) {
|
||||
$keywords = str_replace(['#', ',', ' ', ',,'], ['', ' ', ',', ','], $a->profile['pub_keywords'] ?? '');
|
||||
if (strlen($keywords)) {
|
||||
DI::page()['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
DI::page()['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . ($a->profile['net-publish'] ? 'true' : 'false') . '" />' . "\n";
|
||||
|
||||
if (!$a->profile['net-publish'] || $a->profile['hidewall']) {
|
||||
DI::page()['htmlhead'] .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
|
||||
}
|
||||
|
||||
DI::page()['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/dfrn_poll/' . $parameters['nickname'] . '" title="DFRN: ' . DI::l10n()->t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
DI::page()['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . $parameters['nickname'] . '/" title="' . DI::l10n()->t('%s\'s posts', $a->profile['username']) . '"/>' . "\n";
|
||||
DI::page()['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . $parameters['nickname'] . '/comments" title="' . DI::l10n()->t('%s\'s comments', $a->profile['username']) . '"/>' . "\n";
|
||||
DI::page()['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . DI::baseUrl() . '/feed/' . $parameters['nickname'] . '/activity" title="' . DI::l10n()->t('%s\'s timeline', $a->profile['username']) . '"/>' . "\n";
|
||||
$uri = urlencode('acct:' . $a->profile['nickname'] . '@' . DI::baseUrl()->getHostname() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''));
|
||||
DI::page()['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . DI::baseUrl() . '/xrd/?uri=' . $uri . '" />' . "\n";
|
||||
header('Link: <' . DI::baseUrl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
||||
$dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
|
||||
foreach ($dfrn_pages as $dfrn) {
|
||||
DI::page()['htmlhead'] .= '<link rel="dfrn-' . $dfrn . '" href="' . DI::baseUrl() . '/dfrn_' . $dfrn . '/' . $parameters['nickname'] . '" />' . "\n";
|
||||
}
|
||||
DI::page()['htmlhead'] .= '<link rel="dfrn-poco" href="' . DI::baseUrl() . '/poco/' . $parameters['nickname'] . '" />' . "\n";
|
||||
|
||||
$o = '';
|
||||
DI::page()['htmlhead'] .= self::buildHtmlHead($a->profile, $parameters['nickname'], $remote_contact_id);
|
||||
|
||||
Nav::setSelected('home');
|
||||
|
||||
$is_owner = local_user() == $a->profile['uid'];
|
||||
$o = Profile::getTabs($a, 'profile', $is_owner, $a->profile['nickname']);
|
||||
|
||||
if (!empty($a->profile['hidewall']) && !$is_owner && !$remote_contact_id) {
|
||||
notice(DI::l10n()->t('Access to this profile has been restricted.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
$o .= ProfileModel::getTabs($a, 'profile', $is_owner, $a->profile['nickname']);
|
||||
$view_as_contacts = [];
|
||||
$view_as_contact_id = 0;
|
||||
if ($is_owner) {
|
||||
$view_as_contact_id = intval($_GET['viewas'] ?? 0);
|
||||
|
||||
$o .= ProfileModel::getAdvanced($a);
|
||||
$view_as_contacts = Contact::selectToArray(['id', 'name'], [
|
||||
'uid' => local_user(),
|
||||
'rel' => [Contact::FOLLOWER, Contact::SHARING, Contact::FRIEND],
|
||||
'network' => Protocol::DFRN,
|
||||
'blocked' => false,
|
||||
]);
|
||||
|
||||
// User manually provided a contact ID they aren't privy to, silently defaulting to their own view
|
||||
if (!in_array($view_as_contact_id, array_column($view_as_contacts, 'id'))) {
|
||||
$view_as_contact_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$basic_fields = [];
|
||||
|
||||
$basic_fields += self::buildField('fullname', DI::l10n()->t('Full Name:'), $a->profile['name']);
|
||||
|
||||
if (Feature::isEnabled($a->profile_uid, 'profile_membersince')) {
|
||||
$basic_fields += self::buildField(
|
||||
'membersince',
|
||||
DI::l10n()->t('Member since:'),
|
||||
DateTimeFormat::local($a->profile['register_date'])
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($a->profile['dob']) && $a->profile['dob'] > DBA::NULL_DATE) {
|
||||
$year_bd_format = DI::l10n()->t('j F, Y');
|
||||
$short_bd_format = DI::l10n()->t('j F');
|
||||
|
||||
$dob = DI::l10n()->getDay(
|
||||
intval($a->profile['dob']) ?
|
||||
DateTimeFormat::utc($a->profile['dob'] . ' 00:00 +00:00', $year_bd_format)
|
||||
: DateTimeFormat::utc('2001-' . substr($a->profile['dob'], 5) . ' 00:00 +00:00', $short_bd_format)
|
||||
);
|
||||
|
||||
$basic_fields += self::buildField('dob', DI::l10n()->t('Birthday:'), $dob);
|
||||
|
||||
if ($age = Temporal::getAgeByTimezone($a->profile['dob'], $a->profile['timezone'])) {
|
||||
$basic_fields += self::buildField('age', DI::l10n()->t('Age: '), DI::l10n()->tt('%d year old', '%d years old', $age));
|
||||
}
|
||||
}
|
||||
|
||||
if ($a->profile['pdesc']) {
|
||||
$basic_fields += self::buildField('pdesc', DI::l10n()->t('Description:'), HTML::toLink($a->profile['pdesc']));
|
||||
}
|
||||
|
||||
if ($a->profile['xmpp']) {
|
||||
$basic_fields += self::buildField('xmpp', DI::l10n()->t('XMPP:'), $a->profile['xmpp']);
|
||||
}
|
||||
|
||||
if ($a->profile['homepage']) {
|
||||
$basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($a->profile['homepage']));
|
||||
}
|
||||
|
||||
$o .= Profile::getTabs($a, 'profile', $is_owner, $a->profile['nickname']);
|
||||
if (
|
||||
$a->profile['address']
|
||||
|| $a->profile['locality']
|
||||
|| $a->profile['postal-code']
|
||||
|| $a->profile['region']
|
||||
|| $a->profile['country-name']
|
||||
) {
|
||||
$basic_fields += self::buildField('location', DI::l10n()->t('Location:'), Profile::formatLocation($a->profile));
|
||||
}
|
||||
|
||||
if ($a->profile['pub_keywords']) {
|
||||
$tags = [];
|
||||
foreach (explode(',', $a->profile['pub_keywords']) as $tag_label) {
|
||||
$tags[] = [
|
||||
'url' => '/search?tag=' . $tag_label,
|
||||
'label' => Term::TAG_CHARACTER[Term::HASHTAG] . $tag_label,
|
||||
];
|
||||
}
|
||||
|
||||
$basic_fields += self::buildField('pub_keywords', DI::l10n()->t('Tags:'), $tags);
|
||||
}
|
||||
|
||||
$custom_fields = [];
|
||||
|
||||
// Defaults to the current logged in user self contact id to show self-only fields
|
||||
$contact_id = $view_as_contact_id ?: $remote_contact_id ?: 0;
|
||||
|
||||
if ($is_owner && $contact_id === 0) {
|
||||
$profile_fields = DI::profileField()->selectByUserId($a->profile_uid);
|
||||
} else {
|
||||
$profile_fields = DI::profileField()->selectByContactId($contact_id, $a->profile_uid);
|
||||
}
|
||||
|
||||
foreach ($profile_fields as $profile_field) {
|
||||
$custom_fields += self::buildField(
|
||||
'custom_' . $profile_field->order,
|
||||
$profile_field->label,
|
||||
BBCode::convert($profile_field->value),
|
||||
'aprofile custom'
|
||||
);
|
||||
};
|
||||
|
||||
//show subcribed forum if it is enabled in the usersettings
|
||||
if (Feature::isEnabled($a->profile_uid, 'forumlist_profile')) {
|
||||
$custom_fields += self::buildField(
|
||||
'forumlist',
|
||||
DI::l10n()->t('Forums:'),
|
||||
ForumManager::profileAdvanced($a->profile_uid)
|
||||
);
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('profile/index.tpl');
|
||||
$o .= Renderer::replaceMacros($tpl, [
|
||||
'$title' => DI::l10n()->t('Profile'),
|
||||
'$view_as_contacts' => $view_as_contacts,
|
||||
'$view_as_contact_id' => $view_as_contact_id,
|
||||
'$view_as' => DI::l10n()->t('View profile as:'),
|
||||
'$basic' => DI::l10n()->t('Basic'),
|
||||
'$advanced' => DI::l10n()->t('Advanced'),
|
||||
'$is_owner' => $a->profile_uid == local_user(),
|
||||
'$query_string' => DI::args()->getQueryString(),
|
||||
'$basic_fields' => $basic_fields,
|
||||
'$custom_fields' => $custom_fields,
|
||||
'$profile' => $a->profile,
|
||||
'$edit_link' => [
|
||||
'url' => DI::baseUrl() . '/settings/profile', DI::l10n()->t('Edit profile'),
|
||||
'title' => '',
|
||||
'label' => DI::l10n()->t('Edit profile')
|
||||
],
|
||||
]);
|
||||
|
||||
Hook::callAll('profile_advanced', $o);
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a profile field structure to be used in the profile template
|
||||
*
|
||||
* @param string $name Arbitrary name of the field
|
||||
* @param string $label Display label of the field
|
||||
* @param mixed $value Display value of the field
|
||||
* @param string $class Optional CSS class to apply to the field
|
||||
* @return array
|
||||
*/
|
||||
private static function buildField(string $name, string $label, $value, string $class = 'aprofile')
|
||||
{
|
||||
return [$name => [
|
||||
'id' => 'aprofile-' . $name,
|
||||
'class' => $class,
|
||||
'label' => $label,
|
||||
'value' => $value,
|
||||
]];
|
||||
}
|
||||
|
||||
private static function buildHtmlHead(array $profile, string $nickname, int $remote_contact_id)
|
||||
{
|
||||
$baseUrl = DI::baseUrl();
|
||||
|
||||
$htmlhead = "\n";
|
||||
|
||||
if (!empty($profile['page-flags']) && $profile['page-flags'] == User::PAGE_FLAGS_COMMUNITY) {
|
||||
$htmlhead .= '<meta name="friendica.community" content="true" />' . "\n";
|
||||
}
|
||||
|
||||
if (!empty($profile['openidserver'])) {
|
||||
$htmlhead .= '<link rel="openid.server" href="' . $profile['openidserver'] . '" />' . "\n";
|
||||
}
|
||||
|
||||
if (!empty($profile['openid'])) {
|
||||
$delegate = strstr($profile['openid'], '://') ? $profile['openid'] : 'https://' . $profile['openid'];
|
||||
$htmlhead .= '<link rel="openid.delegate" href="' . $delegate . '" />' . "\n";
|
||||
}
|
||||
|
||||
// site block
|
||||
$blocked = !local_user() && !$remote_contact_id && DI::config()->get('system', 'block_public');
|
||||
$userblock = !local_user() && !$remote_contact_id && $profile['hidewall'];
|
||||
if (!$blocked && !$userblock) {
|
||||
$keywords = str_replace(['#', ',', ' ', ',,'], ['', ' ', ',', ','], $profile['pub_keywords'] ?? '');
|
||||
if (strlen($keywords)) {
|
||||
$htmlhead .= '<meta name="keywords" content="' . $keywords . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
$htmlhead .= '<meta name="dfrn-global-visibility" content="' . ($profile['net-publish'] ? 'true' : 'false') . '" />' . "\n";
|
||||
|
||||
if (!$profile['net-publish'] || $profile['hidewall']) {
|
||||
$htmlhead .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
|
||||
}
|
||||
|
||||
$htmlhead .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl . '/dfrn_poll/' . $nickname . '" title="DFRN: ' . DI::l10n()->t('%s\'s timeline', $profile['username']) . '"/>' . "\n";
|
||||
$htmlhead .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl . '/feed/' . $nickname . '/" title="' . DI::l10n()->t('%s\'s posts', $profile['username']) . '"/>' . "\n";
|
||||
$htmlhead .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl . '/feed/' . $nickname . '/comments" title="' . DI::l10n()->t('%s\'s comments', $profile['username']) . '"/>' . "\n";
|
||||
$htmlhead .= '<link rel="alternate" type="application/atom+xml" href="' . $baseUrl . '/feed/' . $nickname . '/activity" title="' . DI::l10n()->t('%s\'s timeline', $profile['username']) . '"/>' . "\n";
|
||||
$uri = urlencode('acct:' . $profile['nickname'] . '@' . $baseUrl->getHostname() . ($baseUrl->getUrlPath() ? '/' . $baseUrl->getUrlPath() : ''));
|
||||
$htmlhead .= '<link rel="lrdd" type="application/xrd+xml" href="' . $baseUrl . '/xrd/?uri=' . $uri . '" />' . "\n";
|
||||
header('Link: <' . $baseUrl . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
|
||||
|
||||
$dfrn_pages = ['request', 'confirm', 'notify', 'poll'];
|
||||
foreach ($dfrn_pages as $dfrn) {
|
||||
$htmlhead .= '<link rel="dfrn-' . $dfrn . '" href="' . $baseUrl . '/dfrn_' . $dfrn . '/' . $nickname . '" />' . "\n";
|
||||
}
|
||||
$htmlhead .= '<link rel="dfrn-poco" href="' . $baseUrl . '/poco/' . $nickname . '" />' . "\n";
|
||||
|
||||
return $htmlhead;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ class Index extends BaseSettingsModule
|
|||
'$region' => ['region', DI::l10n()->t('Region/State:'), $profile['region']],
|
||||
'$postal_code' => ['postal_code', DI::l10n()->t('Postal/Zip Code:'), $profile['postal-code']],
|
||||
'$country_name' => ['country_name', DI::l10n()->t('Country:'), $profile['country-name']],
|
||||
'$age' => ((intval($profile['dob'])) ? '(' . DI::l10n()->t('Age: ') . Temporal::getAgeByTimezone($profile['dob'], $a->user['timezone'], $a->user['timezone']) . ')' : ''),
|
||||
'$age' => ((intval($profile['dob'])) ? '(' . DI::l10n()->t('Age: ') . DI::l10n()->tt('%d year old', '%d years old', Temporal::getAgeByTimezone($profile['dob'], $a->user['timezone'])) . ')' : ''),
|
||||
'$gender' => DI::l10n()->t(ContactSelector::gender($profile['gender'])),
|
||||
'$marital' => ['selector' => ContactSelector::maritalStatus($profile['marital']), 'value' => DI::l10n()->t($profile['marital'])],
|
||||
'$with' => ['with', DI::l10n()->t('Who: (if applicable)'), strip_tags($profile['with']), DI::l10n()->t('Examples: cathy123, Cathy Williams, cathy@example.com')],
|
||||
|
|
|
@ -1,184 +0,0 @@
|
|||
|
||||
{{include file="section_title.tpl"}}
|
||||
|
||||
<dl id="aprofile-fullname" class="aprofile">
|
||||
<dt>{{$profile.fullname.0}}</dt>
|
||||
<dd>{{$profile.fullname.1}}</dd>
|
||||
</dl>
|
||||
|
||||
{{if $profile.membersince}}
|
||||
<dl id="aprofile-membersince" class="aprofile">
|
||||
<dt>{{$profile.membersince.0}}</dt>
|
||||
<dd>{{$profile.membersince.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.gender}}
|
||||
<dl id="aprofile-gender" class="aprofile">
|
||||
<dt>{{$profile.gender.0}}</dt>
|
||||
<dd>{{$profile.gender.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.birthday}}
|
||||
<dl id="aprofile-birthday" class="aprofile">
|
||||
<dt>{{$profile.birthday.0}}</dt>
|
||||
<dd>{{$profile.birthday.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.age}}
|
||||
<dl id="aprofile-age" class="aprofile">
|
||||
<dt>{{$profile.age.0}}</dt>
|
||||
<dd>{{$profile.age.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.marital}}
|
||||
<dl id="aprofile-marital" class="aprofile">
|
||||
<dt><span class="heart">♥</span> {{$profile.marital.0}}</dt>
|
||||
<dd>{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with nofilter}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.sexual}}
|
||||
<dl id="aprofile-sexual" class="aprofile">
|
||||
<dt>{{$profile.sexual.0}}</dt>
|
||||
<dd>{{$profile.sexual.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.pub_keywords}}
|
||||
<dl id="aprofile-tags" class="aprofile">
|
||||
<dt>{{$profile.pub_keywords.0}}</dt>
|
||||
<dd>{{$profile.pub_keywords.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.homepage}}
|
||||
<dl id="aprofile-homepage" class="aprofile">
|
||||
<dt>{{$profile.homepage.0}}</dt>
|
||||
<dd>{{$profile.homepage.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.hometown}}
|
||||
<dl id="aprofile-hometown" class="aprofile">
|
||||
<dt>{{$profile.hometown.0}}</dt>
|
||||
<dd>{{$profile.hometown.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.politic}}
|
||||
<dl id="aprofile-politic" class="aprofile">
|
||||
<dt>{{$profile.politic.0}}</dt>
|
||||
<dd>{{$profile.politic.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.religion}}
|
||||
<dl id="aprofile-religion" class="aprofile">
|
||||
<dt>{{$profile.religion.0}}</dt>
|
||||
<dd>{{$profile.religion.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.about}}
|
||||
<dl id="aprofile-about" class="aprofile">
|
||||
<dt>{{$profile.about.0}}</dt>
|
||||
<dd>{{$profile.about.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.interest}}
|
||||
<dl id="aprofile-interest" class="aprofile">
|
||||
<dt>{{$profile.interest.0}}</dt>
|
||||
<dd>{{$profile.interest.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.likes}}
|
||||
<dl id="aprofile-likes" class="aprofile">
|
||||
<dt>{{$profile.likes.0}}</dt>
|
||||
<dd>{{$profile.likes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.dislikes}}
|
||||
<dl id="aprofile-dislikes" class="aprofile">
|
||||
<dt>{{$profile.dislikes.0}}</dt>
|
||||
<dd>{{$profile.dislikes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.contact}}
|
||||
<dl id="aprofile-contact" class="aprofile">
|
||||
<dt>{{$profile.contact.0}}</dt>
|
||||
<dd>{{$profile.contact.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.music}}
|
||||
<dl id="aprofile-music" class="aprofile">
|
||||
<dt>{{$profile.music.0}}</dt>
|
||||
<dd>{{$profile.music.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.book}}
|
||||
<dl id="aprofile-book" class="aprofile">
|
||||
<dt>{{$profile.book.0}}</dt>
|
||||
<dd>{{$profile.book.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.tv}}
|
||||
<dl id="aprofile-tv" class="aprofile">
|
||||
<dt>{{$profile.tv.0}}</dt>
|
||||
<dd>{{$profile.tv.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.film}}
|
||||
<dl id="aprofile-film" class="aprofile">
|
||||
<dt>{{$profile.film.0}}</dt>
|
||||
<dd>{{$profile.film.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.romance}}
|
||||
<dl id="aprofile-romance" class="aprofile">
|
||||
<dt>{{$profile.romance.0}}</dt>
|
||||
<dd>{{$profile.romance.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.work}}
|
||||
<dl id="aprofile-work" class="aprofile">
|
||||
<dt>{{$profile.work.0}}</dt>
|
||||
<dd>{{$profile.work.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.education}}
|
||||
<dl id="aprofile-education" class="aprofile">
|
||||
<dt>{{$profile.education.0}}</dt>
|
||||
<dd>{{$profile.education.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.forumlist}}
|
||||
<dl id="aprofile-forumlist" class="aprofile">
|
||||
<dt>{{$profile.forumlist.0}}</dt>
|
||||
<dd>{{$profile.forumlist.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
124
view/templates/profile/index.tpl
Normal file
124
view/templates/profile/index.tpl
Normal file
|
@ -0,0 +1,124 @@
|
|||
<div id="profile-page" class="generic-page-wrapper">
|
||||
{{include file="section_title.tpl"}}
|
||||
|
||||
{{* The link to edit the profile*}}
|
||||
{{if $is_owner}}
|
||||
<div id="profile-edit-links">
|
||||
<ul class="nav nav-pills preferences">
|
||||
<li class="pull-right">
|
||||
<a class="btn btn-link btn-sm" type="button" id="profile-edit-link" href="{{$edit_link.url}}" title="{{$edit_link.title}}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{$edit_link.label}}
|
||||
</a>
|
||||
</li>
|
||||
{{if count($view_as_contacts)}}
|
||||
<li class="pull-right">
|
||||
<form action="{{$query_string}}" method="get">
|
||||
<button type="submit" class="btn btn-sm">{{$view_as}}</button>
|
||||
<select name="viewas" class="input-sm">
|
||||
<option value="0">Yourself</option>
|
||||
{{foreach $view_as_contacts as $contact}}
|
||||
<option value="{{$contact.id}}"{{if $contact.id == $view_as_contact_id}} selected{{/if}}>{{$contact.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
|
||||
</form>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for switching between this modes *}}
|
||||
{{if count($custom_fields)}}
|
||||
<ul id="profile-menu" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="{{$query_string}}#profile-content-standard" aria-controls="profile-content-standard" role="tab" data-toggle="tab">{{$basic}}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="{{$query_string}}#profile-content-advanced" aria-controls="profile-content-advanced" role="tab" data-toggle="tab">{{$advanced}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="profile-content-standard">
|
||||
<dl id="{{$basic_fields.fullname.id}}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.fullname.class|default:'aprofile'}}">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.fullname.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.fullname.value}}</dd>
|
||||
</dl>
|
||||
|
||||
{{if $basic_fields.membersince}}
|
||||
<dl id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.membersince.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.membersince.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.membersince.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.birthday}}
|
||||
<dl id="aprofile-birthday" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.birthday.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.birthday.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.birthday.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.age}}
|
||||
<dl id="aprofile-age" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.age.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.age.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.age.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.location}}
|
||||
<dl id="aprofile-location" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.location.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.location.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.location.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.homepage}}
|
||||
<dl id="aprofile-homepage" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.homepage.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.homepage.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.homepage.value nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.xmpp}}
|
||||
<dl id="aprofile-xmpp" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.xmpp.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.xmpp.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.xmpp.value nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.pub_keywords}}
|
||||
<dl id="aprofile-tags" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.pub_keywords.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.pub_keywords.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">
|
||||
{{foreach $basic_fields.pub_keywords.value as $tag}}
|
||||
<a href="{{$tag.url}}" class="tag label btn-info sm">{{$tag.label}} <i class="fa fa-bolt" aria-hidden="true"></i></a>
|
||||
{{/foreach}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{if count($custom_fields)}}
|
||||
<div role="tabpanel" class="tab-pane advanced" id="profile-content-advanced">
|
||||
{{foreach $custom_fields as $custom_field}}
|
||||
<dl id="{{$custom_field.id}}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$custom_field.class|default:'aprofile'}}">
|
||||
<hr class="profile-separator">
|
||||
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$custom_field.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$custom_field.value nofilter}}</dd>
|
||||
</dl>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
|
@ -646,10 +646,14 @@ input#dfrn-url {
|
|||
#profile-edit-links ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#profile-edit-links li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-edit-side-div {
|
||||
float: right;
|
||||
}
|
||||
|
|
|
@ -1,234 +0,0 @@
|
|||
<div id="profile-page" class="generic-page-wrapper">
|
||||
<h3 class="">{{$title}}</h3>
|
||||
|
||||
{{* The link to edit the profile*}}
|
||||
{{if $profile.edit}}
|
||||
<ul class="nav nav-pills preferences">
|
||||
<li class="pull-right">
|
||||
<a class="btn btn-link btn-sm" type="button" id="profile-edit-link" href="{{$profile.edit.0}}" title="{{$profile.edit.3}}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{$profile.edit.1}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
{{/if}}
|
||||
|
||||
{{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for swithching between this modes *}}
|
||||
<ul id="profile-menu" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#profile-content-standard" aria-controls="profile-content-standard" role="tab" data-toggle="tab">{{$basic}}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#profile-content-advanced" aria-controls="profile-content-advanced" role="tab" data-toggle="tab">{{$advanced}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="profile-content-standard">
|
||||
<div id="aprofile-fullname" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.fullname.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.fullname.1}}</div>
|
||||
</div>
|
||||
|
||||
{{if $profile.membersince}}
|
||||
<div id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.membersince.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.membersince.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.gender}}
|
||||
<div id="aprofile-gender" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.gender.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.gender.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.birthday}}
|
||||
<div id="aprofile-birthday" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.birthday.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.birthday.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.age}}
|
||||
<div id="aprofile-age" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.age.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.age.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.hometown}}
|
||||
<div id="aprofile-hometown" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.hometown.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.hometown.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.marital}}
|
||||
<div id="aprofile-marital" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted"><span class="heart">♥</span> {{$profile.marital.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with nofilter}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.homepage}}
|
||||
<div id="aprofile-homepage" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.homepage.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.homepage.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.about}}
|
||||
<div id="aprofile-about" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.about.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.about.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.pub_keywords}}
|
||||
<div id="aprofile-tags" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.pub_keywords.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.pub_keywords.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div role="tabpanel" class="tab-pane advanced" id="profile-content-advanced">
|
||||
{{if $profile.sexual}}
|
||||
<div id="aprofile-sexual" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.sexual.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.sexual.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.politic}}
|
||||
<div id="aprofile-politic" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.politic.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.politic.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.religion}}
|
||||
<div id="aprofile-religion" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.religion.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.religion.1}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.interest}}
|
||||
<div id="aprofile-interest" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.interest.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.interest.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.likes}}
|
||||
<div id="aprofile-likes" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.likes.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.likes.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.dislikes}}
|
||||
<div id="aprofile-dislikes" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.dislikes.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.dislikes.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.contact}}
|
||||
<div id="aprofile-contact" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.contact.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.contact.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.music}}
|
||||
<div id="aprofile-music" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.music.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.music.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.book}}
|
||||
<div id="aprofile-book" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.book.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.book.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.tv}}
|
||||
<div id="aprofile-tv" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.tv.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.tv.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.film}}
|
||||
<div id="aprofile-film" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.film.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.film.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.romance}}
|
||||
<div id="aprofile-romance" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.romance.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.romance.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.work}}
|
||||
<div id="aprofile-work" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.work.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.work.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.education}}
|
||||
<div id="aprofile-education" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.education.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.education.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.forumlist}}
|
||||
<div id="aprofile-forumlist" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 aprofile">
|
||||
<hr class="profile-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$profile.forumlist.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$profile.forumlist.1 nofilter}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1964,6 +1964,9 @@ ul.tabs li .active {
|
|||
list-style: none;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
#profile-edit-default-desc {
|
||||
color: #FF0000;
|
||||
border: 1px solid #FF8888;
|
||||
|
|
|
@ -1964,6 +1964,9 @@ ul.tabs li .active {
|
|||
list-style: none;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
#profile-edit-default-desc {
|
||||
color: #FF0000;
|
||||
border: 1px solid #FF8888;
|
||||
|
|
|
@ -1964,6 +1964,9 @@ ul.tabs li .active {
|
|||
list-style: none;
|
||||
margin-top: 10px;
|
||||
}
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
#profile-edit-default-desc {
|
||||
color: #FF0000;
|
||||
border: 1px solid #FF8888;
|
||||
|
|
|
@ -1257,6 +1257,10 @@ ul.tabs {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#profile-edit-default-desc {
|
||||
color: #FF0000;
|
||||
border: 1px solid #FF8888;
|
||||
|
|
|
@ -104,6 +104,14 @@ input[type=submit]:active {
|
|||
top: 1px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
#search-text,
|
||||
#search-submit,
|
||||
#search-save {
|
||||
|
@ -2127,6 +2135,10 @@ div[id$="wrapper"] br {
|
|||
position: absolute;
|
||||
}
|
||||
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#cropimage-wrapper {
|
||||
float:left;
|
||||
}
|
||||
|
|
|
@ -2406,6 +2406,10 @@ aside #id_password {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
#profile-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.profile-edit-side-div {
|
||||
/* display: none; */
|
||||
float: right;
|
||||
|
|
|
@ -1,186 +0,0 @@
|
|||
{{if $profile.edit}}
|
||||
<div class="profile-view-actions">
|
||||
<a class="btn" href="{{$profile.edit.0}}" id="profile-view-edit-link" title="{{$profile.edit.3}}">{{$profile.edit.1}}</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{include file="section_title.tpl"}}
|
||||
|
||||
<dl id="aprofile-fullname" class="aprofile">
|
||||
<dt>{{$profile.fullname.0}}</dt>
|
||||
<dd>{{$profile.fullname.1}}</dd>
|
||||
</dl>
|
||||
|
||||
{{if $profile.membersince}}
|
||||
<dl id="aprofile-membersince" class="aprofile">
|
||||
<dt>{{$profile.membersince.0}}</dt>
|
||||
<dd>{{$profile.membersince.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.gender}}
|
||||
<dl id="aprofile-gender" class="aprofile">
|
||||
<dt>{{$profile.gender.0}}</dt>
|
||||
<dd>{{$profile.gender.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.birthday}}
|
||||
<dl id="aprofile-birthday" class="aprofile">
|
||||
<dt>{{$profile.birthday.0}}</dt>
|
||||
<dd>{{$profile.birthday.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.age}}
|
||||
<dl id="aprofile-age" class="aprofile">
|
||||
<dt>{{$profile.age.0}}</dt>
|
||||
<dd>{{$profile.age.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.marital}}
|
||||
<dl id="aprofile-marital" class="aprofile">
|
||||
<dt><span class="heart">♥</span> {{$profile.marital.0}}</dt>
|
||||
<dd>{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.sexual}}
|
||||
<dl id="aprofile-sexual" class="aprofile">
|
||||
<dt>{{$profile.sexual.0}}</dt>
|
||||
<dd>{{$profile.sexual.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.pub_keywords}}
|
||||
<dl id="aprofile-tags" class="aprofile">
|
||||
<dt>{{$profile.pub_keywords.0}}</dt>
|
||||
<dd>{{$profile.pub_keywords.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.homepage}}
|
||||
<dl id="aprofile-homepage" class="aprofile">
|
||||
<dt>{{$profile.homepage.0}}</dt>
|
||||
<dd>{{$profile.homepage.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.hometown}}
|
||||
<dl id="aprofile-hometown" class="aprofile">
|
||||
<dt>{{$profile.hometown.0}}</dt>
|
||||
<dd>{{$profile.hometown.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.politic}}
|
||||
<dl id="aprofile-politic" class="aprofile">
|
||||
<dt>{{$profile.politic.0}}</dt>
|
||||
<dd>{{$profile.politic.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.religion}}
|
||||
<dl id="aprofile-religion" class="aprofile">
|
||||
<dt>{{$profile.religion.0}}</dt>
|
||||
<dd>{{$profile.religion.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.about}}
|
||||
<dl id="aprofile-about" class="aprofile">
|
||||
<dt>{{$profile.about.0}}</dt>
|
||||
<dd>{{$profile.about.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.interest}}
|
||||
<dl id="aprofile-interest" class="aprofile">
|
||||
<dt>{{$profile.interest.0}}</dt>
|
||||
<dd>{{$profile.interest.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.likes}}
|
||||
<dl id="aprofile-likes" class="aprofile">
|
||||
<dt>{{$profile.likes.0}}</dt>
|
||||
<dd>{{$profile.likes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.dislikes}}
|
||||
<dl id="aprofile-dislikes" class="aprofile">
|
||||
<dt>{{$profile.dislikes.0}}</dt>
|
||||
<dd>{{$profile.dislikes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.contact}}
|
||||
<dl id="aprofile-contact" class="aprofile">
|
||||
<dt>{{$profile.contact.0}}</dt>
|
||||
<dd>{{$profile.contact.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.music}}
|
||||
<dl id="aprofile-music" class="aprofile">
|
||||
<dt>{{$profile.music.0}}</dt>
|
||||
<dd>{{$profile.music.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.book}}
|
||||
<dl id="aprofile-book" class="aprofile">
|
||||
<dt>{{$profile.book.0}}</dt>
|
||||
<dd>{{$profile.book.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.tv}}
|
||||
<dl id="aprofile-tv" class="aprofile">
|
||||
<dt>{{$profile.tv.0}}</dt>
|
||||
<dd>{{$profile.tv.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.film}}
|
||||
<dl id="aprofile-film" class="aprofile">
|
||||
<dt>{{$profile.film.0}}</dt>
|
||||
<dd>{{$profile.film.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.romance}}
|
||||
<dl id="aprofile-romance" class="aprofile">
|
||||
<dt>{{$profile.romance.0}}</dt>
|
||||
<dd>{{$profile.romance.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.work}}
|
||||
<dl id="aprofile-work" class="aprofile">
|
||||
<dt>{{$profile.work.0}}</dt>
|
||||
<dd>{{$profile.work.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.education}}
|
||||
<dl id="aprofile-education" class="aprofile">
|
||||
<dt>{{$profile.education.0}}</dt>
|
||||
<dd>{{$profile.education.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.forumlist}}
|
||||
<dl id="aprofile-forumlist" class="aprofile">
|
||||
<dt>{{$profile.forumlist.0}}</dt>
|
||||
<dd>{{$profile.forumlist.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
Loading…
Reference in a new issue