]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/userprofile.php
remove extraneous <dl> and <dt> tags
[quix0rs-gnu-social.git] / lib / userprofile.php
index 2813f735eabad3efc1b2cebabfcc44cda81921b0..71b54682af661eae068b43346b7c81c46473f219 100644 (file)
@@ -103,26 +103,21 @@ class UserProfile extends Widget
                 $avatar = $this->profile->getAvatar(73);
             }
 
-            $this->out->elementStart('dl', 'entity_depiction');
-            $this->out->element('dt', null, _('Photo'));
-            $this->out->elementStart('dd');
-            $this->out->element('img', array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE),
-                                        'class' => 'photo avatar',
-                                        'width' => AVATAR_PROFILE_SIZE,
-                                        'height' => AVATAR_PROFILE_SIZE,
-                                        'alt' => $this->profile->nickname));
-            $this->out->elementEnd('dd');
-
+            $this->out->element('img', 
+                                array('src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE),
+                                      'class' => 'photo avatar entity_depiction',
+                                      'width' => AVATAR_PROFILE_SIZE,
+                                      'height' => AVATAR_PROFILE_SIZE,
+                                      'alt' => $this->profile->nickname));
+            
             $cur = common_current_user();
+
             if ($cur && $cur->id == $this->profile->id) {
-                $this->out->elementStart('dd');
                 $this->out->element('a', array('href' => common_local_url('avatarsettings')), _('Edit Avatar'));
-                $this->out->elementEnd('dd');
             }
 
-            $this->out->elementEnd('dl');
-
-            Event::handle('EndProfilePageAvatar', array($this->out, $this->profile));
+            Event::handle('EndProfilePageAvatar',
+                          array($this->out, $this->profile));
         }
     }
 
@@ -130,15 +125,12 @@ class UserProfile extends Widget
     {
         if (Event::handle('StartProfilePageNickname', array($this->out, $this->profile))) {
 
-            $this->out->elementStart('dl', 'entity_nickname');
-            $this->out->element('dt', null, _('Nickname'));
-            $this->out->elementStart('dd');
-            $hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid';
-            $this->out->element('a', array('href' => $this->profile->profileurl,
-                                      'rel' => 'me', 'class' => $hasFN),
+            $hasFN = ($this->profile->fullname) ? 'entity_nickname nickname url uid' : 'entity_nickname fn nickname url uid';
+            $this->out->element('a',
+                                array('href' => $this->profile->profileurl,
+                                      'rel' => 'me',
+                                      'class' => $hasFN),
                            $this->profile->nickname);
-            $this->out->elementEnd('dd');
-            $this->out->elementEnd('dl');
 
             Event::handle('EndProfilePageNickname', array($this->out, $this->profile));
         }
@@ -148,12 +140,9 @@ class UserProfile extends Widget
     {
         if (Event::handle('StartProfilePageFullName', array($this->out, $this->profile))) {
             if ($this->profile->fullname) {
-                $this->out->elementStart('dl', 'entity_fn');
-                $this->out->element('dt', null, _('Full name'));
-                $this->out->elementStart('dd');
-                $this->out->element('span', 'fn', $this->profile->fullname);
-                $this->out->elementEnd('dd');
-                $this->out->elementEnd('dl');
+                $this->out->element('span',
+                                    'entity_fn fn',
+                                    $this->profile->fullname);
             }
             Event::handle('EndProfilePageFullName', array($this->out, $this->profile));
         }
@@ -163,10 +152,9 @@ class UserProfile extends Widget
     {
         if (Event::handle('StartProfilePageLocation', array($this->out, $this->profile))) {
             if ($this->profile->location) {
-                $this->out->elementStart('dl', 'entity_location');
-                $this->out->element('dt', null, _('Location'));
-                $this->out->element('dd', 'label', $this->profile->location);
-                $this->out->elementEnd('dl');
+                $this->out->element('span',
+                                    'entity_location label',
+                                    $this->profile->location);
             }
             Event::handle('EndProfilePageLocation', array($this->out, $this->profile));
         }
@@ -176,14 +164,11 @@ class UserProfile extends Widget
     {
         if (Event::handle('StartProfilePageHomepage', array($this->out, $this->profile))) {
             if ($this->profile->homepage) {
-                $this->out->elementStart('dl', 'entity_url');
-                $this->out->element('dt', null, _('URL'));
-                $this->out->elementStart('dd');
-                $this->out->element('a', array('href' => $this->profile->homepage,
-                                          'rel' => 'me', 'class' => 'url'),
+                $this->out->element('a',
+                                    array('href' => $this->profile->homepage,
+                                          'rel' => 'me',
+                                          'class' => 'url entity_url'),
                                $this->profile->homepage);
-                $this->out->elementEnd('dd');
-                $this->out->elementEnd('dl');
             }
             Event::handle('EndProfilePageHomepage', array($this->out, $this->profile));
         }
@@ -193,10 +178,9 @@ class UserProfile extends Widget
     {
         if (Event::handle('StartProfilePageBio', array($this->out, $this->profile))) {
             if ($this->profile->bio) {
-                $this->out->elementStart('dl', 'entity_note');
-                $this->out->element('dt', null, _('Note'));
-                $this->out->element('dd', 'note', $this->profile->bio);
-                $this->out->elementEnd('dl');
+                $this->out->element('div',
+                                    'note entity_note',
+                                    $this->profile->bio);
             }
             Event::handle('EndProfilePageBio', array($this->out, $this->profile));
         }
@@ -208,10 +192,7 @@ class UserProfile extends Widget
             $tags = Profile_tag::getTags($this->profile->id, $this->profile->id);
 
             if (count($tags) > 0) {
-                $this->out->elementStart('dl', 'entity_tags');
-                $this->out->element('dt', null, _('Tags'));
-                $this->out->elementStart('dd');
-                $this->out->elementStart('ul', 'tags xoxo');
+                $this->out->elementStart('ul', 'tags xoxo entity_tags');
                 foreach ($tags as $tag) {
                     $this->out->elementStart('li');
                     // Avoid space by using raw output.
@@ -222,8 +203,6 @@ class UserProfile extends Widget
                     $this->out->elementEnd('li');
                 }
                 $this->out->elementEnd('ul');
-                $this->out->elementEnd('dd');
-                $this->out->elementEnd('dl');
             }
             Event::handle('EndProfilePageProfileTags', array($this->out, $this->profile));
         }