X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=00c7c6dfa1798654855dd5d803e3ee5b8b888a4c;hb=c99247ddabe7e8383aa86f94d4ffae73e382a710;hp=4f5d7cd22db33acd58fc9cdce0c2175647094ed5;hpb=e43c7a44472ccdefd01104e8d919a72e10ec77c3;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 4f5d7cd22d..00c7c6dfa1 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -6,7 +6,7 @@ require_once('include/security.php'); require_once('include/redir.php'); -function videos_init(&$a) { +function videos_init(App &$a) { if($a->argc > 1) auto_redir($a, $a->argv[1]); @@ -21,23 +21,28 @@ function videos_init(&$a) { 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']; - $profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg'); + $profile = get_profiledata_by_nick($nick, $a->profile_uid); + + $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'] : ""), )); @@ -53,8 +58,8 @@ function videos_init(&$a) { $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); if($albums_visible) { - $o .= '