return;
}
+ nav_set_selected('home');
+
$o = '';
if($a->argc > 1) {
$nick = $a->argv[1];
- $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
+ $user = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1",
dbesc($nick)
);
- if(! count($r))
+ if(! count($user))
return;
- $a->data['user'] = $r[0];
- $a->profile_uid = $r[0]['uid'];
+ $a->data['user'] = $user[0];
+ $a->profile_uid = $user[0]['uid'];
+
+ $profile = get_profiledata_by_nick($nick, $a->profile_uid);
- $profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg');
+ $account_type = account_type($profile);
$tpl = get_markup_template("vcard-widget.tpl");
- $vcard_widget = replace_macros($tpl, array(
- '$name' => $a->data['user']['username'],
- '$photo' => $profilephoto
+ $vcard_widget .= replace_macros($tpl, array(
+ '$name' => $profile['name'],
+ '$photo' => $profile['photo'],
+ '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""),
+ '$account_type' => $account_type,
+ '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""),
));
$albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);
if($albums_visible) {
- $o .= '<div id="side-bar-photos-albums" class="widget">';
+ $o .= '<div id="sidebar-photos-albums" class="widget">';
$o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
$o .= '<ul>';
$a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), array(
'$method' => 'post',
'$message' => t('Do you really want to delete this video?'),
- '$extra_inputs' => [
- ['name'=>'id', 'value'=> $_POST['id']],
- ['name'=>'delete', 'value'=>'x']
- ],
+ '$extra_inputs' => array(
+ array('name'=>'id', 'value'=> $_POST['id']),
+ array('name'=>'delete', 'value'=>'x')
+ ),
'$confirm' => t('Delete Video'),
'$confirm_url' => $drop_url,
'$confirm_name' => 'confirm', // Needed so that confirmation will bring us back into this if statement
dbesc($video_id)
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
q("DELETE FROM `attach` WHERE `uid` = %d AND `id` = '%s'",
intval(local_user()),
dbesc($video_id)
$drop_id = intval($i[0]['id']);
if($i[0]['visible'])
- proc_run('php',"include/notifier.php","drop","$drop_id");
+ proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
}
}
intval($contact_id),
intval($owner_uid)
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$can_post = true;
$contact = $r[0];
$remote_contact = true;
- $visitor = $cid;
+ $visitor = $contact_id;
}
}
}
intval($contact_id),
intval($owner_uid)
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$contact = $r[0];
$remote_contact = true;
}
$sql_extra GROUP BY hash",
intval($a->data['user']['uid'])
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$a->set_pager_total(count($r));
$a->set_pager_itemspage(20);
}
$videos = array();
- if(count($r)) {
+ if(dbm::is_result($r)) {
foreach($r as $rr) {
if($a->theme['template_engine'] === 'internal') {
$alt_e = template_escape($rr['filename']);