diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index d3c0f8e68..d3af3edc9 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -473,6 +473,10 @@ $i = $thread->page; //---- Moved upwards, to enclose $tVars... //---- $sc = e107::getScBatch('view', 'forum'); + $mes = e107::getMessage(); +// $sc->setVars($thread->threadInfo); +//--->$forend = $tp->simpleParse($FORUMEND, $tVars); +$forend = $tp->parseTemplate($FORUMEND, true, $sc); foreach ($postList as $c => $postInfo) @@ -538,6 +542,7 @@ foreach ($postList as $c => $postInfo) } unset($loop_uid); +/*----> if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread->threadInfo['thread_active']) { //XXX Show only on the last page?? @@ -578,11 +583,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread $tVars->QUICKREPLY = $forum_quickreply; } } +<----*/ - +/*---> $mes = e107::getMessage(); -$forend = $tp->simpleParse($FORUMEND, $tVars); - + $sc->setVars($thread->threadInfo); +//--->$forend = $tp->simpleParse($FORUMEND, $tVars); +$forend = $tp->parseTemplate($FORUMEND, true, $sc); +<---*/ $forumstring = $forstr . $forthr . vartrue($forrep) . $forend; //If last post came after USERLV and not yet marked as read, mark the thread id as read @@ -899,7 +907,7 @@ class e107ForumThread $ns = e107::getRender(); $sql = e107::getDb(); $tp = e107::getParser(); - $frm = e107::getForm(); +//Orphan $frm variable???? $frm = e107::getForm(); if (empty($_GET['f'])) { diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 63044ee45..1031f8720 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -885,5 +885,51 @@ function sc_message() return $thread->message; } + function sc_quickreply() + { + global $forum, $forum_quickreply; + +if ($forum->checkPerm($this->var['thread_forum_id'], 'post') && $this->var['thread_active']) +{ + //XXX Show only on the last page?? + if (!vartrue($forum_quickreply)) + { + $ajaxInsert = ($thread->pages == $thread->page || $thread->pages == 0) ? 1 : 0; + // $ajaxInsert = 1; + // echo "AJAX-INSERT=".$ajaxInsert ."(".$thread->pages." vs ".$thread->page.")"; +//Orphan $frm variable???? $frm = e107::getForm(); + + $urlParms = array('f'=>'rp','id'=>$this->var['thread_id'], 'post'=>$this->var['thread_id']); + $url = e107::url('forum','post', null, array('query'=>$urlParms));; // ."?f=rp&id=".$thread->threadInfo['thread_id']."&post=".$thread->threadInfo['thread_id']; + + return " +
"; + + if(E107_DEBUG_LEVEL > 0) + { + // echo "