]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'dev-0.7.x' into link-rel-paginate
authorMeitar Moscovitz <meitarm@gmail.com>
Mon, 9 Feb 2009 18:05:04 +0000 (05:05 +1100)
committerMeitar Moscovitz <meitarm@gmail.com>
Mon, 9 Feb 2009 18:05:04 +0000 (05:05 +1100)
1  2 
actions/showstream.php
lib/action.php

index 11615ebb0d564265f6e5b563c8f48c1673ea1c3b,962f4b4524f499be25b7e1e403709e7b6ba543b9..0c8fea18218a70f00feb28c75453fa2067b69ca9
@@@ -178,45 -178,23 +178,45 @@@ class ShowstreamAction extends Actio
      function showFeeds()
      {
          $this->element('link', array('rel' => 'alternate',
-                         'type' => 'application/rss+xml',
-                         'href' => common_local_url('userrss',
-                          array('nickname' => $this->user->nickname)),
-                                'title' => sprintf(_('Notice feed for %s (RSS)'),
-                                  $this->user->nickname)));
-          $this->element('link',
-              array('rel' => 'alternate',
-                    'href' => common_local_url('api',
-                      array('apiaction' => 'statuses',
-                            'method' => 'user_timeline.atom',
-                            'argument' => $this->user->nickname)),
-                            'type' => 'application/atom+xml',
-                            'title' => sprintf(_('Notice feed for %s (Atom)'),
-                              $this->user->nickname)));
+                                      'type' => 'application/rss+xml',
+                                      'href' => common_local_url('userrss',
+                                                                 array('nickname' => $this->user->nickname)),
+                                      'title' => sprintf(_('Notice feed for %s (RSS)'),
+                                                         $this->user->nickname)));
+         $this->element('link',
+                        array('rel' => 'alternate',
+                              'href' => common_local_url('api',
+                                                         array('apiaction' => 'statuses',
+                                                               'method' => 'user_timeline.atom',
+                                                               'argument' => $this->user->nickname)),
+                              'type' => 'application/atom+xml',
+                              'title' => sprintf(_('Notice feed for %s (Atom)'),
+                                                 $this->user->nickname)));
      }
  
 +    /**
 +     * Output document relationship links
 +     *
 +     * @return void
 +     */
 +    function showRelationshipLinks()
 +    {
 +        // Machine-readable pagination
 +        if ($this->page > 1) {
 +            $this->element('link', array('rel' => 'next',
 +                                         'href' => common_local_url('showstream',
 +                                                                    array('nickname' => $this->user->nickname,
 +                                                                          'page' => $this->page - 1)),
 +                                         'title' => _('Next Notices')));
 +        }
 +        $this->element('link', array('rel' => 'prev',
 +                                     'href' => common_local_url('showstream',
 +                                                                array('nickname' => $this->user->nickname,
 +                                                                      'page' => $this->page + 1)),
 +                                     'title' => _('Previous Notices')));
 +    }
 +
      function extraHead()
      {
          // FOAF
diff --cc lib/action.php
index ab51d0252ca0800b2317fea17cba893305cfa809,0628dc70db340f1c6457a340e96a71d905661a43..04ee187abd29d2681869b6e7bcec9c4ada23eede
@@@ -180,33 -179,29 +180,42 @@@ class Action extends HTMLOutputter // l
       */
      function showScripts()
      {
-         $this->element('script', array('type' => 'text/javascript',
-                                        'src' => common_path('js/jquery.min.js')),
-                        ' ');
-         $this->element('script', array('type' => 'text/javascript',
-                                        'src' => common_path('js/jquery.form.js')),
-                        ' ');
-         $this->element('script', array('type' => 'text/javascript',
-                                        'src' => common_path('js/xbImportNode.js')),
-                        ' ');
-         $this->element('script', array('type' => 'text/javascript',
-                                        'src' => common_path('js/util.js?version='.LACONICA_VERSION)),
-                        ' ');
+         if (Event::handle('StartShowScripts', array($this))) {
+             if (Event::handle('StartShowJQueryScripts', array($this))) {
+                 $this->element('script', array('type' => 'text/javascript',
+                                                'src' => common_path('js/jquery.min.js')),
+                                ' ');
+                 $this->element('script', array('type' => 'text/javascript',
+                                                'src' => common_path('js/jquery.form.js')),
+                                ' ');
+                 Event::handle('EndShowJQueryScripts', array($this));
+             }
+             if (Event::handle('StartShowLaconicaScripts', array($this))) {
+                 $this->element('script', array('type' => 'text/javascript',
+                                                'src' => common_path('js/xbImportNode.js')),
+                                ' ');
+                 $this->element('script', array('type' => 'text/javascript',
+                                                'src' => common_path('js/util.js?version='.LACONICA_VERSION)),
+                                ' ');
+                 Event::handle('EndShowLaconicaScripts', array($this));
+             }
+             Event::handle('EndShowScripts', array($this));
+         }
      }
  
 +    /**
 +     * Show document relationship links
 +     *
 +     * SHOULD overload
 +     *
 +     * @return nothing
 +     */
 +    function showRelationshipLinks()
 +    {
 +        // output <link> elements with appropriate HTML4.01 link types:
 +        // http://www.w3.org/TR/html401/types.html#type-links
 +    }
 +
      /**
       * Show OpenSearch headers
       *