diff --git a/e107_core/shortcodes/single/nextprev.php b/e107_core/shortcodes/single/nextprev.php index 4019fa163..2add8255e 100644 --- a/e107_core/shortcodes/single/nextprev.php +++ b/e107_core/shortcodes/single/nextprev.php @@ -75,6 +75,21 @@ function nextprev_shortcode($parm = '') $total_items = intval($parm['total']); $check_render = true; + if(vartrue($parm['glyphs']) && (e_BOOTSTRAP === true)) + { + $LAN_NP_FIRST = ""; + $LAN_NP_PREVIOUS = ""; + $LAN_NP_NEXT = ""; + $LAN_NP_LAST = ""; + } + else + { + $LAN_NP_FIRST = LAN_NP_FIRST; + $LAN_NP_PREVIOUS = LAN_NP_PREVIOUS; + $LAN_NP_NEXT = LAN_NP_NEXT; + $LAN_NP_LAST = LAN_NP_LAST ; + } + // search for template keys - default_start, default_end etc. if(isset($parm['tmpl_prefix'])) { @@ -82,6 +97,12 @@ function nextprev_shortcode($parm = '') $tprefix = vartrue($parm['tmpl_prefix'], 'default'); //$perpage = $parm['amount'] !== 'all' ? intval($parm['amount']) : $total_items; } + elseif(isset($parm['tmpl'])) + { + // forced + $tprefix = vartrue($parm['tmpl'], 'default'); + //$perpage = $parm['amount'] !== 'all' ? intval($parm['amount']) : $total_items; + } // default, based on prefs elseif($pref['old_np']) { @@ -258,7 +279,7 @@ function nextprev_shortcode($parm = '') if($show_first && !empty($tmpl[$tprefix.'nav_first'])) { $e_vars->url = str_replace('[FROM]', $first_page, $url); - $e_vars->label = LAN_NP_FIRST; + $e_vars->label = $LAN_NP_FIRST; $e_vars->url_label = LAN_NP_URLFIRST; $ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_first'], $e_vars); } @@ -266,7 +287,7 @@ function nextprev_shortcode($parm = '') if(!empty($tmpl[$tprefix.'nav_prev'])) { $e_vars->url = str_replace('[FROM]', $prev_page, $url); - $e_vars->label = LAN_NP_PREVIOUS; + $e_vars->label = $LAN_NP_PREVIOUS; $e_vars->url_label = LAN_NP_URLPREVIOUS; $ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_prev'], $e_vars); } @@ -305,7 +326,7 @@ function nextprev_shortcode($parm = '') if(!empty($tmpl[$tprefix.'nav_next'])) { $e_vars->url = str_replace('[FROM]', $next_page, $url); - $e_vars->label = LAN_NP_NEXT; + $e_vars->label = $LAN_NP_NEXT; $e_vars->url_label = LAN_NP_URLNEXT; $ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_next'], $e_vars); } @@ -313,7 +334,7 @@ function nextprev_shortcode($parm = '') if($show_last && !empty($tmpl[$tprefix.'nav_last'])) { $e_vars->url = str_replace('[FROM]', $last_page, $url);//$last_page - $e_vars->label = LAN_NP_LAST; + $e_vars->label = $LAN_NP_LAST; $e_vars->url_label = LAN_NP_URLLAST; $ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_last'], $e_vars); } diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index a1bc07aff..4405d1ce8 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -1581,6 +1581,11 @@ class e107 */ public static function css($type, $data, $dep = null, $media = 'all', $preComment = '', $postComment = '', $dependence = null) { + if(strstr($data,'bootstrap') && !defined("e_BOOTSTRAP")) // detect bootstrap is enabled. - used in nextprev.sc currently. + { + define("e_BOOTSTRAP", true); + } + $jshandler = e107::getJs(); $jshandler->setDependency($dep); @@ -2237,6 +2242,11 @@ class e107 else $fname = e_LANGUAGE; $path = $theme.$fname.'.php'; + + if(E107_DBG_INCLUDES) + { + e107::getMessage()->addDebug("Attempting to Load: ".$path); + } e107::setRegistry($cstring, true); self::includeLan($path, false); diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index cb08f5790..6ef03cc5f 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -24,6 +24,7 @@ $(document).ready(function() var thread = $(this).attr('data-forum-thread'); var post = $(this).attr('data-forum-post'); var text = $('#forum-quickreply-text').val(); + var insert = $(this).attr('data-forum-insert'); @@ -37,7 +38,7 @@ $(document).ready(function() $.ajax({ type: "POST", url: script, - data: { thread: thread, action: action, post: post, text: text }, + data: { thread: thread, action: action, post: post, text: text, insert:insert }, success: function(data) { // alert(data); @@ -81,8 +82,8 @@ EON; e107::js('inline',$jscode,'jquery'); - -include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); +e107::lan('forum','lan_forum'); +// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php'); include_once(e_PLUGIN . 'forum/templates/forum_icons_template.php'); @@ -134,41 +135,51 @@ class e107forum } - + /** + * Handle the Ajax quick-reply. + */ function ajaxQuickReply() { $tp = e107::getParser(); if(varset($_POST['action']) == 'quickreply' && vartrue($_POST['text'])) { - + $postInfo = array(); $postInfo['post_ip'] = e107::getIPHandler()->getIP(FALSE); + if (USER) { $postInfo['post_user'] = USERID; - + } else { $postInfo['post_user_anon'] = $_POST['anonname']; } - $postInfo['post_entry'] = $_POST['text']; - $postInfo['post_forum'] = intval($_POST['post']); - $postInfo['post_datestamp'] = time(); - $postInfo['post_thread'] = intval($_POST['thread']); + + $postInfo['post_entry'] = $_POST['text']; + $postInfo['post_forum'] = intval($_POST['post']); + $postInfo['post_datestamp'] = time(); + $postInfo['post_thread'] = intval($_POST['thread']); $this->postAdd($postInfo); // save it. + $postInfo['user_name'] = USERNAME; $postInfo['user_email'] = USEREMAIL; $postInfo['user_image'] = USERIMAGE; - - $tmpl = e107::getTemplate('forum','forum_viewtopic','replies'); - $sc = e107::getScBatch('view', 'forum'); - $sc->setScVar('postInfo', $postInfo); - - $ret['html'] = $tp->parseTemplate($tmpl, true, vartrue($forum_shortcodes)) . "\n"; - // $ret['html'] = "