From f841c1785b7fe4f43238300db70035541c5203fd Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 29 Nov 2016 17:18:18 +0000 Subject: [PATCH 1/3] Enable forum_post custom caption Enable forum_post custom caption --- e107_plugins/forum/forum_post.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index c0147be3f..e8e413ef3 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -859,6 +859,11 @@ class forum_post_handler $sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($data))->setVars($data); $text = e107::getParser()->parseTemplate($template['form'], true, $sc); + if(!empty($template['caption'])) + { + $this->forumObj->prefs->set('title', $template['caption']); + } + $this->render($text); if(empty($data)) From a7400ba51609373be7993fc91807ba46bd635de4 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 29 Nov 2016 17:19:25 +0000 Subject: [PATCH 2/3] Update forum_post_template.php --- e107_plugins/forum/templates/forum_post_template.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_plugins/forum/templates/forum_post_template.php b/e107_plugins/forum/templates/forum_post_template.php index f5e4838a5..b74f6b10f 100644 --- a/e107_plugins/forum/templates/forum_post_template.php +++ b/e107_plugins/forum/templates/forum_post_template.php @@ -12,6 +12,7 @@ if (!defined('e107_INIT')) { exit; } // New in v2.x - requires a bootstrap theme be loaded. +//$FORUM_POST_TEMPLATE['caption'] = "Custom caption"; $FORUM_POST_TEMPLATE['form'] = " {FORUM_POST_FORM_START}
From 58009dd3c54c353808d55617506a7177e52fbfd6 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 29 Nov 2016 17:25:15 +0000 Subject: [PATCH 3/3] Update forum_post.php --- e107_plugins/forum/forum_post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index e8e413ef3..4147248d3 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -861,7 +861,7 @@ class forum_post_handler if(!empty($template['caption'])) { - $this->forumObj->prefs->set('title', $template['caption']); + $this->forumObj->prefs->set('title', e107::getParser()->parseTemplate($template['caption'], true, $sc)); } $this->render($text);