From 1067718018610cda4b544c5b106a89af109a48c9 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Wed, 27 May 2015 12:44:40 +0200 Subject: [PATCH] little revision --- mod/allfriends.php | 7 +++++-- mod/common.php | 7 +++++-- mod/crepair.php | 4 ++-- mod/photos.php | 3 ++- mod/videos.php | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/mod/allfriends.php b/mod/allfriends.php index bbdc5ef458..b73c55c226 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -20,12 +20,15 @@ function allfriends_content(&$a) { intval(local_user()) ); - $a->page['aside'] .= replace_macros(get_markup_template("vcard-widget.tpl"),array( + $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => $c[0]['name'], '$photo' => $c[0]['photo'], 'url' => $a->get_baseurl() . '/contacts/' . $cid )); - + + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + $a->page['aside'] .= $vcard_widget; if(! count($c)) return; diff --git a/mod/common.php b/mod/common.php index 574443f483..6a1bf4e31b 100644 --- a/mod/common.php +++ b/mod/common.php @@ -28,12 +28,15 @@ function common_content(&$a) { ); } - $a->page['aside'] .= replace_macros(get_markup_template("vcard-widget.tpl"),array( + $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => $c[0]['name'], '$photo' => $c[0]['photo'], 'url' => $a->get_baseurl() . '/contacts/' . $cid )); - + + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + $a->page['aside'] .= $vcard_widget; if(! count($c)) return; diff --git a/mod/crepair.php b/mod/crepair.php index 7cc67d4c83..457a06685d 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -23,11 +23,11 @@ function crepair_init(&$a) { if($contact_id) { $a->data['contact'] = $r[0]; $tpl = get_markup_template("vcard-widget.tpl"); - $o .= replace_macros($tpl, array( + $vcard_widget .= replace_macros($tpl, array( '$name' => $a->data['contact']['name'], '$photo' => $a->data['contact']['photo'] )); - $a->page['aside'] .= $o; + $a->page['aside'] .= $vcard_widget; } } diff --git a/mod/photos.php b/mod/photos.php index 657f23236d..ebb88c7391 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -34,7 +34,7 @@ function photos_init(&$a) { $tpl = get_markup_template("vcard-widget.tpl"); - $o .= replace_macros($tpl, array( + $vcard_widget .= replace_macros($tpl, array( '$name' => $a->data['user']['username'], '$photo' => $profilephoto )); @@ -76,6 +76,7 @@ function photos_init(&$a) { if(! x($a->page,'aside')) $a->page['aside'] = ''; + $a->page['aside'] .= $vcard_widget; $a->page['aside'] .= $o; diff --git a/mod/videos.php b/mod/videos.php index bc076e740a..5553bbbeb3 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -32,7 +32,7 @@ function videos_init(&$a) { $tpl = get_markup_template("vcard-widget.tpl"); - $o .= replace_macros($tpl, array( + $vcard_widget = replace_macros($tpl, array( '$name' => $a->data['user']['username'], '$photo' => $profilephoto )); @@ -74,7 +74,7 @@ function videos_init(&$a) { if(! x($a->page,'aside')) $a->page['aside'] = ''; - $a->page['aside'] .= $o; + $a->page['aside'] .= $vcard_widget; $tpl = get_markup_template("videos_head.tpl"); -- 2.39.5