1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Various forum problems:

- nextprev new parameters usage
- outdate forum code cleanup (preventing sc parsing)
- forum preferences fixes (maybe more to do)
This commit is contained in:
secretr
2011-04-21 13:20:22 +00:00
parent 58a8ac844e
commit ec1eeac94d
7 changed files with 34 additions and 19 deletions

View File

@@ -15,7 +15,9 @@
require_once ('../../class2.php');
$e107 = e107::getInstance();
if (!$e107->isInstalled('forum'))
$tp = e107::getParser();
if (!$e107->isInstalled('forum'))
{
header('Location: '.e_BASE.'index.php');
exit;
@@ -178,8 +180,13 @@ $tVars->THREADSTATUS = (!$thread->threadInfo['thread_active'] ? LAN_66 : '');
if ($thread->pages > 1)
{
$parms = ($thread->pages).",1,{$thread->page},url::forum::thread::func=view&id={$thread->threadId}&page=[FROM],off";
if(!$thread->page) $thread->page = 1;
$url = rawurlencode(e107::getUrl()->getUrl('forum', 'thread', array('func' => 'view', 'id' => $thread->threadId, 'page' => '[FROM]')));
$parms = "total={$thread->pages}&type=page&current={$thread->page}&url=".$url."&caption=off";
$tVars->GOTOPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}");
/*
$parms = ($thread->pages).",1,{$thread->page},url::forum::thread::func=view&id={$thread->threadId}&page=[FROM],off";
$tVars->GOTOPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}");*/
}
$tVars->BUTTONS = '';