From c25ef1d9a86193eb5b96484d9bfaae0bd4166653 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 26 Mar 2016 14:31:41 -0400 Subject: Search docs/context/ hierarchically for help.html files to reduce redundancy --- doc/context/channel/help.html | 20 ++++++++++++++++++++ doc/context/mail/combined/help.html | 10 ---------- doc/context/mail/inbox/help.html | 10 ---------- doc/context/mail/new/help.html | 10 ---------- doc/context/mail/outbox/help.html | 10 ---------- include/nav.php | 9 +++++++-- 6 files changed, 27 insertions(+), 42 deletions(-) create mode 100644 doc/context/channel/help.html delete mode 100644 doc/context/mail/combined/help.html delete mode 100644 doc/context/mail/inbox/help.html delete mode 100644 doc/context/mail/new/help.html delete mode 100644 doc/context/mail/outbox/help.html diff --git a/doc/context/channel/help.html b/doc/context/channel/help.html new file mode 100644 index 000000000..8c3d1e422 --- /dev/null +++ b/doc/context/channel/help.html @@ -0,0 +1,20 @@ + +
+
General
+
This is the home page of a channel. It is similar to someone's "wall" in a social network context.
+
\ No newline at end of file diff --git a/doc/context/mail/combined/help.html b/doc/context/mail/combined/help.html deleted file mode 100644 index a2361a135..000000000 --- a/doc/context/mail/combined/help.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
General
-
The messages displayed in private mail are visible only to you and the single recipient.
-
Combined View
-
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
-
Inbox/Outbox
-
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
-
New Message
-
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
-
\ No newline at end of file diff --git a/doc/context/mail/inbox/help.html b/doc/context/mail/inbox/help.html deleted file mode 100644 index a2361a135..000000000 --- a/doc/context/mail/inbox/help.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
General
-
The messages displayed in private mail are visible only to you and the single recipient.
-
Combined View
-
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
-
Inbox/Outbox
-
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
-
New Message
-
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
-
\ No newline at end of file diff --git a/doc/context/mail/new/help.html b/doc/context/mail/new/help.html deleted file mode 100644 index a2361a135..000000000 --- a/doc/context/mail/new/help.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
General
-
The messages displayed in private mail are visible only to you and the single recipient.
-
Combined View
-
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
-
Inbox/Outbox
-
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
-
New Message
-
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
-
\ No newline at end of file diff --git a/doc/context/mail/outbox/help.html b/doc/context/mail/outbox/help.html deleted file mode 100644 index a2361a135..000000000 --- a/doc/context/mail/outbox/help.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
General
-
The messages displayed in private mail are visible only to you and the single recipient.
-
Combined View
-
Complete conversations can be viewed in a continuous thread by selecting Combined View. Available conversations are displayed beneath the menu in the side panel.
-
Inbox/Outbox
-
Individual sent messages are viewed by selecting Outbox, and incoming messages are viewed using the Inbox filter.
-
New Message
-
Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message if they have not already read it.
-
\ No newline at end of file diff --git a/include/nav.php b/include/nav.php index c7483deef..d449718b8 100644 --- a/include/nav.php +++ b/include/nav.php @@ -154,8 +154,13 @@ EOT; if(! get_config('system','hide_help')) { require_once('mod/help.php'); $context_help = load_doc_file('doc/context/' . $a->cmd . '/help.html'); - if (! $context_help) { - $context_help = ''; + $parentdir = dirname($a->cmd); + while (! $context_help && $parentdir !== '.') { + $context_help = load_doc_file('doc/context/' . $parentdir . '/help.html'); + $parentdir = dirname($parentdir); + } + if (! $context_help ) { + $context_help = ''; } $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn',$context_help); } -- cgit v1.2.3