]> git.mxchange.org Git - friendica.git/commitdiff
unify hcard and vcard: make $pdesc available in hcard&vcard
authorrabuzarus <>
Tue, 1 Dec 2015 18:47:23 +0000 (19:47 +0100)
committerrabuzarus <>
Tue, 1 Dec 2015 18:47:23 +0000 (19:47 +0100)
include/identity.php
mod/photos.php
mod/videos.php
view/templates/profile_vcard.tpl
view/templates/vcard-widget.tpl
view/theme/duepuntozero/templates/profile_vcard.tpl
view/theme/frost-mobile/templates/profile_vcard.tpl
view/theme/frost/templates/profile_vcard.tpl
view/theme/vier/style.css
view/theme/vier/templates/profile_vcard.tpl

index e412c68c961c4f2085bbfb7e100ac20aa7c3f9dc..b9984f10a0a92f868bbb193b11cdc7cb44ba4702 100644 (file)
@@ -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,
index 3f8d3afafeaa5418583b635879a975215dab282e..7ca850bc900c73c34f2f1f11b697f3da6311e8a0 100644 (file)
@@ -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'] : ""),
                ));
 
 
index ae00185cca9da11fe03c6352499ea820be86ae16..de9feac06a385a91eb5ad86cc55257847b4cd7b0 100644 (file)
@@ -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'] : ""),
                ));
 
 
index 1b4e6a6eeeea3dd5cb7d894402ff85983c2c9452..0a3a13f9dc633ece2959c9f64518bdd9acb22635 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>
index 77405614c5c89e6a5520f9cfe0a54630d2b3a01b..ec59fa46dcb731262955b1a994c2c1b41785b2a1 100644 (file)
@@ -2,7 +2,7 @@
 <div class="vcard">
        <div class="fn">{{$name}}</div>
        {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $pdesc}}<div class="title">{{$pdesc}}</div>{{/if}}
        {{if $url}}
        <div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
        {{else}}
index bfcbda798cf09ba1dcd2ad4da62384a7365caac3..bd2e92f9e45d0d713300b6f5a78cdb630f82e80d 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index a7ea8e6a07bd9eafa623bc801f7d70b335e11d15..b3024074be1d2409fb6cf7312eae2f381f12e708 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 9d1a370169c593ac890d781cb719c82211ce2766..1a0c39a82690884a4ec707d6a90792f569142f84 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 94390d7a413a4a7509791fb1f30d1e050f766ef4..97a3aaaf962a447ef3601b3f75412a369fb09d64 100644 (file)
@@ -993,6 +993,7 @@ aside .vcard .fn {
 }
 aside .vcard .title {
   margin-bottom: 5px;
+  float: left;
 }
 aside .vcard dl {
   height: auto;
index d81faf175bf7b1131c0dc03c0b13c13e4ceffa5c..a3b08947d0502382530f1277c185e727b2b88971 100644 (file)
@@ -15,7 +15,7 @@
 
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
 
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>