]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profilelist.php
Don't log every included config file
[quix0rs-gnu-social.git] / lib / profilelist.php
index 4478a50795bc6765354f5c9a01a6481cd987a90d..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 hentry',
+        $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));
@@ -184,26 +188,27 @@ class ProfileListItem extends Widget
 
     function startProfile()
     {
-        $this->out->elementStart('div', 'entity_profile vcard entry-content');
+        $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', 'fn');
-            $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);
         }
     }
 
@@ -304,13 +309,13 @@ class ProfileListItem extends Widget
     function linkAttributes()
     {
         return array('href' => $this->profile->profileurl,
-                     'class' => 'url entry-title',
+                     'class' => 'u-url',
                      'rel' => 'contact');
     }
 
     function homepageAttributes()
     {
         return array('href' => $this->profile->homepage,
-                     'class' => 'url');
+                     'class' => 'u-url');
     }
 }