diff options
Diffstat (limited to 'mod/help.php')
-rw-r--r-- | mod/help.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mod/help.php b/mod/help.php index c4549a2bd..19bf251bd 100644 --- a/mod/help.php +++ b/mod/help.php @@ -145,7 +145,10 @@ function help_content(&$a) { if($_REQUEST['search']) { $o .= '<div id="help-content" class="generic-content-wrapper">'; + $o .= '<div class="section-title-wrapper">'; $o .= '<h2>' . t('Documentation Search') . ' - ' . htmlspecialchars($_REQUEST['search']) . '</h2>'; + $o .= '</div>'; + $o .= '<div class="section-content-wrapper">'; $r = search_doc_files($_REQUEST['search']); if($r) { @@ -157,11 +160,12 @@ function help_content(&$a) { $path = trim(substr($dirname,4),'/'); $o .= '<li><a href="help/' . (($path) ? $path . '/' : '') . $fname . '" >' . ucwords(str_replace('_',' ',notags($fname))) . '</a><br />' . - str_replace('$Projectname',PLATFORM_NAME,substr($rr['text'],0,200)) . '...<br /><br /></li>'; + str_replace('$Projectname',Zotlabs\Project\System::get_platform_name(),substr($rr['text'],0,200)) . '...<br /><br /></li>'; } $o .= '</ul>'; $o .= '</div>'; + $o .= '</div>'; } return $o; } @@ -229,6 +233,8 @@ function help_content(&$a) { if($doctype === 'bbcode') { require_once('include/bbcode.php'); $content = bbcode($text); + // bbcode retargets external content to new windows. This content is internal. + $content = str_replace(' target="_blank"','',$content); } $content = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $content); @@ -248,7 +254,9 @@ function preg_callback_help_include($matches) { if(preg_match('/\.bb$/', $matches[1]) || preg_match('/\.txt$/', $matches[1])) { require_once('include/bbcode.php'); $include = bbcode($include); - } elseif(preg_match('/\.md$/', $matches[1])) { + $include = str_replace(' target="_blank"','',$include); + } + elseif(preg_match('/\.md$/', $matches[1])) { require_once('library/markdown.php'); $include = Markdown($include); } |