]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
generate an etag for shownotice
[quix0rs-gnu-social.git] / actions / showstream.php
index 3b8f71114954f69090156792eba53951d8aa4827..031b3ec84f4c7f26d16a671648136a5c1232ddd2 100644 (file)
@@ -136,6 +136,11 @@ class ShowstreamAction extends StreamAction {
                                                                                 'content' => "xmpp+http:sha1:" . sha1(sha1('xmpp:' . $user->jabber) . sha1($profile->profileurl))));
                }
 
+               # See https://wiki.mozilla.org/Microsummaries
+               
+               common_element('link', array('rel' => 'microsummary',
+                                                                        'href' => common_local_url('microsummary',
+                                                                                                                               array('nickname' => $profile->nickname))));
        }
 
        function no_such_user() {
@@ -174,9 +179,9 @@ class ShowstreamAction extends StreamAction {
                if ($cur) {
                        if ($cur->id != $profile->id) {
                                if ($cur->isSubscribed($profile)) {
-                                       $this->show_unsubscribe_form($profile);
+                                       common_unsubscribe_form($profile);
                                } else {
-                                       $this->show_subscribe_form($profile);
+                                       common_subscribe_form($profile);
                                }
                        }
                } else {
@@ -185,19 +190,9 @@ class ShowstreamAction extends StreamAction {
         common_element_end('li');
                
                $user = User::staticGet('id', $profile->id);
-               
-               if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) {
-            common_element_start('li', array('id' => 'profile_send_a_new_message'));
-                       common_element('a', array('href' => common_local_url('newmessage', array('to' => $user->id))),
-                                                  _('Send a message'));
-            common_element_end('li');
-            if ($user->email && $user->emailnotifynudge) {
-                common_element_start('li', array('id' => 'profile_nudge'));
-                common_nudge_form($user);
-                common_element_end('li');
-            }
-               }
-        common_element_end('ul');
+               common_profile_new_message_nudge($cur, $user, $profile);
+        
+               common_element_end('ul');
                
                common_element_end('div');
 
@@ -229,20 +224,6 @@ class ShowstreamAction extends StreamAction {
                common_element_end('div');
        }
 
-       function show_subscribe_form($profile) {
-               common_element_start('form', array('id' => 'subscribe', 'method' => 'post',
-                                                                                  'action' => common_local_url('subscribe')));
-               common_hidden('token', common_session_token());
-               common_element('input', array('id' => 'subscribeto',
-                                                                         'name' => 'subscribeto',
-                                                                         'type' => 'hidden',
-                                                                         'value' => $profile->nickname));
-               common_element('input', array('type' => 'submit',
-                                                                         'class' => 'submit',
-                                                                         'value' => _('Subscribe')));
-               common_element_end('form');
-       }
-
        function show_remote_subscribe_link($profile) {
                $url = common_local_url('remotesubscribe',
                                        array('nickname' => $profile->nickname));
@@ -375,6 +356,23 @@ class ShowstreamAction extends StreamAction {
                common_element('dd', 'subscribers', (is_int($subbed_count)) ? $subbed_count : '0');
                common_element('dt', 'notices', _('Notices'));
                common_element('dd', 'notices', (is_int($notice_count)) ? $notice_count : '0');
+               # XXX: link these to something
+               common_element('dt', 'tags', _('Tags'));
+               common_element_start('dd', 'tags');
+               $tags = Profile_tag::getTags($profile->id, $profile->id);
+
+               common_element_start('ul', 'tags xoxo');
+               foreach ($tags as $tag) {
+                       common_element_start('li');
+                       common_element('a', array('rel' => 'bookmark tag',
+                                                                         'href' => common_local_url('peopletag',
+                                                                                                                                array('tag' => $tag))),
+                                                  $tag);
+                       common_element_end('li');
+               }
+               common_element_end('ul');
+           common_element_end('dd');
+       
                common_element_end('dl');
 
                common_element_end('div');