diff --git a/e107_core/shortcodes/single/alerts.php b/e107_core/shortcodes/single/alerts.php
new file mode 100644
index 000000000..f61325fe8
--- /dev/null
+++ b/e107_core/shortcodes/single/alerts.php
@@ -0,0 +1,7 @@
+render();
+}
diff --git a/e107_core/shortcodes/single/nextprev.php b/e107_core/shortcodes/single/nextprev.php
index 857306a94..a45168ef1 100644
--- a/e107_core/shortcodes/single/nextprev.php
+++ b/e107_core/shortcodes/single/nextprev.php
@@ -76,12 +76,12 @@ function nextprev_shortcode($parm = '')
$total_items = intval($parm['total']);
$check_render = true;
- if(vartrue($parm['glyphs']) && (BOOTSTRAP === true))
+ if(vartrue($parm['glyphs']) && (deftrue('BOOTSTRAP')))
{
- $LAN_NP_FIRST = "";
- $LAN_NP_PREVIOUS = "";
- $LAN_NP_NEXT = "";
- $LAN_NP_LAST = "";
+ $LAN_NP_FIRST = $tp->toGlyph("icon-fast-backward.glyph",false);
+ $LAN_NP_PREVIOUS = $tp->toGlyph("icon-backward.glyph",false);
+ $LAN_NP_NEXT = $tp->toGlyph("icon-forward.glyph",false);
+ $LAN_NP_LAST = $tp->toGlyph("icon-fast-forward.glyph",false);
}
else
{
diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php
index 853942bd0..576e0e892 100644
--- a/e107_core/templates/header_default.php
+++ b/e107_core/templates/header_default.php
@@ -716,7 +716,7 @@ if ($e107_popup != 1) {
}
//XXX TODO LAN in English.php
- echo "";
+ echo "";
if(deftrue('BOOTSTRAP'))
{
diff --git a/e107_handlers/login.php b/e107_handlers/login.php
index 2d26bf8d1..1df37ed27 100644
--- a/e107_handlers/login.php
+++ b/e107_handlers/login.php
@@ -531,6 +531,8 @@ class userlogin
$this->logNote('LAN_ROLL_LOG_10', $username);
}
+ e107::getMessage()->addError(LOGINMESSAGE);
+
if ($doCheck)
{ // See if ban required (formerly the checkibr() function)
if($pref['autoban'] == 1 || $pref['autoban'] == 3)
diff --git a/e107_handlers/message_handler.php b/e107_handlers/message_handler.php
index 6be6b2167..74b0a656c 100644
--- a/e107_handlers/message_handler.php
+++ b/e107_handlers/message_handler.php
@@ -512,7 +512,7 @@ class eMessage
*/
public static function formatMessage($mstack, $type, $message)
{
- $bstrap = array('info'=>'alert-info','error'=>'alert-error','warning'=>'alert-warning','success'=>'alert-success');
+ $bstrap = array('info'=>'alert-info','error'=>'alert-error alert-danger','warning'=>'alert-warning','success'=>'alert-success','debug'=>'alert-warning');
$bclass = vartrue($bstrap[$type]) ? " ".$bstrap[$type] : "";
if (empty($message))
@@ -972,7 +972,7 @@ function show_emessage($mode, $message, $line = 0, $file = "") {
require_once(e_THEME.'index.html');
exit;
}
- echo "
CRITICAL_ERROR:
Line $line $file
Error reported as: ".$message."
";
+ echo "CRITICAL_ERROR:
Line $line $file
Error reported as: ".$message."
";
break;
case "MESSAGE":
diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php
index e73a29c27..ff5813ab3 100644
--- a/e107_plugins/download/handlers/download_class.php
+++ b/e107_plugins/download/handlers/download_class.php
@@ -868,7 +868,7 @@ class download
$errmsg = LAN_dl_61." ".$this->qry['error'];
}
- return $ns->tablerender(LAN_dl_61, $header. "".$errmsg."
". $footer, 'download-error', true);
+ return $ns->tablerender(LAN_dl_61, $header. "".$errmsg."
". $footer, 'download-error', true);
}
diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php
index 16327195d..4d77f9acb 100644
--- a/e107_plugins/forum/forum.php
+++ b/e107_plugins/forum/forum.php
@@ -216,7 +216,7 @@ if (!isset($FORUM_MAIN_START))
include(e_PLUGIN.'forum/templates/forum_template.php');
-if(is_array($FORUM_TEMPLATE) && (BOOTSTRAP === true)) // new v2.x format.
+if(is_array($FORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // new v2.x format.
{
$FORUM_MAIN_START = $FORUM_TEMPLATE['main-start'];
diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php
index f0b19f335..01566f9b4 100644
--- a/e107_plugins/forum/forum_post.php
+++ b/e107_plugins/forum/forum_post.php
@@ -514,7 +514,7 @@ if (!vartrue($FORUMPOST))
}
}
-if(isset($FORUMPOST_TEMPLATE) && (BOOTSTRAP === true))
+if(isset($FORUMPOST_TEMPLATE) && (deftrue('BOOTSTRAP',false)))
{
$FORUMPOST = $FORUMPOST_TEMPLATE['form'];
$FORUMPOST_REPLY = $FORUMPOST_TEMPLATE['form'];
diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php
index 681ebb6be..f70fae663 100644
--- a/e107_plugins/forum/forum_viewforum.php
+++ b/e107_plugins/forum/forum_viewforum.php
@@ -88,7 +88,7 @@ if (!vartrue($FORUM_VIEW_START))
}
-if(is_array($FORUM_VIEWFORUM_TEMPLATE) && (BOOTSTRAP === true)) // New v2.x bootstrap Template.
+if(is_array($FORUM_VIEWFORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // New v2.x bootstrap Template.
{
$FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start'];
diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php
index 564b0627d..584676204 100644
--- a/e107_plugins/forum/forum_viewtopic.php
+++ b/e107_plugins/forum/forum_viewtopic.php
@@ -180,7 +180,7 @@ if (!vartrue($FORUMSTART))
// New in v2.x
-if(is_array($FORUM_VIEWTOPIC_TEMPLATE) && (BOOTSTRAP === true))
+if(is_array($FORUM_VIEWTOPIC_TEMPLATE) && deftrue('BOOTSTRAP',false))
{
$FORUMSTART = $FORUM_VIEWTOPIC_TEMPLATE['start'];
$FORUMTHREADSTYLE = $FORUM_VIEWTOPIC_TEMPLATE['thread'];
diff --git a/e107_plugins/login_menu/login_menu_shortcodes.php b/e107_plugins/login_menu/login_menu_shortcodes.php
index 6d33960ba..c0ef030fe 100755
--- a/e107_plugins/login_menu/login_menu_shortcodes.php
+++ b/e107_plugins/login_menu/login_menu_shortcodes.php
@@ -31,320 +31,391 @@
if (!defined('e107_INIT')) { exit(); }
global $tp;
-$login_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
-/*
-SC_BEGIN LM_USERNAME_INPUT
- global $pref;
- return "\n";
-SC_END
-SC_BEGIN LM_USERNAME_LABEL
- if($pref['allowEmailLogin']==1)
+
+$login_menu_shortcodes = e107::getScBatch('login_menu',TRUE);
+
+//$login_menu_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
+
+class login_menu_shortcodes extends e_shortcode
+{
+
+ private $use_imagecode =0;
+ private $sec;
+ private $usernameLabel = LOGIN_MENU_L1;
+
+ function __construct()
{
- return LOGIN_MENU_L49;
- }
-
- if($pref['allowEmailLogin']==2)
- {
- return LOGIN_MENU_L50;
- }
- return LOGIN_MENU_L1;
-SC_END
-
-
-SC_BEGIN LM_PASSWORD_INPUT
-global $pref;
-$t_password = "\n";
-if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "\n\n";
-return $t_password;
-SC_END
-
-SC_BEGIN LM_PASSWORD_LABEL
-return LOGIN_MENU_L2;
-SC_END
-
-
-SC_BEGIN LM_IMAGECODE
-global $use_imagecode, $sec_img;
-//DEPRECATED - use LM_IMAGECODE_NUMBER, LM_IMAGECODE_BOX instead
-if($use_imagecode) {
- return '
- '.$sec_img->r_image().'
-
';
-}
-return '';
-SC_END
-
-SC_BEGIN LM_IMAGECODE_NUMBER
-global $use_imagecode, $sec_img;
-if($use_imagecode) {
- return '
- '.$sec_img->r_image();
-}
-return '';
-SC_END
-
-SC_BEGIN LM_IMAGECODE_BOX
-global $use_imagecode, $sec_img;
-if($use_imagecode) {
- return '';
-}
-return '';
-SC_END
-
-SC_BEGIN LM_LOGINBUTTON
-return "";
-SC_END
-
-SC_BEGIN LM_REMEMBERME
-global $pref;
-if($parm == "hidden"){
- return "";
-}
-if($pref['user_tracking'] != "session")
-{
- return "".($parm ? $parm : "");
-}
-return '';
-SC_END
-
-SC_BEGIN LM_SIGNUP_LINK
-global $pref;
-if ($pref['user_reg'])
-{
- if (!$pref['auth_method'] || $pref['auth_method'] == 'e107')
- {
- return $parm == 'href' ? e_SIGNUP : "";
- }
-}
-return '';
-SC_END
-
-SC_BEGIN LM_FPW_LINK
-global $pref;
-if (!$pref['auth_method'] || $pref['auth_method'] == 'e107')
-{
- return $parm == 'href' ? SITEURL.'fpw.php' : "";
-}
-return '';
-SC_END
-
-SC_BEGIN LM_RESEND_LINK
-global $pref;
-if ($pref['user_reg'])
-{
- if(isset($pref['user_reg_veri']) && $pref['user_reg_veri'] == 1){
- if (!$pref['auth_method'] || $pref['auth_method'] == 'e107' )
+ $pref = e107::getPref();
+
+ $this->use_imagecode = e107::getConfig()->get('logcode');
+ $this->sec = e107::getSecureImg();
+ $this->usernameLabel = '';
+
+ if($pref['allowEmailLogin']==1)
{
- return $parm == 'href' ? e_SIGNUP.'?resend' : "";
+ $this->usernameLabel = LOGIN_MENU_L49;
+ }
+
+ if($pref['allowEmailLogin']==2)
+ {
+ $this->usernameLabel = LOGIN_MENU_L50;
+ }
+
+ }
+
+ function sc_lm_username_input($parm='')
+ {
+ $pref = e107::getPref();
+ return "\n";
+ }
+
+
+ function sc_lm_username_label($parm='')
+ {
+ return $this->usernameLabel;
+ }
+
+
+ function sc_lm_password_input($parm='')
+ {
+ $pref = e107::getPref();
+ $t_password = "\n";
+ if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0)) $t_password .= "\n\n";
+ return $t_password;
+ }
+
+
+ function sc_lm_password_label($parm='')
+ {
+ return LOGIN_MENU_L2;
+ }
+
+
+ function sc_lm_imagecode($parm='')
+ {
+ //DEPRECATED - use LM_IMAGECODE_NUMBER, LM_IMAGECODE_BOX instead
+ if($this->use_imagecode)
+ {
+ return '
+ '.$this->sec->r_image().'
+
';
+ }
+ return '';
+ }
+
+
+ function sc_lm_imagecode_number($parm='')
+ {
+ if($this->use_imagecode)
+ {
+ return '
+ '.$this->sec->r_image();
+ }
+ return '';
+ }
+
+ function sc_lm_imagecode_box($parm='')
+ {
+ $placeholder = LAN_ENTER_CODE;
+
+ if($this->use_imagecode)
+ {
+ return '';
+ }
+ return '';
+ }
+
+ function sc_lm_loginbutton($parm='')
+ {
+ return "";
+ }
+
+ function sc_lm_rememberme($parm='')
+ {
+ $pref = e107::getPref();
+ if($parm == "hidden"){
+ return "";
+ }
+ if($pref['user_tracking'] != "session")
+ {
+ return "".($parm ? $parm : "");
+ }
+ return '';
+ }
+
+ function sc_lm_signup_link($parm='')
+ {
+ $pref = e107::getPref();
+ if ($pref['user_reg'])
+ {
+ if (!$pref['auth_method'] || $pref['auth_method'] == 'e107')
+ {
+ return $parm == 'href' ? e_SIGNUP : "";
+ }
+ }
+ return '';
+ }
+
+ function sc_lm_fpw_link($parm='')
+ {
+ $pref = e107::getPref();
+ if (!$pref['auth_method'] || $pref['auth_method'] == 'e107')
+ {
+ return $parm == 'href' ? SITEURL.'fpw.php' : "";
+ }
+ return '';
+ }
+
+ function sc_lm_resend_link($parm='')
+ {
+ $pref = e107::getPref();
+
+ if ($pref['user_reg'])
+ {
+ if(isset($pref['user_reg_veri']) && $pref['user_reg_veri'] == 1)
+ {
+ if (!$pref['auth_method'] || $pref['auth_method'] == 'e107' )
+ {
+ return $parm == 'href' ? e_SIGNUP.'?resend' : "";
+ }
+ }
+ }
+ return '';
+ }
+
+ function sc_lm_maintenance($parm='')
+ {
+ $pref = e107::getPref();
+
+ if(ADMIN && varset($pref['maintainance_flag']))
+ {
+ return LOGIN_MENU_L10;
+ }
+ return '';
+ }
+
+ function sc_lm_adminlink_bullet($parm='')
+ {
+ if(ADMIN)
+ {
+ $data = getcachedvars('login_menu_data');
+ return $parm == 'src' ? $data['link_bullet_src'] : $data['link_bullet'];
+ }
+ return '';
+ }
+
+ function sc_lm_adminlink($parm='')
+ {
+ if(ADMIN == TRUE) {
+ return $parm == 'href' ? e_ADMIN_ABS.'admin.php' : '';
+ }
+ return '';
+ }
+
+ function sc_lm_admin_configure($parm='')
+ {
+ if(ADMIN == TRUE) {
+ return $parm == 'href' ? e_PLUGIN_ABS.'login_menu/config.php' : '';
+ }
+ return '';
+ }
+
+ function sc_lm_bullet($parm='')
+ {
+ $data = getcachedvars('login_menu_data');
+ return $parm == 'src' ? $data['link_bullet_src'] : $data['link_bullet'];
+ }
+
+ function sc_lm_usersettings($parm='')
+ {
+ $text = ($parm) ? $parm : LOGIN_MENU_L12;
+ return '';
+ }
+
+ function sc_lm_usersettings_href($parm='')
+ {
+ return e_HTTP.'usersettings.php';
+ }
+
+ function sc_lm_profile($parm='')
+ {
+ $text = ($parm) ? $parm : LOGIN_MENU_L13;
+ return '';
+ }
+
+ function sc_lm_profile_href($parm='')
+ {
+ return e_HTTP.'user.php?id.'.USERID;
+ }
+
+ function sc_lm_logout($parm='')
+ {
+ $text = ($parm) ? $parm : LOGIN_MENU_L8;
+ return '';
+ }
+
+ function sc_lm_logout_href($parm='')
+ {
+ return e_HTTP.'index.php?logout';
+ }
+
+ function sc_lm_external_links($parm='')
+ {
+ global $tp, $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK;
+ if(!varsettrue($menu_pref['login_menu']['external_links'])) return '';
+ $lbox_infos = login_menu_class::parse_external_list(true, false);
+ $lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array();
+ if(!varsettrue($lbox_infos['links'])) return '';
+ $ret = '';
+ foreach ($lbox_active as $stackid) {
+ $lbox_items = login_menu_class::clean_links(varset($lbox_infos['links'][$stackid]));
+ if(!$lbox_items) continue;
+ foreach ($lbox_items as $num=>$lbox_item) {
+ $lbox_item['link_id'] = $stackid.'_'.$num;
+ cachevars('login_menu_linkdata', $lbox_item);
+ $ret .= $tp -> parseTemplate($LOGIN_MENU_EXTERNAL_LINK, false, $login_menu_shortcodes);
+ }
+ }
+ return $ret;
+ }
+
+ function sc_lm_external_link($parm='')
+ {
+ $lbox_item = getcachedvars('login_menu_linkdata');
+ return $parm == 'href' ? $lbox_item['link_url'] : '';
+ }
+
+ function sc_lm_external_link_label($parm='')
+ {
+ $lbox_item = getcachedvars('login_menu_linkdata');
+ return varsettrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']');
+ }
+
+ function sc_lm_stats($parm='')
+ {
+ global $LOGIN_MENU_STATS, $tp, $login_menu_shortcodes;
+ $data = getcachedvars('login_menu_data');
+ if(!$data['enable_stats']) return '';
+ return $tp -> parseTemplate($LOGIN_MENU_STATS, true, $login_menu_shortcodes);
+ }
+
+ function sc_lm_new_news($parm='')
+ {
+ global $LOGIN_MENU_STATITEM, $tp;
+ $data = getcachedvars('login_menu_data');
+ if(!isset($data['new_news'])) return '';
+ $tmp = array();
+ if($data['new_news']){
+ $tmp['LM_STAT_NEW'] = "return '".$data['new_news']."';";
+ $tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? "return '".LOGIN_MENU_L14."';" : "return '".LOGIN_MENU_L15."';";
+ $tmp['LM_STAT_EMPTY'] = '';
+ } else {
+ $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_LABEL'] = '';
+ $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L15."';";
+ }
+ return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
+ }
+
+ function sc_lm_new_comments($parm='')
+ {
+ global $LOGIN_MENU_STATITEM, $tp;
+ $data = getcachedvars('login_menu_data');
+ if(!isset($data['new_comments'])) return '';
+ $tmp = array();
+ if($data['new_comments']){
+ $tmp['LM_STAT_NEW'] = "return '".$data['new_comments']."';";
+ $tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? "return '".LOGIN_MENU_L18."';" : "return '".LOGIN_MENU_L19."';";
+ $tmp['LM_STAT_EMPTY'] = '';
+ } else {
+ $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_LABEL'] = '';
+ $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L19."';";
+ }
+ return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
+ }
+
+ function sc_lm_new_users($parm='')
+ {
+ global $LOGIN_MENU_STATITEM, $tp;
+ $data = getcachedvars('login_menu_data');
+ if(!isset($data['new_users'])) return '';
+ $tmp = array();
+ if($data['new_users']){
+ $tmp['LM_STAT_NEW'] = "return '".$data['new_users']."';";
+ $tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? "return '".LOGIN_MENU_L22."';" : "return '".LOGIN_MENU_L23."';";
+ $tmp['LM_STAT_EMPTY'] = '';
+ } else {
+ $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_LABEL'] = '';
+ $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L23."';";
+ }
+ return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
+ }
+
+ function sc_lm_plugin_stats($parm='')
+ {
+ global $tp, $menu_pref, $new_total, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR;
+ if(!varsettrue($menu_pref['login_menu']['external_stats'])) return '';
+ $lbox_infos = login_menu_class::parse_external_list(true, false);
+ if(!varsettrue($lbox_infos['stats'])) return '';
+ $lbox_active_sorted = $menu_pref['login_menu']['external_stats'] ? explode(',', $menu_pref['login_menu']['external_stats']) : array();
+ $ret = array();
+ $sep = varset($LM_STATITEM_SEPARATOR, '
');
+ foreach ($lbox_active_sorted as $stackid) {
+ if(!varset($lbox_infos['stats'][$stackid])) continue;
+ foreach ($lbox_infos['stats'][$stackid] as $lbox_item) {
+ $tmp = array();
+ if($lbox_item['stat_new']){
+ $tmp['LM_STAT_NEW'] = "return '{$lbox_item['stat_new']}';";
+ $tmp['LM_STAT_LABEL'] = $lbox_item["stat_new"] == 1 ? "return '{$lbox_item['stat_item']}';" : "return '{$lbox_item['stat_items']}';";
+ $tmp['LM_STAT_EMPTY'] = '';
+ $new_total += $lbox_item['stat_new'];
+ } else {
+ //if(empty($lbox_item['stat_nonew'])) continue;
+ $tmp['LM_STAT_NEW'] = '';
+ $tmp['LM_STAT_LABEL'] = '';
+ $tmp['LM_STAT_EMPTY'] = "return '{$lbox_item['stat_nonew']}';";
+ }
+ $ret[] = $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
+ }
+ }
+ return $ret ? implode($sep, $ret) : '';
+ }
+
+
+ function sc_lm_listnew_link($parm='')
+ {
+ $data = getcachedvars('login_menu_data');
+ if($parm == 'href') return $data['listnew_link'];
+ return $data['listnew_link'] ? '' : '';
+ }
+
+
+ function sc_lm_message($parm='')
+ {
+ global $tp, $LOGIN_MENU_MESSAGE;
+ if(!defsettrue('LOGINMESSAGE')) return '';
+ if($parm == "popup"){
+ $srch = array("
","'");
+ $rep = array("\\n","\'");
+ return "";
+ }else{
+ return $tp->parseTemplate($LOGIN_MENU_MESSAGE, true, $login_menu_shortcodes);
}
}
+
+
+ function sc_lm_message_text($parm='')
+ {
+ return defsettrue('LOGINMESSAGE', '');
+ }
+
+
+
+
}
-return '';
-SC_END
-
-SC_BEGIN LM_MAINTENANCE
-global $pref;
-if(ADMIN && varset($pref['maintainance_flag']))
-{
- return LOGIN_MENU_L10;
-}
-return '';
-SC_END
-
-SC_BEGIN LM_ADMINLINK_BULLET
-if(ADMIN)
-{
- $data = getcachedvars('login_menu_data');
- return $parm == 'src' ? $data['link_bullet_src'] : $data['link_bullet'];
-}
-return '';
-SC_END
-
-SC_BEGIN LM_ADMINLINK
-if(ADMIN == TRUE) {
- return $parm == 'href' ? e_ADMIN_ABS.'admin.php' : '';
-}
-return '';
-SC_END
-
-SC_BEGIN LM_ADMIN_CONFIGURE
-if(ADMIN == TRUE) {
- return $parm == 'href' ? e_PLUGIN_ABS.'login_menu/config.php' : '';
-}
-return '';
-SC_END
-
-SC_BEGIN LM_BULLET
-$data = getcachedvars('login_menu_data');
-return $parm == 'src' ? $data['link_bullet_src'] : $data['link_bullet'];
-SC_END
-
-SC_BEGIN LM_USERSETTINGS
-$text = ($parm) ? $parm : LOGIN_MENU_L12;
-return '';
-SC_END
-
-SC_BEGIN LM_USERSETTINGS_HREF
-return e_HTTP.'usersettings.php';
-SC_END
-
-SC_BEGIN LM_PROFILE
-$text = ($parm) ? $parm : LOGIN_MENU_L13;
-return '';
-SC_END
-
-SC_BEGIN LM_PROFILE_HREF
-return e_HTTP.'user.php?id.'.USERID;
-SC_END
-
-SC_BEGIN LM_LOGOUT
-$text = ($parm) ? $parm : LOGIN_MENU_L8;
-return '';
-SC_END
-
-SC_BEGIN LM_LOGOUT_HREF
-return e_HTTP.'index.php?logout';
-SC_END
-
-SC_BEGIN LM_EXTERNAL_LINKS
-global $tp, $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK;
-if(!varsettrue($menu_pref['login_menu']['external_links'])) return '';
-$lbox_infos = login_menu_class::parse_external_list(true, false);
-$lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array();
-if(!varsettrue($lbox_infos['links'])) return '';
-$ret = '';
-foreach ($lbox_active as $stackid) {
- $lbox_items = login_menu_class::clean_links(varset($lbox_infos['links'][$stackid]));
- if(!$lbox_items) continue;
- foreach ($lbox_items as $num=>$lbox_item) {
- $lbox_item['link_id'] = $stackid.'_'.$num;
- cachevars('login_menu_linkdata', $lbox_item);
- $ret .= $tp -> parseTemplate($LOGIN_MENU_EXTERNAL_LINK, false, $login_menu_shortcodes);
- }
-}
-return $ret;
-SC_END
-
-SC_BEGIN LM_EXTERNAL_LINK
-$lbox_item = getcachedvars('login_menu_linkdata');
-return $parm == 'href' ? $lbox_item['link_url'] : '';
-SC_END
-
-SC_BEGIN LM_EXTERNAL_LINK_LABEL
-$lbox_item = getcachedvars('login_menu_linkdata');
-return varsettrue($lbox_item['link_label'], '['.LOGIN_MENU_L44.']');
-SC_END
-
-SC_BEGIN LM_STATS
-global $LOGIN_MENU_STATS, $tp, $login_menu_shortcodes;
-$data = getcachedvars('login_menu_data');
-if(!$data['enable_stats']) return '';
-return $tp -> parseTemplate($LOGIN_MENU_STATS, true, $login_menu_shortcodes);
-SC_END
-
-SC_BEGIN LM_NEW_NEWS
-global $LOGIN_MENU_STATITEM, $tp;
-$data = getcachedvars('login_menu_data');
-if(!isset($data['new_news'])) return '';
-$tmp = array();
-if($data['new_news']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_news']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? "return '".LOGIN_MENU_L14."';" : "return '".LOGIN_MENU_L15."';";
- $tmp['LM_STAT_EMPTY'] = '';
-} else {
- $tmp['LM_STAT_NEW'] = '';
- $tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L15."';";
-}
-return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
-SC_END
-
-SC_BEGIN LM_NEW_COMMENTS
-global $LOGIN_MENU_STATITEM, $tp;
-$data = getcachedvars('login_menu_data');
-if(!isset($data['new_comments'])) return '';
-$tmp = array();
-if($data['new_comments']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_comments']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? "return '".LOGIN_MENU_L18."';" : "return '".LOGIN_MENU_L19."';";
- $tmp['LM_STAT_EMPTY'] = '';
-} else {
- $tmp['LM_STAT_NEW'] = '';
- $tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L19."';";
-}
-return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
-SC_END
-
-SC_BEGIN LM_NEW_USERS
-global $LOGIN_MENU_STATITEM, $tp;
-$data = getcachedvars('login_menu_data');
-if(!isset($data['new_users'])) return '';
-$tmp = array();
-if($data['new_users']){
- $tmp['LM_STAT_NEW'] = "return '".$data['new_users']."';";
- $tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? "return '".LOGIN_MENU_L22."';" : "return '".LOGIN_MENU_L23."';";
- $tmp['LM_STAT_EMPTY'] = '';
-} else {
- $tmp['LM_STAT_NEW'] = '';
- $tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L23."';";
-}
-return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
-SC_END
-
-SC_BEGIN LM_PLUGIN_STATS
-global $tp, $menu_pref, $new_total, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR;
-if(!varsettrue($menu_pref['login_menu']['external_stats'])) return '';
-$lbox_infos = login_menu_class::parse_external_list(true, false);
-if(!varsettrue($lbox_infos['stats'])) return '';
-$lbox_active_sorted = $menu_pref['login_menu']['external_stats'] ? explode(',', $menu_pref['login_menu']['external_stats']) : array();
-$ret = array();
-$sep = varset($LM_STATITEM_SEPARATOR, '
');
-foreach ($lbox_active_sorted as $stackid) {
- if(!varset($lbox_infos['stats'][$stackid])) continue;
- foreach ($lbox_infos['stats'][$stackid] as $lbox_item) {
- $tmp = array();
- if($lbox_item['stat_new']){
- $tmp['LM_STAT_NEW'] = "return '{$lbox_item['stat_new']}';";
- $tmp['LM_STAT_LABEL'] = $lbox_item["stat_new"] == 1 ? "return '{$lbox_item['stat_item']}';" : "return '{$lbox_item['stat_items']}';";
- $tmp['LM_STAT_EMPTY'] = '';
- $new_total += $lbox_item['stat_new'];
- } else {
- //if(empty($lbox_item['stat_nonew'])) continue;
- $tmp['LM_STAT_NEW'] = '';
- $tmp['LM_STAT_LABEL'] = '';
- $tmp['LM_STAT_EMPTY'] = "return '{$lbox_item['stat_nonew']}';";
- }
- $ret[] = $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
- }
-}
-return $ret ? implode($sep, $ret) : '';
-SC_END
-
-SC_BEGIN LM_LISTNEW_LINK
-$data = getcachedvars('login_menu_data');
-if($parm == 'href') return $data['listnew_link'];
-return $data['listnew_link'] ? '' : '';
-SC_END
-
-SC_BEGIN LM_MESSAGE
-global $tp, $LOGIN_MENU_MESSAGE;
-if(!defsettrue('LOGINMESSAGE')) return '';
-if($parm == "popup"){
- $srch = array("
","'");
- $rep = array("\\n","\'");
- return "";
-}else{
- return $tp->parseTemplate($LOGIN_MENU_MESSAGE, true, $login_menu_shortcodes);
-}
-SC_END
-
-SC_BEGIN LM_MESSAGE_TEXT
-return defsettrue('LOGINMESSAGE', '');
-SC_END
-*/
?>
\ No newline at end of file
diff --git a/e107_plugins/poll/poll_class.php b/e107_plugins/poll/poll_class.php
index 63fe47220..23834eb29 100644
--- a/e107_plugins/poll/poll_class.php
+++ b/e107_plugins/poll/poll_class.php
@@ -563,7 +563,7 @@ class poll
function generateBar($perc)
{
- if(BOOTSTRAP === true)
+ if(deftrue('BOOTSTRAP',false))
{
return "
diff --git a/e107_themes/bootstrap3/theme.php b/e107_themes/bootstrap3/theme.php
index 0b0df0e83..b054c7681 100644
--- a/e107_themes/bootstrap3/theme.php
+++ b/e107_themes/bootstrap3/theme.php
@@ -157,6 +157,8 @@ $LAYOUT['jumbotron'] = '
{WMESSAGE}
{SETSTYLE=default}
+ {ALERTS}
+
{...}
@@ -171,7 +173,7 @@ $LAYOUT['jumbotron'] = '
diff --git a/e107_themes/bootstrap3/theme_shortcodes.php b/e107_themes/bootstrap3/theme_shortcodes.php
index cad1b9f13..6490ca5df 100644
--- a/e107_themes/bootstrap3/theme_shortcodes.php
+++ b/e107_themes/bootstrap3/theme_shortcodes.php
@@ -13,13 +13,17 @@
class theme_shortcodes extends e_shortcode
{
+ function __construct()
+ {
+
+ }
function sc_bootstrap_usernav()
{
include_lan(e_PLUGIN."login_menu/languages/".e_LANGUAGE.".php");
$tp = e107::getParser();
-
+
if(!USERID) // Logged Out.
{
$text = '
@@ -40,6 +44,9 @@ class theme_shortcodes extends e_shortcode