]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilelist.php
Merge branch 'master' of gitorious.org:social/mainline
[quix0rs-gnu-social.git] / lib / profilelist.php
index 63ace5c6e3cc2b5ec261a352b79e7c0ec3530077..767e12bc25a7dbc2360bd65d1bddd270fd919989 100644 (file)
@@ -74,7 +74,7 @@ class ProfileList extends Widget
 
     function startList()
     {
-        $this->out->elementStart('ul', 'profiles xoxo');
+        $this->out->elementStart('ul', 'profile_list xoxo');
     }
 
     function endList()
@@ -142,7 +142,7 @@ class ProfileListItem extends Widget
 
     function startItem()
     {
-        $this->out->elementStart('li', array('class' => 'profile h-entry',
+        $this->out->elementStart('li', array('class' => 'profile',
                                              'id' => 'profile-' . $this->profile->id));
     }
 
@@ -153,10 +153,14 @@ class ProfileListItem extends Widget
             if (Event::handle('StartProfileListItemAvatar', array($this))) {
                 $aAttrs = $this->linkAttributes();
                 $this->out->elementStart('a', $aAttrs);
-                $this->showAvatar();
+                $this->showAvatar($this->profile);
                 $this->out->elementEnd('a');
                 Event::handle('EndProfileListItemAvatar', array($this));
             }
+            if (Event::handle('StartProfileListItemNickname', array($this))) {
+                $this->showNickname();
+                Event::handle('EndProfileListItemNickname', array($this));
+            }
             if (Event::handle('StartProfileListItemFullName', array($this))) {
                 $this->showFullName();
                 Event::handle('EndProfileListItemFullName', array($this));
@@ -187,23 +191,24 @@ class ProfileListItem extends Widget
         $this->out->elementStart('div', 'entity_profile h-card');
     }
 
+    function showNickname()
+    {
+        $this->out->element('a', array('href'=>$this->profile->getUrl(),
+                                       'class'=>'p-nickname'),
+                            $this->profile->getNickname());
+    }
+
     function showFullName()
     {
         if (!empty($this->profile->fullname)) {
-            $this->out->text(' ');
-            $this->out->elementStart('span', 'p-name');
-            $this->out->raw($this->highlight($this->profile->fullname));
-            $this->out->elementEnd('span');
+            $this->out->element('span', 'p-name', $this->profile->fullname);
         }
     }
 
     function showLocation()
     {
         if (!empty($this->profile->location)) {
-            $this->out->text(' ');
-            $this->out->elementStart('span', 'label');
-            $this->out->raw($this->highlight($this->profile->location));
-            $this->out->elementEnd('span');
+            $this->out->element('span', 'label p-locality', $this->profile->location);
         }
     }