]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Move docs menu to site primary menu
authorEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 18:24:27 +0000 (14:24 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 30 Sep 2011 18:24:27 +0000 (14:24 -0400)
actions/doc.php
doc-src/help
doc-src/tags
plugins/OpenID/OpenIDPlugin.php

index 95f76fb9dd94e3cbbe15b066f18e8d6e8d996f29..c26b29090281dcead91b440f4ec3511956daaa17 100644 (file)
@@ -162,4 +162,72 @@ class DocAction extends Action
             Event::handle('EndLoadDoc', array($this->title, &$this->output));
         }
     }
+
+    function showLocalNav()
+    {
+        $menu = new DocNav($this);
+        $menu->show();
+    }
+}
+
+class DocNav extends Menu
+{
+    function show()
+    {
+        $stub = new HomeStubNav($this->action);
+        $this->submenu(_m('MENU','Home'), $stub);
+
+        $docs = new DocListNav($this->action);
+        $this->submenu(_m('MENU','Docs'), $docs);
+    }
+}
+
+class DocListNav extends Menu
+{
+    function getItems()
+    {
+        $items = array();
+
+        if (Event::handle('StartDocsMenu', array(&$items))) {
+
+            $items = array(array('doc',
+                                 array('title' => 'help'),
+                                 _m('MENU', 'Help'),
+                                 _('Getting started'),
+                                 'nav_doc_help'),
+                           array('doc',
+                                 array('title' => 'about'),
+                                 _m('MENU', 'About'),
+                                 _('About this site'),
+                                 'nav_doc_about'),
+                           array('doc',
+                                 array('title' => 'faq'),
+                                 _m('MENU', 'FAQ'),
+                                 _('Frequently asked questions'),
+                                 'nav_doc_faq'),
+                           array('doc',
+                                 array('title' => 'contact'),
+                                 _m('MENU', 'Contact'),
+                                 _('Contact info'),
+                                 'nav_doc_contact'),
+                           array('doc',
+                                 array('title' => 'tags'),
+                                 _m('MENU', 'Tags'),
+                                 _('Using tags'),
+                                 'nav_doc_tags'),
+                           array('doc',
+                                 array('title' => 'groups'),
+                                 _m('MENU', 'Groups'),
+                                 _('Using groups'),
+                                 'nav_doc_groups'),
+                           array('doc',
+                                 array('title' => 'api'),
+                                 _m('MENU', 'API'),
+                                 _('RESTful API'),
+                                 'nav_doc_api'));
+
+            Event::handle('EndDocsMenu', array(&$items));
+        }
+        return $items;
+    }
 }
index 0e39082ad0c77cdb7325a17c80b481ab33ec5e7f..d85a3289004190edf595276fece54e6203579995 100644 (file)
@@ -16,24 +16,3 @@ To subscribe to other people's notifications, go to their profile page
 and click the "subscribe" button. They'll get a notice that you're now
 subscribed to their notifications, and, who knows?, they might subscribe
 back.
-
-More help
----------
-
-Here are some documents that you might find helpful in understanding
-%%site.name%% and how to use it.
-
-* [About](%%doc.about%%) - an overview of the service
-* [FAQ](%%doc.faq%%) - frequently-asked questions about %%site.name%%
-* [Contact](%%doc.contact%%) - who to contact with questions about the service
-* [IM](%%doc.im%%) - using the instant-message (IM) features of %%site.name%%
-* [SMS](%%doc.sms%%) - tying your cellphone to %%site.name%%
-* [Tags](%%doc.tags%%) - different ways to use tagging
-* [Groups](%%doc.groups%%) - joining together in groups
-* [Lists](%%doc.lists%%) - organize your contacts
-* [OpenMicroBlogging](%%doc.openmublog%%) - subscribing to remote users
-* [Privacy](%%doc.privacy%%) - %%site.name%%'s privacy policy
-* [Source](%%doc.source%%) - How to get the StatusNet source code
-* [Badge](%%doc.badge%%) - How to put a StatusNet badge on your blog or homepage
-* [Bookmarklet](%%doc.bookmarklet%%) - Bookmarklet for posting Web pages
-* [API](%%doc.api%%) - API for use by external clients
index 3e9065a100d13611228c1b1f066bb89f78ec317e..82885a9c8dc07b244d5d56b1ec75610e7c982e2d 100644 (file)
@@ -52,10 +52,6 @@ private prepend a '.' to the tag in the tags editing box. To set
 an existing public tag as private or vice-versa, go to the tag's
 edit page.
 
-The most used public tags are displayed in the
-[public people tag cloud](%%action.publicpeopletagcloud%%). Their
-size shows their frequency of use.
-
 Remote people tags
 ------------------
 
index 023ff8e86d2e26c0ce39fee9c792713a5a05aef7..ed6d6534c09dbdaff0ebef609fabd235cee9b628 100644 (file)
@@ -536,15 +536,12 @@ class OpenIDPlugin extends Plugin
      *
      * @return boolean hook value
      */
-    function onEndLoadDoc($title, &$output)
-    {
-        if ($title == 'help') {
-            // TRANS: Item on help page. This message contains Markdown links in the form [description](link).
-            $menuitem = _m('* [OpenID](%%doc.openid%%) - What OpenID is and how to use it with this service.');
-
-            $output .= common_markup_to_html($menuitem);
-        }
-
+    function onEndDocsMenu(&$items) {
+        $items[] = array('doc', 
+                         array('title' => 'openid'),
+                         _m('MENU', 'OpenID'),
+                         _('Logging in with OpenID'),
+                         'nav_doc_openid');
         return true;
     }