X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=bf8d696b60f90cceef1b14d825ba70151cde932f;hb=1f7f964bb7200d4f658742a999c07f1dd6cbe97c;hp=a7d48cb751200fc47dac47e1f75fa71733f535b6;hpb=68a6f0298e4ebbe74d353d130da0094490a4579c;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index a7d48cb751..bf8d696b60 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -21,23 +21,31 @@ 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); + + if((intval($profile['page-flags']) == PAGE_COMMUNITY) || (intval($profile['page-flags']) == PAGE_PRVGROUP)) + $account_type = t('Forum'); + else + $account_type = ""; $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,7 +61,7 @@ function videos_init(&$a) { $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); if($albums_visible) { - $o .= '