diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index e5fc95adc..eaa10e65c 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -309,28 +309,33 @@ str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_top + if(empty($FORUM_TEMPLATE)) { // include(e_PLUGIN.'forum/templates/forum_template.php'); // Override with theme template - if (file_exists(THEME.'forum_template.php')) //v1.x fallback. + if(THEME_LEGACY !== true) //v2.x + { + $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers. + } + elseif (file_exists(THEME.'forum_template.php')) //v1.x fallback. { include(e_PLUGIN.'forum/templates/forum_template.php'); include_once(THEME.'forum_template.php'); } elseif(file_exists(THEME.'templates/forum/forum_template.php')) { - $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); + // $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); require_once(THEME.'templates/forum/forum_template.php'); } - else //v2.x + else { - $FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers. + require_once(e_PLUGIN.'forum/templates/forum_template.php'); } } -if(is_array($FORUM_TEMPLATE)) // new v2.x format. +if(is_array($FORUM_TEMPLATE) && THEME_LEGACY !== true) // new v2.x format. { if(varset($FORUM_TEMPLATE['main-start'])) // correction of previous v2.x setup. diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 29669b155..93b2a8367 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -131,7 +131,7 @@ $forumInfo = $forum->forumGet($forumId); if (empty($FORUM_VIEW_START)) { - if(deftrue('BOOTSTRAP')) + if(THEME_LEGACY !== true) { $FORUM_VIEWFORUM_TEMPLATE = e107::getTemplate('forum','forum_viewforum'); } @@ -141,11 +141,11 @@ if (empty($FORUM_VIEW_START)) { require_once(THEME.'templates/forum/forum_viewforum_template.php'); } - elseif (file_exists(THEME.'forum_viewforum_template.php')) + elseif (file_exists(THEME.'forum_viewforum_template.php')) //v1.x { require_once(THEME.'forum_viewforum_template.php'); } - elseif (file_exists(THEME.'forum_template.php')) + elseif (file_exists(THEME.'forum_template.php')) //v1.x { require_once(THEME.'forum_template.php'); } @@ -160,7 +160,7 @@ if (empty($FORUM_VIEW_START)) } -if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // New v2.x bootstrap Template. +if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && THEME_LEGACY !== true) // New v2.x bootstrap Template. { $FORUM_VIEW_CAPTION = $FORUM_VIEWFORUM_TEMPLATE['caption']; diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 450746ee3..06d9beca6 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -205,7 +205,7 @@ if(file_exists(THEME.'forum_design.php')) // legacy file // New in v2.x -if(deftrue('BOOTSTRAP',false)) +if(THEME_LEGACY !== true) { $FORUM_VIEWTOPIC_TEMPLATE = e107::getTemplate('forum','forum_viewtopic'); @@ -220,7 +220,7 @@ if(deftrue('BOOTSTRAP',false)) } else { - if (!vartrue($FORUMSTART)) + if (empty($FORUMSTART)) { if(file_exists(THEME.'forum_viewtopic_template.php')) {