From 023d0f60475b58729fd0ad40abfe12a37ea70fc4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 2 Jun 2013 16:16:38 -0700 Subject: [PATCH] Issue #371 - forum template parsing issue. --- e107_plugins/forum/forum_post.php | 4 ++-- e107_plugins/forum/forum_viewtopic.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 3ff797b33..7e3929828 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -81,7 +81,7 @@ define('MODERATOR', USER && $forum->isModerator(USERID)); require_once(e_HANDLER.'ren_help.php'); //e107::getScBatch('view', 'forum'); //XXX FIXME Conflicting shortcode names. Find a solution without renaming them. -e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', vartrue($threadInfo)); +$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', vartrue($threadInfo)); $gen = new convert; $fp = new floodprotect; @@ -520,7 +520,7 @@ if($action == 'rp') $FORUMPOST = $FORUMPOST_REPLY; } e107::lan('forum','English_front'); -$text = $tp->parseTemplate($FORUMPOST, true); +$text = $tp->parseTemplate($FORUMPOST, true, $sc); // ------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index faf069447..df08e80d4 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -358,13 +358,13 @@ foreach ($postList as $postInfo) $_style = (isset($FORUMREPLYSTYLE_ALT) && $alt ? $FORUMREPLYSTYLE_ALT : $FORUMREPLYSTYLE); } - e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo); + $forum_shortcodes = e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo); $forrep .= $tp->parseTemplate($_style, true, $forum_shortcodes) . "\n"; } else { $postInfo['thread_start'] = true; - e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo); + $forum_shortcodes = e107::getScBatch('view', 'forum')->setScVar('postInfo', $postInfo); $forthr = $tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($forum_shortcodes)) . "\n"; } }