Merge pull request #366 from beardy-unixer/master
Stick help in a template
This commit is contained in:
commit
b2e831ce98
10
mod/help.php
10
mod/help.php
@ -76,14 +76,18 @@ function help_content(&$a) {
|
|||||||
$text = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $text);
|
$text = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $text);
|
||||||
|
|
||||||
if($doctype === 'html')
|
if($doctype === 'html')
|
||||||
return $text;
|
$content = $text;
|
||||||
if($doctype === 'markdown')
|
if($doctype === 'markdown')
|
||||||
return Markdown($text);
|
$content = Markdown($text);
|
||||||
if($doctype === 'bbcode') {
|
if($doctype === 'bbcode') {
|
||||||
require_once('include/bbcode.php');
|
require_once('include/bbcode.php');
|
||||||
return bbcode($text);
|
$content = bbcode($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return replace_macros(get_markup_template("help.tpl"), array(
|
||||||
|
'$content' => $content
|
||||||
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
3
view/tpl/help.tpl
Normal file
3
view/tpl/help.tpl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<div id = "help-content" class="generic-content-wrapper">
|
||||||
|
{{$content}}
|
||||||
|
</div>
|
Reference in New Issue
Block a user