Browse Source

unify hcard and vcard: make $pdesc available in hcard&vcard

pull/2131/head
rabuzarus 6 years ago
parent
commit
cd7ec72b20
  1. 4
      include/identity.php
  2. 15
      mod/photos.php
  3. 15
      mod/videos.php
  4. 2
      view/templates/profile_vcard.tpl
  5. 2
      view/templates/vcard-widget.tpl
  6. 2
      view/theme/duepuntozero/templates/profile_vcard.tpl
  7. 2
      view/theme/frost-mobile/templates/profile_vcard.tpl
  8. 2
      view/theme/frost/templates/profile_vcard.tpl
  9. 1
      view/theme/vier/style.css
  10. 2
      view/theme/vier/templates/profile_vcard.tpl

4
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,

15
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'] : ""),
));

15
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'] : ""),
));

2
view/templates/profile_vcard.tpl

@ -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>

2
view/templates/vcard-widget.tpl

@ -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}}

2
view/theme/duepuntozero/templates/profile_vcard.tpl

@ -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}}

2
view/theme/frost-mobile/templates/profile_vcard.tpl

@ -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}}

2
view/theme/frost/templates/profile_vcard.tpl

@ -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}}

1
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;

2
view/theme/vier/templates/profile_vcard.tpl

@ -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>

Loading…
Cancel
Save