1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Renamed bootstrap flag e_BOOTSTRAP to BOOTSTRAP. Set e_BOOTSTRAP as path of bootstrap folder.

This commit is contained in:
Cameron
2013-06-17 16:03:33 -07:00
parent d10dbc443a
commit a0aec4b210
25 changed files with 51 additions and 44 deletions

View File

@@ -44,7 +44,7 @@ class bbcode_shortcodes extends e_shortcode
); );
if(e_BOOTSTRAP) if(BOOTSTRAP)
{ {
$text = '<div class="btn-group">'; $text = '<div class="btn-group">';
$text .= '<a class="btn btn-small bbcode dropdown-toggle" data-toggle="dropdown" href="#" title="">'; $text .= '<a class="btn btn-small bbcode dropdown-toggle" data-toggle="dropdown" href="#" title="">';
@@ -169,7 +169,7 @@ class bbcode_shortcodes extends e_shortcode
function bb_fontsize($id) // FIXME CSS issues function bb_fontsize($id) // FIXME CSS issues
{ {
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$tp = e107::getParser(); $tp = e107::getParser();
@@ -226,7 +226,7 @@ class bbcode_shortcodes extends e_shortcode
if ($pref['comments_emoticons'] && $pref['smiley_activate'] && !defsettrue('e_WYSIWYG')) if ($pref['comments_emoticons'] && $pref['smiley_activate'] && !defsettrue('e_WYSIWYG'))
{ {
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$text = '<div class="btn-group" style="margin-left:0px">'; $text = '<div class="btn-group" style="margin-left:0px">';
$text .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#">'; $text .= '<a class="dropdown-toggle" data-toggle="dropdown" href="#">';

View File

@@ -126,7 +126,7 @@ class news_shortcodes extends e_shortcode
$NEWIMAGE = $param['image_nonew_small']; $NEWIMAGE = $param['image_nonew_small'];
} }
if(deftrue('e_BOOTSTRAP')) // Should be done with CSS, not like above. if(deftrue('BOOTSTRAP')) // Should be done with CSS, not like above.
{ {
$NEWIMAGE = ""; $NEWIMAGE = "";
} }
@@ -225,7 +225,7 @@ class news_shortcodes extends e_shortcode
if (ADMIN && getperms('H')) if (ADMIN && getperms('H'))
{ {
$default = (deftrue('e_BOOTSTRAP')) ? "<i class='icon-edit'></i>" : "<img src='".e_IMAGE_ABS."admin_images/edit_16.png' alt='".LAN_NEWS_25."' class='icon' />"; $default = (deftrue('BOOTSTRAP')) ? "<i class='icon-edit'></i>" : "<img src='".e_IMAGE_ABS."admin_images/edit_16.png' alt='".LAN_NEWS_25."' class='icon' />";
$adop_icon = (file_exists(THEME."images/newsedit.png") ? "<img src='".THEME_ABS."images/newsedit.png' alt='".LAN_NEWS_25."' class='icon' />" : $default); $adop_icon = (file_exists(THEME."images/newsedit.png") ? "<img src='".THEME_ABS."images/newsedit.png' alt='".LAN_NEWS_25."' class='icon' />" : $default);
return " <a href='".e_ADMIN_ABS."newspost.php?action=create&amp;sub=edit&amp;id=".$this->news_item['news_id']."' title=\"".LAN_NEWS_25."\">".$adop_icon."</a>\n"; return " <a href='".e_ADMIN_ABS."newspost.php?action=create&amp;sub=edit&amp;id=".$this->news_item['news_id']."' title=\"".LAN_NEWS_25."\">".$adop_icon."</a>\n";

View File

@@ -274,7 +274,7 @@ class user_shortcodes extends e_shortcode
*/ */
function sc_user_icon($parm='') function sc_user_icon($parm='')
{ {
$boot = deftrue('e_BOOTSTRAP'); $boot = deftrue('BOOTSTRAP');
switch ($parm) switch ($parm)
{ {

View File

@@ -75,7 +75,7 @@ function nextprev_shortcode($parm = '')
$total_items = intval($parm['total']); $total_items = intval($parm['total']);
$check_render = true; $check_render = true;
if(vartrue($parm['glyphs']) && (e_BOOTSTRAP === true)) if(vartrue($parm['glyphs']) && (BOOTSTRAP === true))
{ {
$LAN_NP_FIRST = "<i class='icon-fast-backward'></i>"; $LAN_NP_FIRST = "<i class='icon-fast-backward'></i>";
$LAN_NP_PREVIOUS = "<i class='icon-backward'></i>"; $LAN_NP_PREVIOUS = "<i class='icon-backward'></i>";

View File

@@ -3,7 +3,7 @@
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
if (!defined("USER_WIDTH") && deftrue('e_BOOTSTRAP')!==true){ define("USER_WIDTH","width:70%"); } if (!defined("USER_WIDTH") && deftrue('BOOTSTRAP')!==true){ define("USER_WIDTH","width:70%"); }
// ##### FPW TABLE ----------------------------------------------------------------------------- // ##### FPW TABLE -----------------------------------------------------------------------------
if(!isset($FPW_TABLE)) if(!isset($FPW_TABLE))

View File

@@ -17,7 +17,7 @@
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
if (!defined("USER_WIDTH")) if (!defined("USER_WIDTH"))
{ {
$uw = (deftrue('e_BOOTSTRAP')) ? "" : "width:97%"; $uw = (deftrue('BOOTSTRAP')) ? "" : "width:97%";
define("USER_WIDTH", $uw); define("USER_WIDTH", $uw);
} }

View File

@@ -517,7 +517,7 @@ class e107_db_debug {
$inc = array( $inc = array(
'HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET', 'BOOTSTRAP','HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET',
'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET', 'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET',
'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER' 'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER'
); );

View File

@@ -1663,9 +1663,9 @@ class e107
*/ */
public static function css($type, $data, $dep = null, $media = 'all', $preComment = '', $postComment = '', $dependence = null) public static function css($type, $data, $dep = null, $media = 'all', $preComment = '', $postComment = '', $dependence = null)
{ {
if((strstr($data,'bootstrap.css') || strstr($data,'bootstrap.min.css')) && !defined("e_BOOTSTRAP")) // detect bootstrap is enabled. - used in nextprev.sc and forum currently. if((strstr($data,'bootstrap.css') || strstr($data,'bootstrap.min.css')) && !defined("BOOTSTRAP")) // detect bootstrap is enabled. - used in nextprev.sc and forum currently.
{ {
define("e_BOOTSTRAP", true); define("BOOTSTRAP", true);
} }
$jshandler = e107::getJs(); $jshandler = e107::getJs();
@@ -3007,6 +3007,10 @@ class e107
define('e_AVATAR_UPLOAD_ABS', $this->get_override_http('AVATARS_UPLOAD')); define('e_AVATAR_UPLOAD_ABS', $this->get_override_http('AVATARS_UPLOAD'));
define('e_AVATAR_DEFAULT_ABS', $this->get_override_http('AVATARS_DEFAULT')); define('e_AVATAR_DEFAULT_ABS', $this->get_override_http('AVATARS_DEFAULT'));
// Special
define('e_BOOTSTRAP', e_WEB."bootstrap/");
} }
return $this; return $this;

View File

@@ -58,7 +58,7 @@ class emailprint
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$genericMail = "<i class='icon-envelope'></i>"; $genericMail = "<i class='icon-envelope'></i>";
$genericPrint = "<i class='icon-print'></i>"; $genericPrint = "<i class='icon-print'></i>";

View File

@@ -825,7 +825,7 @@ class e_form
*/ */
public function progressBar($name,$value,$options=array()) public function progressBar($name,$value,$options=array())
{ {
if(!deftrue('e_BOOTSTRAP')) if(!deftrue('BOOTSTRAP'))
{ {
return; return;
} }
@@ -1537,7 +1537,7 @@ class e_form
*/ */
public function button($name, $value, $action = 'submit', $label = '', $options = array()) public function button($name, $value, $action = 'submit', $label = '', $options = array())
{ {
if(deftrue('e_BOOTSTRAP') && $action == 'dropdown' && is_array($value)) if(deftrue('BOOTSTRAP') && $action == 'dropdown' && is_array($value))
{ {
// $options = $this->format_options('admin_button', $name, $options); // $options = $this->format_options('admin_button', $name, $options);
$options['class'] = vartrue($options['class']); $options['class'] = vartrue($options['class']);

View File

@@ -713,7 +713,7 @@ class e107_user_extended
$label = deftrue($label, $label); $label = deftrue($label, $label);
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$ret .= $frm->radio($fname,$val,($curval == $val),array('label'=>$label)); $ret .= $frm->radio($fname,$val,($curval == $val),array('label'=>$label));
} }
@@ -749,7 +749,7 @@ class e107_user_extended
} }
$label = deftrue($label, $label); $label = deftrue($label, $label);
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$ret .= $frm->checkbox($fname,$val,($curval == $val),array('label'=>$label)); $ret .= $frm->checkbox($fname,$val,($curval == $val),array('label'=>$label));
} }

View File

@@ -77,16 +77,19 @@ else
{ {
$parms[] = $menu_pref['banner_campaign']; $parms[] = $menu_pref['banner_campaign'];
} }
$txt = $BANNER_MENU_START;
foreach ($parms as $parm)
{
$bannersccode = file_get_contents(e_CORE.'shortcodes/banner.sc');
$BANNER = eval($bannersccode);
$txt .= preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_MENU);
}
$txt .= $BANNER_MENU_END;
} }
$txt = $BANNER_MENU_START;
foreach ($parms as $parm)
{
$bannersccode = file_get_contents(e_CORE.'shortcodes/banner.sc');
$BANNER = eval($bannersccode);
$txt .= preg_replace("/\{(.*?)\}/e", '$\1', $BANNER_MENU);
}
$txt .= $BANNER_MENU_END;
} }
if(isset($menu_pref['banner_rendertype']) && $menu_pref['banner_rendertype'] == 2) if(isset($menu_pref['banner_rendertype']) && $menu_pref['banner_rendertype'] == 2)

View File

@@ -119,7 +119,7 @@ if(false === $cached)
{ {
$month_links[$xmonth] = e107::getUrl()->create('news/list/month', 'idv='.formatDate($req_year, $xmonth));//e_BASE."news.php?month.".formatDate($req_year, $xmonth); $month_links[$xmonth] = e107::getUrl()->create('news/list/month', 'idv='.formatDate($req_year, $xmonth));//e_BASE."news.php?month.".formatDate($req_year, $xmonth);
} }
// if(($news['news_datestamp'] >= $month_start && $news['news_datestamp'] <= $month_end) || (deftrue('e_BOOTSTRAP') && $news['news_datestamp'] >= $year_start && $news['news_datestamp'] <= $year_end)) // if(($news['news_datestamp'] >= $month_start && $news['news_datestamp'] <= $month_end) || (deftrue('BOOTSTRAP') && $news['news_datestamp'] >= $year_start && $news['news_datestamp'] <= $year_end))
{ {
$xday = date("j", $news['news_datestamp']); $xday = date("j", $news['news_datestamp']);
if (!isset($day_links[$xday]) || !$day_links[$xday]) if (!isset($day_links[$xday]) || !$day_links[$xday])
@@ -158,7 +158,7 @@ if(false === $cached)
*/ */
if(deftrue('e_BOOTSTRAP')) // v2.x if(deftrue('BOOTSTRAP')) // v2.x
{ {
$month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini " href="#blogCalendar" data-slide="prev"></a> $month_selector = '<div class="btn-group pull-right"><a class="btn btn-mini " href="#blogCalendar" data-slide="prev"></a>
<a class="btn btn-mini" href="#blogCalendar" data-slide="next"></a></div>'; <a class="btn btn-mini" href="#blogCalendar" data-slide="next"></a></div>';

View File

@@ -138,7 +138,7 @@ function calendar($req_day, $req_month, $req_year, $links = NULL, $ws = "sunday"
// $calendar .= "tablerow = ".$tablerow; // $calendar .= "tablerow = ".$tablerow;
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$active = date("n") == $req_month ? 'active' : ''; $active = date("n") == $req_month ? 'active' : '';
$text = "<div class='item {$active}'>"; $text = "<div class='item {$active}'>";

View File

@@ -216,7 +216,7 @@ if (!isset($FORUM_MAIN_START))
include(e_PLUGIN.'forum/templates/forum_template.php'); include(e_PLUGIN.'forum/templates/forum_template.php');
if(is_array($FORUM_TEMPLATE) && (e_BOOTSTRAP === true)) // new v2.x format. if(is_array($FORUM_TEMPLATE) && (BOOTSTRAP === true)) // new v2.x format.
{ {
$FORUM_MAIN_START = $FORUM_TEMPLATE['main-start']; $FORUM_MAIN_START = $FORUM_TEMPLATE['main-start'];

View File

@@ -514,7 +514,7 @@ if (!vartrue($FORUMPOST))
} }
} }
if(isset($FORUMPOST_TEMPLATE) && (e_BOOTSTRAP === true)) if(isset($FORUMPOST_TEMPLATE) && (BOOTSTRAP === true))
{ {
$FORUMPOST = $FORUMPOST_TEMPLATE['form']; $FORUMPOST = $FORUMPOST_TEMPLATE['form'];
$FORUMPOST_REPLY = $FORUMPOST_TEMPLATE['form']; $FORUMPOST_REPLY = $FORUMPOST_TEMPLATE['form'];

View File

@@ -88,7 +88,7 @@ if (!vartrue($FORUM_VIEW_START))
} }
if(is_array($FORUM_VIEWFORUM_TEMPLATE) && (e_BOOTSTRAP === true)) // New v2.x bootstrap Template. if(is_array($FORUM_VIEWFORUM_TEMPLATE) && (BOOTSTRAP === true)) // New v2.x bootstrap Template.
{ {
$FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start']; $FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start'];
@@ -187,7 +187,7 @@ if($forum->checkPerm($forumId, 'post'))
$fVars->NEWTHREADBUTTONX = newthreadjump(e107::getUrl()->create('forum/thread/new', array('id' => $forumId))); // "<a class='btn btn-primary' href='".."'>New Thread</a>"; $fVars->NEWTHREADBUTTONX = newthreadjump(e107::getUrl()->create('forum/thread/new', array('id' => $forumId))); // "<a class='btn btn-primary' href='".."'>New Thread</a>";
} }
if(e_BOOTSTRAP !== true) if(BOOTSTRAP !== true)
{ {
$fVars->NEWTHREADBUTTONX = $fVars->NEWTHREADBUTTON; $fVars->NEWTHREADBUTTONX = $fVars->NEWTHREADBUTTON;
} }
@@ -578,7 +578,7 @@ function parse_thread($thread_info)
$_TEMPLATE = "<tr id='thread-{$threadId}'>".substr($_TEMPLATE,4); $_TEMPLATE = "<tr id='thread-{$threadId}'>".substr($_TEMPLATE,4);
} }
if(e_BOOTSTRAP !== true) if(BOOTSTRAP !== true)
{ {
$tVars->REPLIESX = $tVars->REPLIES; $tVars->REPLIESX = $tVars->REPLIES;
$tVars->VIEWSX = $tVars->VIEWS; $tVars->VIEWSX = $tVars->VIEWS;

View File

@@ -180,7 +180,7 @@ if (!vartrue($FORUMSTART))
// New in v2.x // New in v2.x
if(is_array($FORUM_VIEWTOPIC_TEMPLATE) && (e_BOOTSTRAP === true)) if(is_array($FORUM_VIEWTOPIC_TEMPLATE) && (BOOTSTRAP === true))
{ {
$FORUMSTART = $FORUM_VIEWTOPIC_TEMPLATE['start']; $FORUMSTART = $FORUM_VIEWTOPIC_TEMPLATE['start'];
$FORUMTHREADSTYLE = $FORUM_VIEWTOPIC_TEMPLATE['thread']; $FORUMTHREADSTYLE = $FORUM_VIEWTOPIC_TEMPLATE['thread'];

View File

@@ -144,7 +144,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
if(count($images) ) if(count($images) )
{ {
return (deftrue('e_BOOTSTRAP')) ? "<ul class='thumbnails'><li>".implode("</li><li>",$images)."</li></ul>" : implode("<br />",$images); return (deftrue('BOOTSTRAP')) ? "<ul class='thumbnails'><li>".implode("</li><li>",$images)."</li></ul>" : implode("<br />",$images);
} }

View File

@@ -782,7 +782,7 @@ class siteStats
} }
} }
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
return "<div class='text-right'>".e107::getForm()->button('statNav',$lk,'dropdown',$links[$action]['label'], array('align'=>'right','class'=>'btn-primary'))."</div>"; return "<div class='text-right'>".e107::getForm()->button('statNav',$lk,'dropdown',$links[$action]['label'], array('align'=>'right','class'=>'btn-primary'))."</div>";
} }
@@ -1973,7 +1973,7 @@ class siteStats
*/ */
function bar($percen, $val,$name) function bar($percen, $val,$name)
{ {
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
$text = e107::getForm()->progressBar($name,$percen); $text = e107::getForm()->progressBar($name,$percen);
} }

View File

@@ -17,7 +17,7 @@ if (defined("ICONPRINTPDF") && file_exists(THEME."images/".ICONPRINTPDF))
} }
else else
{ {
$icon = deftrue('e_BOOTSTRAP') ? "<i class='icon-book'></i>" : "<img src='".e_PLUGIN_ABS."pdf/images/pdf_16.png' style='border:0' alt='{$parms[0]}' title='{$parms[0]}' />"; $icon = deftrue('BOOTSTRAP') ? "<i class='icon-book'></i>" : "<img src='".e_PLUGIN_ABS."pdf/images/pdf_16.png' style='border:0' alt='{$parms[0]}' title='{$parms[0]}' />";
} }
return " <a href='".e_PLUGIN_ABS."pdf/pdf.php?{$parms[1]}'>".$icon."</a>"; return " <a href='".e_PLUGIN_ABS."pdf/pdf.php?{$parms[1]}'>".$icon."</a>";

View File

@@ -376,7 +376,7 @@ class poll
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
if($type == 'forum') if($type == 'forum')
@@ -561,7 +561,7 @@ class poll
function generateBar($perc) function generateBar($perc)
{ {
if(e_BOOTSTRAP === true) if(BOOTSTRAP === true)
{ {
return "<div class='progress'> return "<div class='progress'>
<div class='bar' style='width: ".intval($perc)."%;'></div> <div class='bar' style='width: ".intval($perc)."%;'></div>

View File

@@ -3,7 +3,7 @@ if ( ! defined('e107_INIT')) { exit(); }
/* /*
* This is a 100% Pure Bootstrap Theme for e107 v2 * This is a 100% Pure Bootstrap Theme for e107 v2
*/ */
define('BOOTSTRAP',true);
define("VIEWPORT", "width=device-width, initial-scale=1.0"); define("VIEWPORT", "width=device-width, initial-scale=1.0");
define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >'); define("BODYTAG", '<body data-spy="scroll" data-target=".bs-docs-sidebar" >');

View File

@@ -93,7 +93,7 @@ if (!USER || getperms('0'))
$sc = e107::getScBatch('login'); $sc = e107::getScBatch('login');
if((e_BOOTSTRAP === true) && isset($LOGIN_TEMPLATE['page'])) if((BOOTSTRAP === true) && isset($LOGIN_TEMPLATE['page']))
{ {
$LOGIN_TABLE_HEADER = $LOGIN_TEMPLATE['page']['header']; $LOGIN_TABLE_HEADER = $LOGIN_TEMPLATE['page']['header'];
$LOGIN_TABLE = "<form class='form-signin' method='post' action='".e_SELF."' onsubmit='hashLoginPassword(this)' >".$LOGIN_TEMPLATE['page']['body']."</form>"; $LOGIN_TABLE = "<form class='form-signin' method='post' action='".e_SELF."' onsubmit='hashLoginPassword(this)' >".$LOGIN_TEMPLATE['page']['body']."</form>";

View File

@@ -640,7 +640,7 @@ if ($dataToSave && !$promptPassword)
{ {
$message = str_replace("{MESSAGE}",$message,$USERSETTINGS_MESSAGE); $message = str_replace("{MESSAGE}",$message,$USERSETTINGS_MESSAGE);
} }
elseif(!deftrue('e_BOOTSTRAP')) // backwards compatible elseif(!deftrue('BOOTSTRAP')) // backwards compatible
{ {
$message = "<div style='text-align:center'>".$message.'</div>'; $message = "<div style='text-align:center'>".$message.'</div>';
@@ -692,7 +692,7 @@ if($testSessionMessage) $message = implode('<br />', $testSessionMessage); // we
if (isset($message)) if (isset($message))
{ {
if(deftrue('e_BOOTSTRAP')) if(deftrue('BOOTSTRAP'))
{ {
echo e107::getMessage()->addInfo($message)->render(); echo e107::getMessage()->addInfo($message)->render();
} }