]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Some more Microformats2 data for notices and rendering
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 2 Mar 2016 12:29:54 +0000 (13:29 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 2 Mar 2016 12:29:54 +0000 (13:29 +0100)
lib/noticelistitem.php
lib/util.php

index ad5962d75123f9480b8436090f6db7fbee183021..a0dcf6f30c5e218172e33dc3cf697114df6e86b4 100644 (file)
@@ -301,9 +301,15 @@ class NoticeListItem extends Widget
 
         foreach ($attentions as $attn) {
             $class = $attn->isGroup() ? 'group' : 'account';
-            $this->pa[] = array('href' => $attn->profileurl,
+            $profileurl = $attn->getUri();
+            if (common_valid_http_url($profileurl)) {
+                $class .= ' u-uid';
+            } else {
+                $profileurl = $attn->getUrl();
+            }
+            $this->pa[] = array('href' => $profileurl,
                                 'title' => $attn->getNickname(),
-                                'class' => "addressee {$class}",
+                                'class' => "addressee {$class} p-name u-url",
                                 'text' => $attn->getStreamName());
         }
 
index 5aeda6d7509b92a58070a494d702173e6d87bb17..05e3e732bd1ed1469a44d84ca5ed6fd8fdada06e 100644 (file)
@@ -692,7 +692,7 @@ function common_linkify_mention(array $mention)
         $xs = new XMLStringer(false);
 
         $attrs = array('href' => $mention['url'],
-                       'class' => 'h-card '.$mention['type']);
+                       'class' => 'h-card u-url p-nickname '.$mention['type']);
 
         if (!empty($mention['title'])) {
             $attrs['title'] = $mention['title'];