remove html and use vcard-widget.tpl
This commit is contained in:
parent
dc182d508e
commit
f309f3a681
|
@ -20,12 +20,11 @@ function allfriends_content(&$a) {
|
|||
intval(local_user())
|
||||
);
|
||||
|
||||
$a->page['aside'] .= '<div class="vcard">'
|
||||
. '<div class="fn label">' . $c[0]['name'] . '</div>'
|
||||
. '<div id="profile-photo-wrapper">'
|
||||
. '<a href="/contacts/' . $cid . '"><img class="photo" width="175" height="175"
|
||||
src="' . $c[0]['photo'] . '" alt="' . $c[0]['name'] . '" /></div>'
|
||||
. '</div>';
|
||||
$a->page['aside'] .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
|
||||
'$name' => $c[0]['name'],
|
||||
'$photo' => $c[0]['photo'],
|
||||
'url' => $a->get_baseurl() . '/contacts/' . $cid
|
||||
));
|
||||
|
||||
|
||||
if(! count($c))
|
||||
|
|
|
@ -28,12 +28,11 @@ function common_content(&$a) {
|
|||
);
|
||||
}
|
||||
|
||||
$a->page['aside'] .= '<div class="vcard">'
|
||||
. '<div class="fn label">' . $c[0]['name'] . '</div>'
|
||||
. '<div id="profile-photo-wrapper">'
|
||||
. '<img class="photo" width="175" height="175"
|
||||
src="' . $c[0]['photo'] . '" alt="' . $c[0]['name'] . '" /></div>'
|
||||
. '</div>';
|
||||
$a->page['aside'] .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
|
||||
'$name' => $c[0]['name'],
|
||||
'$photo' => $c[0]['photo'],
|
||||
'url' => $a->get_baseurl() . '/contacts/' . $cid
|
||||
));
|
||||
|
||||
|
||||
if(! count($c))
|
||||
|
|
|
@ -22,10 +22,11 @@ function crepair_init(&$a) {
|
|||
|
||||
if($contact_id) {
|
||||
$a->data['contact'] = $r[0];
|
||||
$o .= '<div class="vcard">';
|
||||
$o .= '<div class="fn">' . $a->data['contact']['name'] . '</div>';
|
||||
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->data['contact']['photo'] . '" alt="' . $a->data['contact']['name'] . '" /></div>';
|
||||
$o .= '</div>';
|
||||
$tpl = get_markup_template("vcard-widget.tpl");
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$name' => $a->data['contact']['name'],
|
||||
'$photo' => $a->data['contact']['photo']
|
||||
));
|
||||
$a->page['aside'] .= $o;
|
||||
|
||||
}
|
||||
|
|
|
@ -30,10 +30,14 @@ function photos_init(&$a) {
|
|||
|
||||
$a->data['user'] = $r[0];
|
||||
|
||||
$o .= '<div class="vcard">';
|
||||
$o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
|
||||
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
|
||||
$o .= '</div>';
|
||||
$profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg');
|
||||
|
||||
$tpl = get_markup_template("vcard-widget.tpl");
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$name' => $a->data['user']['username'],
|
||||
'$photo' => $profilephoto
|
||||
));
|
||||
|
||||
|
||||
$sql_extra = permissions_sql($a->data['user']['uid']);
|
||||
|
|
|
@ -28,10 +28,14 @@ function videos_init(&$a) {
|
|||
|
||||
$a->data['user'] = $r[0];
|
||||
|
||||
$o .= '<div class="vcard">';
|
||||
$o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
|
||||
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
|
||||
$o .= '</div>';
|
||||
$profilephoto = $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg');
|
||||
|
||||
$tpl = get_markup_template("vcard-widget.tpl");
|
||||
|
||||
$o .= replace_macros($tpl, array(
|
||||
'$name' => $a->data['user']['username'],
|
||||
'$photo' => $profilephoto
|
||||
));
|
||||
|
||||
|
||||
/*$sql_extra = permissions_sql($a->data['user']['uid']);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
<div class="vcard">
|
||||
<div class="fn"><a href="{{$url}}">{{$name}}</a></div>
|
||||
<div id="profile-photo-wrapper"><a href="{{$url}}"><img class="photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
|
||||
</div>
|
||||
|
||||
<div class="vcard">
|
||||
<div class="fn">{{$name}}</div>
|
||||
{{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}}
|
||||
<div id="profile-photo-wrapper"><img class="vcard-photo photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user