From 1ebdfb67833544ae0ea81f74e4a167f907d70e67 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 13 Dec 2016 19:47:06 +0000 Subject: [PATCH 1/3] Update forum_post.php --- e107_plugins/forum/forum_post.php | 33 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 673e2beac..f0ce7d119 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -373,20 +373,23 @@ class forum_post_handler global $FORUMPOST, $subjectbox, $userbox, $poll_form, $fileattach, $fileattach_alert; // needed for BC. - $FORUM_POST_TEMPLATE = array(); - $FORUM_POSTED_TEMPLATE = array(); +//-- $FORUM_POST_TEMPLATE = array(); +//-- $FORUM_POSTED_TEMPLATE = array(); $FORUMREPLYPOSTED = ''; $FORUMTHREADPOSTED = ''; $FORUMPOLLPOSTED = ''; - $file = "forum_".$type."_template.php"; +// $file = "forum_".$type."_template.php"; - if($template = e107::getTemplate('forum', 'forum_post')) +// var_dump ($type); +// var_dump (e107::getTemplate('forum', 'forum_'.$type)); + if($template = e107::getTemplate('forum', 'forum_'.$type)) { - $FORUM_POST_TEMPLATE = $template; +//-- $FORUM_POST_TEMPLATE = $template; } elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED)) { + $file = "forum_".$type."_template.php"; if (is_readable(THEME.$file)) { include_once(THEME.$file); @@ -609,27 +612,29 @@ class forum_post_handler - if($type == 'post') +//-- if($type == 'post' || $type == 'posted') + if($template) { - $template= (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST); +//-- $template= (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST); + $template= (deftrue('BOOTSTRAP')) ? $template : array('form'=>$FORUMPOST); // print_a($template); return $this->upgradeTemplate($template); } else { - if (deftrue('BOOTSTRAP')) //v2.x - { - return $FORUM_POSTED_TEMPLATE; - } - else //v1.x - { +//-- if (deftrue('BOOTSTRAP')) //v2.x +//-- { +//-- return $FORUM_POSTED_TEMPLATE; +//-- } +//-- else //v1.x +//-- { return array( "reply" => $FORUMREPLYPOSTED, "thread" => $FORUMTHREADPOSTED, "poll" => $FORUMPOLLPOSTED ); - } +//-- } } From 2b181665c4fd1209ab1f91d55ed1aab253af1cfb Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 13 Dec 2016 20:16:30 +0000 Subject: [PATCH 2/3] Update forum_post.php --- e107_plugins/forum/forum_post.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index f0ce7d119..dfcd3faf0 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -383,11 +383,13 @@ class forum_post_handler // var_dump ($type); // var_dump (e107::getTemplate('forum', 'forum_'.$type)); - if($template = e107::getTemplate('forum', 'forum_'.$type)) - { + $template = e107::getTemplate('forum', 'forum_'.$type); +//-- if($template = e107::getTemplate('forum', 'forum_'.$type)) +//-- { //-- $FORUM_POST_TEMPLATE = $template; - } - elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED)) +//-- } +//-- elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED)) + if (empty($template) && empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED)) { $file = "forum_".$type."_template.php"; if (is_readable(THEME.$file)) From 322a23e4b0bfc478358119da3e3fc20134276b87 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Tue, 13 Dec 2016 20:20:17 +0000 Subject: [PATCH 3/3] Update forum_post.php --- e107_plugins/forum/forum_post.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index dfcd3faf0..3711c2482 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -622,8 +622,8 @@ class forum_post_handler // print_a($template); return $this->upgradeTemplate($template); } - else - { +//-- else +//-- { //-- if (deftrue('BOOTSTRAP')) //v2.x //-- { //-- return $FORUM_POSTED_TEMPLATE; @@ -635,14 +635,8 @@ class forum_post_handler "thread" => $FORUMTHREADPOSTED, "poll" => $FORUMPOLLPOSTED ); - //-- } - - - } - - - +//-- } }