]> git.mxchange.org Git - friendica.git/blobdiff - mod/viewcontacts.php
multi-user, do not cache open mbox
[friendica.git] / mod / viewcontacts.php
index 2517298177b157bdc7a2962f1e6478988a89bf18..063637bf9e2d26e8d98e9f606a4ba801842c2e2c 100644 (file)
@@ -2,7 +2,6 @@
 
 function viewcontacts_init(&$a) {
 
-       require_once("mod/profile.php");
        profile_load($a,$a->argv[1]);
 
 }
@@ -34,7 +33,7 @@ function viewcontacts_content(&$a) {
                return $o;
        }
 
-       $tpl = file_get_contents("view/viewcontact_template.tpl");
+       $tpl = load_view_file("view/viewcontact_template.tpl");
 
        foreach($r as $rr) {
                if($rr['self'])
@@ -42,9 +41,10 @@ function viewcontacts_content(&$a) {
 
                $o .= replace_macros($tpl, array(
                        '$id' => $rr['id'],
-                       '$alt_text' => t('Visit ') . $rr['name'] . t('\'s profile'),
+                       '$alt_text' => t('Visit $username\'s profile'),
                        '$thumb' => $rr['thumb'], 
-                       '$name' => $rr['name'],
+                       '$name' => substr($rr['name'],0,20),
+                       '$username' => $rr['name'],
                        '$url' => $rr['url'] 
                ));
        }