X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=7ea09d6a93d419475341a305b978f712b88d6391;hb=f479692966f67ef84fa07dd6c571622b361202ca;hp=5553bbbeb3a601cdbf79aa58d05bb12cbb84ae63;hpb=1067718018610cda4b544c5b106a89af109a48c9;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 5553bbbeb3..7ea09d6a93 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -15,27 +15,38 @@ function videos_init(&$a) { 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->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'); + if((x($profile['page-flags']) == 2) || (x($profile['page-flags']) == 5)) + $account_type = t('Forum'); + else + $account_type = ""; - $tpl = get_markup_template("vcard-widget.tpl"); + $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'] : ""), + )); /*$sql_extra = permissions_sql($a->data['user']['uid']); @@ -47,12 +58,12 @@ function videos_init(&$a) { if(count($albums)) { $a->data['albums'] = $albums; - $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); + $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); if($albums_visible) { - $o .= '