X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=e5a0887bb9f3a2e6e22c1ade3fe262977d94886f;hb=6abeff10c0d7d39674075f88dffefa379c4d2db9;hp=943a9d09f2bf7ca07cc935022d5e2c329b6706cc;hpb=b7784671219126412683a74080ce064fa826f82b;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 943a9d09f2..e5a0887bb9 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((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"); + $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']); @@ -50,7 +61,7 @@ function videos_init(&$a) { $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true); if($albums_visible) { - $o .= '