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

Forum: Fix wrapper styling. More work on experimental 'split' function.

This commit is contained in:
Cameron
2016-05-04 09:13:46 -07:00
parent 8dbe69c291
commit 1ad918eb65
4 changed files with 60 additions and 29 deletions

View File

@@ -675,7 +675,7 @@ class forum_post_handler
$frm = e107::getForm();
$sql = e107::getDb();
$tp = e107::getParser();
$ns = e107::getRender();
@@ -1308,7 +1308,7 @@ class forum_post_handler
function splitThread($post)
private function splitThread($post)
{
if(!deftrue('MODERATOR'))
{
@@ -1325,11 +1325,19 @@ class forum_post_handler
$threadInfo['thread_user'] = $this->data['post_user'];
print_a($this->data);
// print_a($this->data);
if($ret = $this->forumObj->threadAdd($threadInfo, false))
{
e107::getMessage()->addSuccess("Created new thread #".$ret['threadid']);
$urlInfo = $threadInfo;
$urlInfo['thread_sef'] = $ret['threadsef'];
$urlInfo['thread_id'] = $ret['threadid'];
$urlInfo['forum_sef'] = $this->forumObj->getForumSef($threadInfo);
$newUrl = e107::url('forum','topic', $urlInfo);
e107::getMessage()->addSuccess("Created new thread <a class='alert-link' href='".$newUrl."'>#".$ret['threadid']."</a>");
$update = array(
'post_thread' => $ret['threadid'],
'post_forum' => $threadInfo['thread_forum_id'],
@@ -1372,6 +1380,13 @@ class forum_post_handler
}
}
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($this->data))->setVars($this->data);
$text = e107::getParser()->parseTemplate("<div class='row-fluid'><div>{FORUM_POST_BREADCRUMB}</div></div>",true,$sc);
$text .= e107::getMessage()->render();
e107::getRender()->tablerender(LAN_FORUM_3052, $text);
}