1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

forum last thread additional fix, better (but still not perfect) forum mod message render

This commit is contained in:
secretr
2011-06-28 12:14:45 +00:00
parent a21c53c9c7
commit 2e2bd7819b
2 changed files with 10 additions and 3 deletions

View File

@@ -109,9 +109,12 @@ if(varset($pref['track_online']))
require_once(HEADERF); require_once(HEADERF);
$text=''; $text='';
// TODO - message batch shortcode
if ($message) if ($message)
{ {
$ns->tablerender('', $message, array('forum_viewforum', 'msg')); //$ns->tablerender('', $message, array('forum_viewforum', 'msg'));
//e107::getMessage()->add($thread->message);
$fVars->MESSAGE = $message;
} }
$threadCount = $forumInfo['forum_threads']; $threadCount = $forumInfo['forum_threads'];

View File

@@ -105,12 +105,14 @@ if (MODERATOR && isset($_POST['mod']))
$thread->threadInfo = $forum->threadGet($thread->threadId); $thread->threadInfo = $forum->threadGet($thread->threadId);
} }
$postList = $forum->PostGet($thread->threadId, ($thread->page - 1) * $thread->perPage, $thread->perPage); $num = $thread->page ? $thread->page - 1 : 0;
$postList = $forum->PostGet($thread->threadId, $num * $thread->perPage, $thread->perPage);
$gen = new convert; $gen = new convert;
if ($thread->message) if ($thread->message)
{ {
$ns->tablerender('', $thread->message, array('forum_viewtopic', 'msg')); //$ns->tablerender('', $thread->message, array('forum_viewtopic', 'msg'));
e107::getMessage()->add($thread->message);
} }
if (isset($thread->threadInfo['thread_options']['poll'])) if (isset($thread->threadInfo['thread_options']['poll']))
@@ -210,6 +212,8 @@ $tVars->POLL = $pollstr;
$tVars->FORUMJUMP = forumjump(); $tVars->FORUMJUMP = forumjump();
$tVars->MESSAGE = $thread->message;
$forstr = $tp->simpleParse($FORUMSTART, $tVars); $forstr = $tp->simpleParse($FORUMSTART, $tVars);
unset($forrep); unset($forrep);