diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index d2514d02e..291dac650 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -28,9 +28,11 @@ $sql->db_Mark_Time('(Header Top)'); e107::js('core', 'bootstrap/js/bootstrap-tooltip.js','jquery'); e107::css('core', 'bootstrap/css/tooltip.css','jquery'); -e107::js('core', 'bootstrap-notify/js/bootstrap-notify.js','jquery'); -e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css','jquery'); - +if(deftrue('BOOTSTRAP')) +{ + e107::js('core', 'bootstrap-notify/js/bootstrap-notify.js','jquery'); + e107::css('core', 'bootstrap-notify/css/bootstrap-notify.css','jquery'); +} // ------------------ @@ -182,6 +184,10 @@ if (/*!defined("PREVIEWTHEME") && */! (isset($no_core_css) && $no_core_css !==tr $e_js->otherCSS('{e_WEB_CSS}e107.css'); } +if(!deftrue('BOOTSTRAP')) +{ + $e_js->otherCSS('{e_WEB_CSS}backcompat.css'); +} // re-initalize in case globals are destroyed from $e_headers includes diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 7b25749ec..1e331e2c9 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -26,6 +26,20 @@ if (!$e107->isInstalled('forum')) e107::lan('forum', "front", true); // include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); // using English_front.php now +if(!deftrue('BOOTSTRAP')) +{ + $bcDefs = array( + 'FORLAN_11' => 'LAN_FORUM_0039', + 'FORLAN_12' => 'LAN_FORUM_0040', + 'FORLAN_18' => 'LAN_FORUM_0041', + + + ); + + e107::getLanguage()->bcDefs($bcDefs); +} + + require_once(e_PLUGIN.'forum/forum_class.php'); $forum = new e107forum; diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index abfcdefd2..0a152173f 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -56,9 +56,10 @@ $(document).ready(function() else { var alertType = 'info'; } - + + // http://nijikokun.github.io/bootstrap-notify/ - // fix - only if there + if(jQuery().notify) { $('#uiAlert').notify({ type: alertType, @@ -66,6 +67,12 @@ $(document).ready(function() fadeOut: { enabled: true, delay: 3000 } }).show(); } + else + { + alert(d.msg); + location.reload(); + return; + } // alert(d.msg); @@ -126,6 +133,9 @@ e107::css('forum','forum.css'); e107::lan('forum','English_front'); + + + // include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); if(!defined('IMAGE_new') && !defined('IMAGE_e')) { @@ -155,6 +165,14 @@ class e107forum public function __construct($update= false) { + + if (!empty($_POST['fjsubmit']) && !empty($_POST['forumjump'])) + { + $url = e107::getParser()->filter($_POST['forumjump'],'url'); + e107::getRedirect()->go($_POST['forumjump']); + exit; + } + $this->e107 = e107::getInstance(); $tp = e107::getParser(); $this->userViewed = array(); diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 558879f92..15e69262f 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -92,11 +92,11 @@ class forum_post_handler function checkForumJump() { - if(isset($_POST['fjsubmit'])) + /*if(isset($_POST['fjsubmit'])) { $this->redirect(e107::getUrl()->create('forum/forum/view', array('id'=>(int) $_POST['forumjump']), '', 'full=1&encode=0')); exit; - } + }*/ if (!e_QUERY || empty($_GET['id'])) { diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 35300faa7..f77889337 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -22,15 +22,34 @@ if (!$e107->isInstalled('forum')) } e107::lan('forum', "front", true); //include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php'); // now uses English_front.php + +if(!deftrue('BOOTSTRAP')) +{ + $bcDefs = array( + 'FORLAN_11' => 'LAN_FORUM_0039', + 'FORLAN_12' => 'LAN_FORUM_0040', + 'FORLAN_13' => 'LAN_FORUM_0040', + 'FORLAN_14' => 'LAN_FORUM_0040', + 'FORLAN_16' => 'LAN_FORUM_1012', + 'FORLAN_17' => 'LAN_FORUM_1013', + 'FORLAN_18' => 'LAN_FORUM_1014', + 'LAN_435' => 'LAN_DELETE', + 'LAN_401' => 'LAN_FORUM_4011', + 'LAN_398' => 'LAN_FORUM_4012', + 'LAN_399' => 'LAN_FORUM_4013', + 'LAN_400' => 'LAN_FORUM_4014', + 'LAN_402' => 'LAN_FORUM_5019', + + ); + + e107::getLanguage()->bcDefs($bcDefs); +} + + define('NAVIGATION_ACTIVE','forum'); -if (isset($_POST['fjsubmit'])) -{ - // TODO - load from DB and find forum_name - header('location:'.e107::getUrl()->create('forum/forum/view', array('id'=>(int) $_POST['forumjump']), '', 'full=1&encode=0')); - exit; -} + if (!e_QUERY && empty($_GET)) { @@ -606,7 +625,7 @@ function parse_thread($thread_info) ".($thread_info['thread_sticky'] == 1 ? " " : " ")." ".($thread_info['thread_active'] ? " " : " "). " - ".IMAGE_admin_move.' + ".IMAGE_admin_move.' '; @@ -738,7 +757,7 @@ function forumjump() $text = "

".LAN_FORUM_1017.":

"; return $text; diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 8ecf1977c..73d3588ee 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -16,34 +16,44 @@ if(!defined('e107_INIT')) } e107::lan('forum', "front", true); + +if(!deftrue('BOOTSTRAP')) +{ + $bcDefs = array( + 'LAN_413' => 'LAN_FORUM_2046', + 'LAN_400' => 'LAN_EDIT', + 'LAN_401' => 'LAN_FORUM_2041', + 'LAN_406' => 'LAN_EDIT', + 'LAN_435' => 'LAN_DELETE', + 'LAN_397' => 'LAN_FORUM_2044', + 'LAN_398' => 'LAN_FORUM_4007' + + ); + + e107::getLanguage()->bcDefs($bcDefs); +} + + define('NAVIGATION_ACTIVE','forum'); $e107 = e107::getInstance(); $tp = e107::getParser(); $ns = e107::getRender(); -if (!$e107->isInstalled('forum')) +if (!e107::isInstalled('forum')) { header('Location: '.e_BASE.'index.php'); exit; } -if (isset($_POST['fjsubmit'])) -{ - header('location:' . e107::getUrl()->create('forum/forum/view', array('id'=>(int) $_POST['forumjump']), 'full=1&encode=0')); - exit; -} $highlight_search = isset($_POST['highlight_search']); if (!e_QUERY) { -// var_dump(e_QUERY); -// exit; //No parameters given, redirect to forum home $url = e107::url('forum','index','full'); e107::getRedirect()->go($url); -// header('Location:' . e107::getUrl()->create('forum/forum/main', array(), 'full=1&encode=0')); exit; } @@ -242,7 +252,8 @@ if ($forum->prefs->get('track') && USER) { $img = ($thread->threadInfo['track_userid'] ? IMAGE_track : IMAGE_untrack); $url = $e107->url->create('forum/thread/view', array('id' => $thread->threadId), 'encode=0'); // encoding could break AJAX call - $tVars->TRACK .= " + //FIXME + /*$tVars->TRACK .= " {$img} @@ -260,7 +271,8 @@ if ($forum->prefs->get('track') && USER) }); }, document, true); - "; + ";*/ + } @@ -444,7 +456,7 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread
- +
"; @@ -532,20 +544,23 @@ function showmodoptions() $delId = $postInfo['post_id']; } + $editQRY = array('f'=>'edit', 'id'=>$postInfo['post_thread'], 'post'=>$postInfo['post_id']); + $editURL = e107::url('forum','post','', array('query'=> $editQRY)); +// $e107->url->create('forum/thread/edit', array('id' => $postInfo['post_id'])) $ret .= "
- $postInfo['post_id']))."'>" . IMAGE_admin_edit . " + " . IMAGE_admin_edit . " "; if ($type == 'Thread') { - $moveUrl = e107::url('forum','move', array('thread_id'=>$postInfo['post_thread'])); + $moveUrl = e107::url('forum','move', array('thread_id'=>$postInfo['post_thread'])); $ret .= "" . IMAGE_admin_move2 . ""; } else { - $ret .= " $postInfo['post_id']))."'>" . IMAGE_admin_split . ''; + $ret .= " $postInfo['post_id']))."'>" . defset('IMAGE_admin_split') . ''; } $ret .= " diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 1ab98a8db..a3091dc8f 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -207,7 +207,7 @@ class plugin_forum_view_shortcodes extends e_shortcode { if($this->postInfo['user_name']) { - return " $this->postInfo['user_name'], 'id' => $this->postInfo['post_user']))."'>{$this->postInfo['user_name']}"; + return " $this->postInfo['user_name'], 'id' => $this->postInfo['post_user']))."'>{$this->postInfo['user_name']}"; } else { @@ -315,7 +315,10 @@ class plugin_forum_view_shortcodes extends e_shortcode { if (USER && $this->postInfo['post_user'] == USERID && $this->thread->threadInfo['thread_active']) { - return " $this->postInfo['post_id']))."'>".IMAGE_edit.' '; + $qry = array('f'=>'edit', 'id'=>$this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']); + $editURL = e107::url('forum','post', null, array('query'=> $qry)); + + return "".IMAGE_edit.' '; } } @@ -323,18 +326,21 @@ class plugin_forum_view_shortcodes extends e_shortcode { if($this->forum->checkperm($this->postInfo['post_forum'], 'post')) { - return " $this->postInfo['post_id']))."'>".IMAGE_quote.' '; - // return " $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id'] ))."'>".IMAGE_quote.' '; + $qry = array('f'=>'quote', 'id'=>$this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']); + $quoteURL = e107::url('forum','post', null, array('query'=> $qry)); + + return "".IMAGE_quote.' '; } } function sc_reportimg() { - global $page; - if (USER) { - // $actionUrl= $this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}"); - $actionUrl = e107::url('forum','post')."?f=report&id=".$this->data['thread_id']."&post=".$this->data['post_id']; - return "".IMAGE_report.' '; + if (USER) + { + $qry = array('f'=>'report', 'id'=>$this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']); + $reportURL = e107::url('forum','post', null, array('query'=> $qry)); + + return "".IMAGE_report.' '; } } @@ -421,8 +427,7 @@ class plugin_forum_view_shortcodes extends e_shortcode { if($parm == 'link') { - $e107 = e107::getInstance(); - $url = $e107->url->create('user/profile/view', array('name' => $this->postInfo['edit_name'], 'id' => $this->postInfo['post_edit_user'])); + $url = e107::getUrl()->create('user/profile/view', array('name' => $this->postInfo['edit_name'], 'id' => $this->postInfo['post_edit_user'])); return "{$this->postInfo['edit_name']}"; } return $this->postInfo['edit_name']; diff --git a/e107_web/css/backcompat.css b/e107_web/css/backcompat.css new file mode 100644 index 000000000..e69de29bb diff --git a/e107_web/js/core/all.jquery.js b/e107_web/js/core/all.jquery.js index 9f27ee9b4..4a81a077a 100644 --- a/e107_web/js/core/all.jquery.js +++ b/e107_web/js/core/all.jquery.js @@ -438,7 +438,7 @@ $(document).ready(function() // Tooltips for bbarea. - $(".bbcode_buttons").tooltip({placement: 'top',opacity: 1.0, fade: true,html: true, container:'body'}); + $(".bbcode_buttons, a.e-tip").tooltip({placement: 'top',opacity: 1.0, fade: true,html: true, container:'body'}); // $("a.e-tip").tipsy({gravity: 'w',opacity: 1.0, fade: true,html: true}); // var tabs = $('#tab-container').clone(true); // $('#htmlEditor').append(tabs); diff --git a/e107_web/js/e107.js b/e107_web/js/e107.js index da874fee2..849b56345 100644 --- a/e107_web/js/e107.js +++ b/e107_web/js/e107.js @@ -2761,5 +2761,5 @@ function sendInfo(handler, container, form) { * Core Auto-load */ $w('autoExternalLinks autoNoHistory autoHide toggleObserver toggleManyObserver scrollToObserver executeAutoSubmit').each( function(f) { - e107.runOnLoad(e107Helper[f], null, true); + // e107.runOnLoad(e107Helper[f], null, true); });