X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fhelp.php;h=72225692793d5206d412d9e2a671f63ded4ab762;hb=09931b71247c2261371a5a40b38a2127f79f344d;hp=ebade07ea77e4cff7f6615a9cf9e198f591e75fe;hpb=7530c950e3cf5379b9d7f675a31833497ae8d576;p=friendica.git diff --git a/mod/help.php b/mod/help.php index ebade07ea7..7222569279 100644 --- a/mod/help.php +++ b/mod/help.php @@ -28,19 +28,22 @@ function help_content(&$a) { if ($a->argc > 1) { $path = ''; + // looping through the argv keys bigger than 0 to build + // a path relative to /help for($x = 1; $x < argc(); $x ++) { if(strlen($path)) $path .= '/'; $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); @@ -55,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="