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}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} {{if $profile.picdate}}
{{$profile.name}}
diff --git a/view/templates/vcard-widget.tpl b/view/templates/vcard-widget.tpl index 77405614c5..ec59fa46dc 100644 --- a/view/templates/vcard-widget.tpl +++ b/view/templates/vcard-widget.tpl @@ -2,7 +2,7 @@
{{$name}}
{{if $addr}}
{{$addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $pdesc}}
{{$pdesc}}
{{/if}} {{if $url}}
{{$name}}
{{else}} diff --git a/view/theme/duepuntozero/templates/profile_vcard.tpl b/view/theme/duepuntozero/templates/profile_vcard.tpl index bfcbda798c..bd2e92f9e4 100644 --- a/view/theme/duepuntozero/templates/profile_vcard.tpl +++ b/view/theme/duepuntozero/templates/profile_vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}}
{{$profile.name}}
{{if $account_type}}
{{$account_type}}
{{/if}} diff --git a/view/theme/frost-mobile/templates/profile_vcard.tpl b/view/theme/frost-mobile/templates/profile_vcard.tpl index a7ea8e6a07..b3024074be 100644 --- a/view/theme/frost-mobile/templates/profile_vcard.tpl +++ b/view/theme/frost-mobile/templates/profile_vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}}
{{$profile.name}}
{{if $account_type}}
{{$account_type}}
{{/if}} diff --git a/view/theme/frost/templates/profile_vcard.tpl b/view/theme/frost/templates/profile_vcard.tpl index 9d1a370169..1a0c39a826 100644 --- a/view/theme/frost/templates/profile_vcard.tpl +++ b/view/theme/frost/templates/profile_vcard.tpl @@ -5,7 +5,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}}
{{$profile.name}}
{{if $account_type}}
{{$account_type}}
{{/if}} diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 94390d7a41..97a3aaaf96 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -993,6 +993,7 @@ aside .vcard .fn { } aside .vcard .title { margin-bottom: 5px; + float: left; } aside .vcard dl { height: auto; diff --git a/view/theme/vier/templates/profile_vcard.tpl b/view/theme/vier/templates/profile_vcard.tpl index d81faf175b..a3b08947d0 100644 --- a/view/theme/vier/templates/profile_vcard.tpl +++ b/view/theme/vier/templates/profile_vcard.tpl @@ -15,7 +15,7 @@ {{if $profile.addr}}
{{$profile.addr}}
{{/if}} - {{if $pdesc}}
{{$profile.pdesc}}
{{/if}} + {{if $profile.pdesc}}
{{$profile.pdesc}}
{{/if}} {{if $profile.picdate}}
{{$profile.name}}