unify hcard and vcard: make $pdesc available in hcard&vcard
This commit is contained in:
parent
39b37281a7
commit
cd7ec72b20
|
@ -190,7 +190,7 @@ if(! function_exists('profile_sidebar')) {
|
||||||
$o = '';
|
$o = '';
|
||||||
$location = false;
|
$location = false;
|
||||||
$address = false;
|
$address = false;
|
||||||
$pdesc = true;
|
// $pdesc = true;
|
||||||
|
|
||||||
if((! is_array($profile)) && (! count($profile)))
|
if((! is_array($profile)) && (! count($profile)))
|
||||||
return $o;
|
return $o;
|
||||||
|
@ -371,7 +371,7 @@ if(! function_exists('profile_sidebar')) {
|
||||||
'$account_type' => $account_type,
|
'$account_type' => $account_type,
|
||||||
'$location' => $location,
|
'$location' => $location,
|
||||||
'$gender' => $gender,
|
'$gender' => $gender,
|
||||||
'$pdesc' => $pdesc,
|
// '$pdesc' => $pdesc,
|
||||||
'$marital' => $marital,
|
'$marital' => $marital,
|
||||||
'$homepage' => $homepage,
|
'$homepage' => $homepage,
|
||||||
'$about' => $about,
|
'$about' => $about,
|
||||||
|
|
|
@ -39,16 +39,21 @@ function photos_init(&$a) {
|
||||||
|
|
||||||
if((x($profile['page-flags']) == 1)
|
if((x($profile['page-flags']) == 1)
|
||||||
|| (x($profile['page-flags']) == 2)
|
|| (x($profile['page-flags']) == 2)
|
||||||
|| (x($profile['page-flags']) == 5))
|
|| (x($profile['page-flags']) == 5)) {
|
||||||
$account_type = page_type_translate($profile['page-flags']);
|
$account_type = page_type_translate($profile['page-flags']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$account_type = "";
|
||||||
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template("vcard-widget.tpl");
|
$tpl = get_markup_template("vcard-widget.tpl");
|
||||||
|
|
||||||
$vcard_widget .= replace_macros($tpl, array(
|
$vcard_widget .= replace_macros($tpl, array(
|
||||||
'$name' => $profile[name],
|
'$name' => $profile['name'],
|
||||||
'$photo' => $profile[photo],
|
'$photo' => $profile['photo'],
|
||||||
'$addr' => (($profile['addr'] != "") ? $profile['addr'] : ''),
|
'$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""),
|
||||||
'$account_type' => $account_type,
|
'$account_type' => $account_type,
|
||||||
|
'$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,16 +35,21 @@ function videos_init(&$a) {
|
||||||
|
|
||||||
if((x($profile['page-flags']) == 1)
|
if((x($profile['page-flags']) == 1)
|
||||||
|| (x($profile['page-flags']) == 2)
|
|| (x($profile['page-flags']) == 2)
|
||||||
|| (x($profile['page-flags']) == 5))
|
|| (x($profile['page-flags']) == 5)) {
|
||||||
$account_type = page_type_translate($profile['page-flags']);
|
$account_type = page_type_translate($profile['page-flags']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$account_type = "";
|
||||||
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template("vcard-widget.tpl");
|
$tpl = get_markup_template("vcard-widget.tpl");
|
||||||
|
|
||||||
$vcard_widget .= replace_macros($tpl, array(
|
$vcard_widget .= replace_macros($tpl, array(
|
||||||
'$name' => $profile[name],
|
'$name' => $profile['name'],
|
||||||
'$photo' => $profile[photo],
|
'$photo' => $profile['photo'],
|
||||||
'$addr' => (($profile['addr'] != "") ? $profile['addr'] : ''),
|
'$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""),
|
||||||
'$account_type' => $account_type,
|
'$account_type' => $account_type,
|
||||||
|
'$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
|
{{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}}
|
{{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>
|
<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,7 +2,7 @@
|
||||||
<div class="vcard">
|
<div class="vcard">
|
||||||
<div class="fn">{{$name}}</div>
|
<div class="fn">{{$name}}</div>
|
||||||
{{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
|
{{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}}
|
{{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>
|
<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}}
|
{{else}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
|
{{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>
|
<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}}
|
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
|
{{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>
|
<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}}
|
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
|
{{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>
|
<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}}
|
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
|
||||||
|
|
|
@ -993,6 +993,7 @@ aside .vcard .fn {
|
||||||
}
|
}
|
||||||
aside .vcard .title {
|
aside .vcard .title {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
aside .vcard dl {
|
aside .vcard dl {
|
||||||
height: auto;
|
height: auto;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
|
{{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}}
|
{{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>
|
<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…
Reference in a new issue