mirror of
https://github.com/e107inc/e107.git
synced 2025-08-21 05:41:58 +02:00
Merge pull request #2079 from rica-carv/rica-carv-forum_post
Enable forum_post custom caption
This commit is contained in:
@@ -865,6 +865,11 @@ class forum_post_handler
|
|||||||
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($data))->setVars($data);
|
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($data))->setVars($data);
|
||||||
$text = e107::getParser()->parseTemplate($template['form'], true, $sc);
|
$text = e107::getParser()->parseTemplate($template['form'], true, $sc);
|
||||||
|
|
||||||
|
if(!empty($template['caption']))
|
||||||
|
{
|
||||||
|
$this->forumObj->prefs->set('title', e107::getParser()->parseTemplate($template['caption'], true, $sc));
|
||||||
|
}
|
||||||
|
|
||||||
$this->render($text);
|
$this->render($text);
|
||||||
|
|
||||||
if(empty($data))
|
if(empty($data))
|
||||||
|
@@ -12,6 +12,7 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
|
|
||||||
// New in v2.x - requires a bootstrap theme be loaded.
|
// New in v2.x - requires a bootstrap theme be loaded.
|
||||||
|
|
||||||
|
//$FORUM_POST_TEMPLATE['caption'] = "Custom caption";
|
||||||
$FORUM_POST_TEMPLATE['form'] = "
|
$FORUM_POST_TEMPLATE['form'] = "
|
||||||
{FORUM_POST_FORM_START}
|
{FORUM_POST_FORM_START}
|
||||||
<div class='row-fluid'>
|
<div class='row-fluid'>
|
||||||
|
Reference in New Issue
Block a user