From cd7ec72b205ad2e2b177a9a76888e73a065b831c Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Tue, 1 Dec 2015 19:47:23 +0100 Subject: [PATCH] unify hcard and vcard: make $pdesc available in hcard&vcard --- include/identity.php | 4 ++-- mod/photos.php | 15 ++++++++++----- mod/videos.php | 15 ++++++++++----- view/templates/profile_vcard.tpl | 2 +- view/templates/vcard-widget.tpl | 2 +- .../duepuntozero/templates/profile_vcard.tpl | 2 +- .../frost-mobile/templates/profile_vcard.tpl | 2 +- view/theme/frost/templates/profile_vcard.tpl | 2 +- view/theme/vier/style.css | 1 + view/theme/vier/templates/profile_vcard.tpl | 2 +- 10 files changed, 29 insertions(+), 18 deletions(-) diff --git a/include/identity.php b/include/identity.php index e412c68c96..b9984f10a0 100644 --- a/include/identity.php +++ b/include/identity.php @@ -190,7 +190,7 @@ if(! function_exists('profile_sidebar')) { $o = ''; $location = false; $address = false; - $pdesc = true; +// $pdesc = true; if((! is_array($profile)) && (! count($profile))) return $o; @@ -371,7 +371,7 @@ if(! function_exists('profile_sidebar')) { '$account_type' => $account_type, '$location' => $location, '$gender' => $gender, - '$pdesc' => $pdesc, +// '$pdesc' => $pdesc, '$marital' => $marital, '$homepage' => $homepage, '$about' => $about, diff --git a/mod/photos.php b/mod/photos.php index 3f8d3afafe..7ca850bc90 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -37,18 +37,23 @@ function photos_init(&$a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - if((x($profile['page-flags']) == 1) + if((x($profile['page-flags']) == 1) || (x($profile['page-flags']) == 2) - || (x($profile['page-flags']) == 5)) + || (x($profile['page-flags']) == 5)) { $account_type = page_type_translate($profile['page-flags']); + } + else { + $account_type = ""; + } $tpl = get_markup_template("vcard-widget.tpl"); $vcard_widget .= replace_macros($tpl, array( - '$name' => $profile[name], - '$photo' => $profile[photo], - '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ''), + '$name' => $profile['name'], + '$photo' => $profile['photo'], + '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""), '$account_type' => $account_type, + '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""), )); diff --git a/mod/videos.php b/mod/videos.php index ae00185cca..de9feac06a 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -33,18 +33,23 @@ function videos_init(&$a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - if((x($profile['page-flags']) == 1) + if((x($profile['page-flags']) == 1) || (x($profile['page-flags']) == 2) - || (x($profile['page-flags']) == 5)) + || (x($profile['page-flags']) == 5)) { $account_type = page_type_translate($profile['page-flags']); + } + else { + $account_type = ""; + } $tpl = get_markup_template("vcard-widget.tpl"); $vcard_widget .= replace_macros($tpl, array( - '$name' => $profile[name], - '$photo' => $profile[photo], - '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ''), + '$name' => $profile['name'], + '$photo' => $profile['photo'], + '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""), '$account_type' => $account_type, + '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""), )); diff --git a/view/templates/profile_vcard.tpl b/view/templates/profile_vcard.tpl index 1b4e6a6eee..0a3a13f9dc 100644 --- a/view/templates/profile_vcard.tpl +++ b/view/templates/profile_vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}