X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fhelp.php;h=c380aa39138267de91eca27a5c2919e3d5f36fab;hb=9fb4ba2b733d59b8a704cb8df846c3b43769503d;hp=974577876d4c4dc4709ca984f0bcf84934e0b270;hpb=038611bcb46c607851e04dcde813be012db5efb7;p=friendica.git diff --git a/mod/help.php b/mod/help.php index 974577876d..c380aa3913 100644 --- a/mod/help.php +++ b/mod/help.php @@ -18,7 +18,7 @@ if (!function_exists('load_doc_file')) { } -function help_content(&$a) { +function help_content(App $a) { nav_set_selected('help'); @@ -36,13 +36,14 @@ function help_content(&$a) { $path .= argv($x); } $title = basename($path); - + $filename = $path; $text = load_doc_file('doc/' . $path . '.md'); $a->page['title'] = t('Help:') . ' ' . str_replace('-', ' ', notags($title)); } $home = load_doc_file('doc/Home.md'); if (!$text) { $text = $home; + $filename = "Home"; $a->page['title'] = t('Help'); } else { $a->page['aside'] = Markdown($home); @@ -57,7 +58,45 @@ function help_content(&$a) { } $html = Markdown($text); - $html = "".$html; + + if ($filename !== "Home") { + // create TOC but not for home + $lines = explode("\n", $html); + $toc="

TOC