mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Remove BOOTSTRAP and FONTAWESOME constants from bootstrap/theme.php
This commit is contained in:
@@ -157,9 +157,12 @@ class e_theme
|
|||||||
// If no scope set, we load library on both areas.
|
// If no scope set, we load library on both areas.
|
||||||
if(empty($library['scope']) || $library['scope'] === 'all')
|
if(empty($library['scope']) || $library['scope'] === 'all')
|
||||||
{
|
{
|
||||||
if($library['name'] === 'bootstrap' && varset($library['version']) == 4) // quick fix.
|
if($library['name'] === 'bootstrap' && !empty($library['version']))
|
||||||
{
|
{
|
||||||
$library['name'] .= (string) $library['version'];
|
if(intval($library['version']) > 3) // quick fix.
|
||||||
|
{
|
||||||
|
$library['name'] .= (string) $library['version'];
|
||||||
|
}
|
||||||
|
|
||||||
e107::getParser()->setBootstrap($library['version']);
|
e107::getParser()->setBootstrap($library['version']);
|
||||||
|
|
||||||
@@ -168,9 +171,12 @@ class e_theme
|
|||||||
define('BOOTSTRAP', (int) $library['version']);
|
define('BOOTSTRAP', (int) $library['version']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($library['name'] === 'fontawesome' && !empty($library['version'])) // quick fix.
|
elseif($library['name'] === 'fontawesome' && !empty($library['version']))
|
||||||
{
|
{
|
||||||
$library['name'] .= (string) $library['version'];
|
if(intval($library['version']) > 4) // quick fix.
|
||||||
|
{
|
||||||
|
$library['name'] .= (string) $library['version'];
|
||||||
|
}
|
||||||
|
|
||||||
e107::getParser()->setFontAwesome($library['version']);
|
e107::getParser()->setFontAwesome($library['version']);
|
||||||
|
|
||||||
|
@@ -16,8 +16,7 @@ if(!defined('e107_INIT'))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
define("BOOTSTRAP", 3);
|
|
||||||
define("FONTAWESOME", 4);
|
|
||||||
define('VIEWPORT', "width=device-width, initial-scale=1.0");
|
define('VIEWPORT', "width=device-width, initial-scale=1.0");
|
||||||
|
|
||||||
// CDN provider for Bootswatch.
|
// CDN provider for Bootswatch.
|
||||||
@@ -56,7 +55,13 @@ define('OTHERNEWS2_LIMIT', 3); // Limit to 3.
|
|||||||
define('COMMENTOFFSTRING', '');
|
define('COMMENTOFFSTRING', '');
|
||||||
|
|
||||||
define('PRE_EXTENDEDSTRING', '<br />');
|
define('PRE_EXTENDEDSTRING', '<br />');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class bootstrap3_theme
|
class bootstrap3_theme
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -66,111 +71,108 @@ class bootstrap3_theme
|
|||||||
* @param string $id : id of the current render
|
* @param string $id : id of the current render
|
||||||
* @param array $info : current style and other menu data.
|
* @param array $info : current style and other menu data.
|
||||||
*/
|
*/
|
||||||
|
function tablestyle($caption, $text, $id='', $info=array())
|
||||||
function tablestyle($caption, $text, $id='', $info=array())
|
{
|
||||||
{
|
|
||||||
// global $style; // no longer needed.
|
|
||||||
|
$style = $info['setStyle']; // global $style; // no longer needed.
|
||||||
$style = $info['setStyle'];
|
|
||||||
|
echo "<!-- tablestyle: style=".$style." id=".$id." -->\n\n";
|
||||||
echo "<!-- tablestyle: style=".$style." id=".$id." -->\n\n";
|
|
||||||
|
/*
|
||||||
$type = $style;
|
if($id == 'wm') // Example - If rendered from 'welcome message'
|
||||||
if(empty($caption))
|
{
|
||||||
{
|
$style = '';
|
||||||
$type = 'box';
|
}
|
||||||
}
|
|
||||||
|
if($id == 'featurebox') // Example - If rendered from 'featurebox'
|
||||||
if($style == 'navdoc' || $style == 'none')
|
{
|
||||||
{
|
$style = '';
|
||||||
echo $text;
|
}
|
||||||
return;
|
*/
|
||||||
}
|
|
||||||
|
switch($style)
|
||||||
/*
|
{
|
||||||
if($id == 'wm') // Example - If rendered from 'welcome message'
|
case "navdoc":
|
||||||
{
|
case "none":
|
||||||
|
|
||||||
}
|
echo $text;
|
||||||
|
|
||||||
if($id == 'featurebox') // Example - If rendered from 'featurebox'
|
break;
|
||||||
{
|
|
||||||
|
case "jumbotron":
|
||||||
}
|
|
||||||
*/
|
echo '<div class="jumbotron">
|
||||||
|
<div class="container">';
|
||||||
|
|
||||||
if($style == 'jumbotron')
|
if(!empty($caption))
|
||||||
{
|
{
|
||||||
echo '<div class="jumbotron">
|
echo '<h1>'.$caption.'</h1>';
|
||||||
<div class="container">';
|
}
|
||||||
if(!empty($caption))
|
|
||||||
{
|
echo '
|
||||||
echo '<h1>'.$caption.'</h1>';
|
'.$text.'
|
||||||
}
|
</div>
|
||||||
echo '
|
</div>';
|
||||||
'.$text.'
|
|
||||||
</div>
|
break;
|
||||||
</div>';
|
|
||||||
return;
|
case "col-md-4":
|
||||||
}
|
case "col-md-6":
|
||||||
|
case "col-md-8":
|
||||||
if($style == 'col-md-4' || $style == 'col-md-6' || $style == 'col-md-8')
|
|
||||||
{
|
echo ' <div class="col-xs-12 '.$style.'">';
|
||||||
echo ' <div class="col-xs-12 '.$style.'">';
|
|
||||||
|
if(!empty($caption))
|
||||||
if(!empty($caption))
|
{
|
||||||
{
|
echo '<h2>'.$caption.'</h2>';
|
||||||
echo '<h2>'.$caption.'</h2>';
|
}
|
||||||
}
|
|
||||||
|
echo '
|
||||||
echo '
|
'.$text.'
|
||||||
'.$text.'
|
</div>';
|
||||||
</div>';
|
|
||||||
return;
|
break;
|
||||||
|
|
||||||
}
|
|
||||||
|
case "menu":
|
||||||
if($style == 'menu')
|
|
||||||
{
|
echo '<div class="panel panel-default">
|
||||||
echo '<div class="panel panel-default">
|
<div class="panel-heading">'.$caption.'</div>
|
||||||
<div class="panel-heading">'.$caption.'</div>
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
'.$text.'
|
||||||
'.$text.'
|
</div>
|
||||||
</div>
|
</div>';
|
||||||
</div>';
|
|
||||||
return;
|
break;
|
||||||
|
|
||||||
}
|
|
||||||
|
case "portfolio":
|
||||||
if($style == 'portfolio')
|
|
||||||
{
|
echo '
|
||||||
echo '
|
<div class="col-lg-4 col-md-4 col-sm-6">
|
||||||
<div class="col-lg-4 col-md-4 col-sm-6">
|
'.$text.'
|
||||||
'.$text.'
|
</div>';
|
||||||
</div>';
|
|
||||||
return;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
// default.
|
|
||||||
|
if(!empty($caption))
|
||||||
if(!empty($caption))
|
{
|
||||||
{
|
echo '<h2 class="caption">'.$caption.'</h2>';
|
||||||
echo '<h2 class="caption">'.$caption.'</h2>';
|
}
|
||||||
}
|
|
||||||
|
echo $text;
|
||||||
echo $text;
|
// code to be executed if n is different from all labels;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
return;
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +190,7 @@ $NEWSCAT = "\n\n\n\n<!-- News Category -->\n\n\n\n
|
|||||||
|
|
||||||
|
|
||||||
$NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
|
$NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
|
||||||
<div style='width:100%;display:block'>
|
<div style='width:100%; display:block'>
|
||||||
<table style='width:100%'>
|
<table style='width:100%'>
|
||||||
<tr><td style='width:2px;vertical-align:middle'>• </td>
|
<tr><td style='width:2px;vertical-align:middle'>• </td>
|
||||||
<td style='text-align:left;height:10px'>
|
<td style='text-align:left;height:10px'>
|
||||||
@@ -196,4 +198,3 @@ $NEWSCAT_ITEM = "\n\n\n\n<!-- News Category Item -->\n\n\n\n
|
|||||||
</td></tr></table></div>
|
</td></tr></table></div>
|
||||||
";
|
";
|
||||||
|
|
||||||
?>
|
|
@@ -19,8 +19,8 @@
|
|||||||
<image>preview_frontend.png</image>
|
<image>preview_frontend.png</image>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<libraries>
|
<libraries>
|
||||||
<library name="bootstrap" scope="all"/>
|
<library name="bootstrap" version="3" scope="all"/>
|
||||||
<library name="fontawesome" scope="all"/>
|
<library name="fontawesome" version="4" scope="all"/>
|
||||||
<library name="bootstrap.editable" scope="admin"/>
|
<library name="bootstrap.editable" scope="admin"/>
|
||||||
</libraries>
|
</libraries>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
|
Reference in New Issue
Block a user