+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
+use Friendica\Core\System;
+use Friendica\Core\Worker;
+use Friendica\Database\DBM;
$a->profile['network'] = NETWORK_DFRN;
$a->page['title'] = $a->profile['name'] . " @ " . $a->config['sitename'];
$a->profile['network'] = NETWORK_DFRN;
$a->page['title'] = $a->profile['name'] . " @ " . $a->config['sitename'];
foreach ($_SESSION['remote'] as $visitor) {
if ($visitor['uid'] == $uid) {
$r = dba::select('contact', array('profile-id'), array('id' => $visitor['cid']), array('limit' => 1));
foreach ($_SESSION['remote'] as $visitor) {
if ($visitor['uid'] == $uid) {
$r = dba::select('contact', array('profile-id'), array('id' => $visitor['cid']), array('limit' => 1));
$r = dba::fetch_first("SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`,
`contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`,
`profile`.`uid` AS `profile_uid`, `profile`.*,
$r = dba::fetch_first("SELECT `contact`.`id` AS `contact_id`, `contact`.`photo` as `contact_photo`,
`contact`.`thumb` AS `contact_thumb`, `contact`.`micro` AS `contact_micro`,
`profile`.`uid` AS `profile_uid`, `profile`.*,
}
if (dba::exists('contact', array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url))) {
}
if (dba::exists('contact', array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url))) {
// show edit profile to yourself
if (!$is_contact && $profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
// show edit profile to yourself
if (!$is_contact && $profile['uid'] == local_user() && feature_enabled(local_user(),'multi_profiles')) {
- $profile['edit'] = array(App::get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
+ $profile['edit'] = array(System::baseUrl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
- $profile['edit'] = array(App::get_baseurl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
+ $profile['edit'] = array(System::baseUrl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
$profile['menu'] = array(
'chg_photo' => t('Change profile photo'),
'cr_new' => null,
$profile['menu'] = array(
'chg_photo' => t('Change profile photo'),
'cr_new' => null,
if ($profile['guid'] != "")
$diaspora = array(
'guid' => $profile['guid'],
if ($profile['guid'] != "")
$diaspora = array(
'guid' => $profile['guid'],
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
'nickname' => $profile['nickname'],
'fullname' => $profile['name'],
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
'nickname' => $profile['nickname'],
'fullname' => $profile['name'],
if (is_array($a->profile) && !$a->profile['hide-friends']) {
$r = q("SELECT `gcontact`.`updated` FROM `contact` INNER JOIN `gcontact` WHERE `gcontact`.`nurl` = `contact`.`nurl` AND `self` AND `uid` = %d LIMIT 1",
intval($a->profile['uid']));
if (is_array($a->profile) && !$a->profile['hide-friends']) {
$r = q("SELECT `gcontact`.`updated` FROM `contact` INNER JOIN `gcontact` WHERE `gcontact`.`nurl` = `contact`.`nurl` AND `self` AND `uid` = %d LIMIT 1",
intval($a->profile['uid']));
$updated = date("c", strtotime($r[0]['updated']));
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
$updated = date("c", strtotime($r[0]['updated']));
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
datetime_convert('UTC','UTC','now + 6 days'),
datetime_convert('UTC','UTC','now')
);
datetime_convert('UTC','UTC','now + 6 days'),
datetime_convert('UTC','UTC','now')
);
}
$tpl = get_markup_template("birthdays_reminder.tpl");
return replace_macros($tpl, array(
}
$tpl = get_markup_template("birthdays_reminder.tpl");
return replace_macros($tpl, array(
'$classtoday' => $classtoday,
'$count' => $total,
'$event_reminders' => t('Birthday Reminders'),
'$classtoday' => $classtoday,
'$count' => $total,
'$event_reminders' => t('Birthday Reminders'),
}
$tpl = get_markup_template("events_reminder.tpl");
return replace_macros($tpl, array(
}
$tpl = get_markup_template("events_reminder.tpl");
return replace_macros($tpl, array(
'$classtoday' => $classtoday,
'$count' => count($r),
'$event_reminders' => t('Event Reminders'),
'$classtoday' => $classtoday,
'$count' => count($r),
'$event_reminders' => t('Event Reminders'),
- $profile['edit'] = array(App::get_baseurl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
+ $profile['edit'] = array(System::baseUrl(). '/profiles/'.$a->profile['id'], t('Edit profile'),"", t('Edit profile'));
'sel' => ((!isset($tab) && $a->argv[0]=='photos') ? 'active' : ''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
'sel' => ((!isset($tab) && $a->argv[0]=='photos') ? 'active' : ''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='events') ? 'active' : ''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='events') ? 'active' : ''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='cal') ? 'active' : ''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='cal') ? 'active' : ''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='notes') ? 'active' : ''),
'title' => t('Only You Can See This'),
'id' => 'notes-tab',
'sel' =>((!isset($tab) && $a->argv[0]=='notes') ? 'active' : ''),
'title' => t('Only You Can See This'),
'id' => 'notes-tab',
if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) {
$tabs[] = array(
'label' => t('Contacts'),
if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) {
$tabs[] = array(
'label' => t('Contacts'),
'sel' => ((!isset($tab) && $a->argv[0]=='viewcontacts') ? 'active' : ''),
'title' => t('Contacts'),
'id' => 'viewcontacts-tab',
'sel' => ((!isset($tab) && $a->argv[0]=='viewcontacts') ? 'active' : ''),
'title' => t('Contacts'),
'id' => 'viewcontacts-tab',
$arr = array('zrl' => $tmp_str, 'url' => $a->cmd);
call_hooks('zrl_init', $arr);
}
$arr = array('zrl' => $tmp_str, 'url' => $a->cmd);
call_hooks('zrl_init', $arr);
}