Display text around the searched query in documentation search

This commit is contained in:
Andrew Manning
2016-08-27 21:26:16 -04:00
parent 381b1a066d
commit 07e28a9757
2 changed files with 10 additions and 4 deletions

View File

@@ -36,8 +36,9 @@ class Help extends \Zotlabs\Web\Controller {
$fname = substr($fname,0,strrpos($fname,'.'));
$path = trim(substr($dirname,4),'/');
$o .= '<li><a href="help/' . (($path) ? $path . '/' : '') . $fname . '" >' . ucwords(str_replace('_',' ',notags($fname))) . '</a><br />' .
str_replace('$Projectname',\Zotlabs\Lib\System::get_platform_name(),substr($rr['text'],0,200)) . '...<br /><br /></li>';
$o .= '<li><a href="help/' . (($path) ? $path . '/' : '') . $fname . '" >' . ucwords(str_replace('_',' ',notags($fname))) . '</a><br />'
. '<b><i>' . 'help/' . (($path) ? $path . '/' : '') . $fname . '</i></b><br />' .
'...' . str_replace('$Projectname',\Zotlabs\Lib\System::get_platform_name(),$rr['text']) . '...<br /><br /></li>';
}
$o .= '</ul>';