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");