1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-13 17:09:46 +01:00

More Forum template work.

This commit is contained in:
Cameron 2013-03-13 02:57:31 -07:00
parent e80c329818
commit b864c192e1
3 changed files with 15 additions and 18 deletions

View File

@ -145,7 +145,7 @@ class e107forum
// $sc->setScVar('postInfo', $postInfo);
// $ret['html'] = $tp->parseTemplate($tmpl, true, vartrue($forum_shortcodes)) . "\n";
$ret['html'] = "<tr><td>".$tp->toHtml($_POST['text'])."</td></tr>";
$ret['html'] = "<tr><td>Help! I can't pass the template!</td><td colspan='2'>".$tp->toHtml($_POST['text'])."</td></tr>";
$this->postAdd($postInfo); // save it.
$ret['status'] = 'ok';
$ret['msg'] = print_r($postInfo,true); // "You post has been added";

View File

@ -213,6 +213,8 @@ if ($thread->pages > 1)
if(!$thread->page) $thread->page = 1;
$url = rawurlencode(e107::getUrl()->create('forum/thread/view', array('name' => $thread->threadInfo['thread_name'], 'id' => $thread->threadId, 'page' => '[FROM]')));
$parms = "total={$thread->pages}&type=page&current={$thread->page}&url=".$url."&caption=off";
//XXX FIXME - pull-down template not practical here. Can we force another?
$tVars->GOTOPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}");
/*
$parms = ($thread->pages).",1,{$thread->page},url::forum::thread::func=view&id={$thread->threadId}&page=[FROM],off";
@ -349,14 +351,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
{
$tVars->QUICKREPLY = "
<form action='" . $e107->url->create('forum/thread/reply', array('id' => $thread->threadId)) . "' method='post'>
<p>" . LAN_393 . ":<br />
<textarea cols='80' rows='4' id='forum-quickreply-text' class='tbox input-xxlarge' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
<br />
<input type='submit' name='fpreview' value='" . LAN_394 . "' class='btn button' /> &nbsp;
<textarea cols='80' placeholder=\"Post a quick reply\" rows='4' id='forum-quickreply-text' class='tbox input-xxlarge' name='post' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea>
<div class='center'>
<input type='submit' data-forum-post='".$thread->threadInfo['thread_forum_id']."' data-forum-thread='".$threadId."' data-forum-action='quickreply' name='reply' value='" . LAN_395 . "' class='btn btn-success button' />
<input type='hidden' name='thread_id' value='$thread_parent' />
</p>
</div>
</form>";
// Preview should be reserved for the full 'Post reply' page. <input type='submit' name='fpreview' value='" . LAN_394 . "' class='btn button' /> &nbsp;
}
else
{

View File

@ -334,18 +334,13 @@ $FORUM_VIEWTOPIC_TEMPLATE['start'] = "<a id='top'></a>
$FORUM_VIEWTOPIC_TEMPLATE['end'] = "</tr></table>
<div class='center'>{QUICKREPLY}</div>
<table class='table'>
<tr>
<td style='width:80%'>{GOTOPAGES}
</td>
<td style='width:20%; text-align: right; white-space: nowrap'>
{BUTTONSX}
</td>
</tr>
</table>
<div class='row clearfix'>
<div class='span3 pull-left'>{GOTOPAGES}</div>
<div class='span6 center'>{QUICKREPLY}</div>
<div class='span3 pull-right right '>{BUTTONSX}</div>
</div>
</div>
";