1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Issue #371 - forum template parsing issue.

This commit is contained in:
Cameron
2013-06-02 16:16:38 -07:00
parent 2d8ba837af
commit 023d0f6047
2 changed files with 4 additions and 4 deletions

View File

@@ -81,7 +81,7 @@ define('MODERATOR', USER && $forum->isModerator(USERID));
require_once(e_HANDLER.'ren_help.php'); require_once(e_HANDLER.'ren_help.php');
//e107::getScBatch('view', 'forum'); //XXX FIXME Conflicting shortcode names. Find a solution without renaming them. //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; $gen = new convert;
$fp = new floodprotect; $fp = new floodprotect;
@@ -520,7 +520,7 @@ if($action == 'rp')
$FORUMPOST = $FORUMPOST_REPLY; $FORUMPOST = $FORUMPOST_REPLY;
} }
e107::lan('forum','English_front'); e107::lan('forum','English_front');
$text = $tp->parseTemplate($FORUMPOST, true); $text = $tp->parseTemplate($FORUMPOST, true, $sc);
// ------------------------------------------------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -358,13 +358,13 @@ foreach ($postList as $postInfo)
$_style = (isset($FORUMREPLYSTYLE_ALT) && $alt ? $FORUMREPLYSTYLE_ALT : $FORUMREPLYSTYLE); $_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"; $forrep .= $tp->parseTemplate($_style, true, $forum_shortcodes) . "\n";
} }
else else
{ {
$postInfo['thread_start'] = true; $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"; $forthr = $tp->parseTemplate($FORUMTHREADSTYLE, true, vartrue($forum_shortcodes)) . "\n";
} }
} }