mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Support for Bootstrap5. Clear cache in theme manager when choosing themes.
This commit is contained in:
parent
e595c0841a
commit
10ad436e28
@ -651,6 +651,7 @@ class theme_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
public function ChoosePage()
|
public function ChoosePage()
|
||||||
{
|
{
|
||||||
|
e107::getTheme()->clearCache();
|
||||||
return $this->GridPage();
|
return $this->GridPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,7 +738,7 @@ class theme_admin_tree_model extends e_tree_model
|
|||||||
foreach($themeList as $k=>$v)
|
foreach($themeList as $k=>$v)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!empty($parms['searchqry']) && stripos($v['description'],$parms['searchqry']) === false && stripos($v['folder'],$parms['searchqry']) === false && stripos($v['name'],$parms['searchqry']) === false)
|
if(!empty($parms['searchqry']) && stripos($v['info'],$parms['searchqry']) === false && stripos($v['folder'],$parms['searchqry']) === false && stripos($v['name'],$parms['searchqry']) === false)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -3079,7 +3079,7 @@ class e107
|
|||||||
* @param boolean $override see {@link getThemeInfo()}
|
* @param boolean $override see {@link getThemeInfo()}
|
||||||
* @param boolean $merge merge theme with plugin templates, default is false
|
* @param boolean $merge merge theme with plugin templates, default is false
|
||||||
* @param boolean $info retrieve template info only
|
* @param boolean $info retrieve template info only
|
||||||
* @return string|array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getTemplate($plug_name, $id = null, $key = null, $override = true, $merge = false, $info = false)
|
public static function getTemplate($plug_name, $id = null, $key = null, $override = true, $merge = false, $info = false)
|
||||||
{
|
{
|
||||||
@ -3113,7 +3113,7 @@ class e107
|
|||||||
|
|
||||||
if($merge === false || $override === false)
|
if($merge === false || $override === false)
|
||||||
{
|
{
|
||||||
return ($ret === false) ? '' : $ret;
|
return ($ret === false) ? array() : $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// merge
|
// merge
|
||||||
@ -3131,7 +3131,7 @@ class e107
|
|||||||
|
|
||||||
if($ret === false)
|
if($ret === false)
|
||||||
{
|
{
|
||||||
return '';
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (is_array($ret_plug) ? array_merge($ret_plug, $ret) : $ret);
|
return (is_array($ret_plug) ? array_merge($ret_plug, $ret) : $ret);
|
||||||
|
@ -285,6 +285,108 @@ class core_library
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------- Bootstrap 5 ---------------------------//
|
||||||
|
|
||||||
|
// Bootstrap (CDN).
|
||||||
|
$libraries['cdn.bootstrap5'] = array(
|
||||||
|
'name' => 'Bootstrap 5 (CDN)',
|
||||||
|
'vendor_url' => 'http://getbootstrap.com/',
|
||||||
|
'version_arguments' => array(
|
||||||
|
'file' => 'dist/js/bootstrap.min.js',
|
||||||
|
'pattern' => '/Bootstrap\s+v(\d\.\d\.\d+)/',
|
||||||
|
'lines' => 5,
|
||||||
|
),
|
||||||
|
'files' => array(
|
||||||
|
'js' => array(
|
||||||
|
'dist/js/bootstrap.bundle.min.js' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
'type' => 'footer',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'css' => array(
|
||||||
|
'dist/css/bootstrap.min.css' => array(
|
||||||
|
'zone' => 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'variants' => array(
|
||||||
|
// 'unminified' version for debugging.
|
||||||
|
/*'dev' => array(
|
||||||
|
'files' => array(
|
||||||
|
'js' => array(
|
||||||
|
'js/bootstrap.js' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
'type' => 'footer',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'css' => array(
|
||||||
|
'css/bootstrap.css' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),*/
|
||||||
|
|
||||||
|
|
||||||
|
),
|
||||||
|
// Override library path to CDN.
|
||||||
|
//https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css
|
||||||
|
'library_path' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1',
|
||||||
|
'path' => '',
|
||||||
|
'version' => '5.0.0',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Bootstrap (local).
|
||||||
|
$libraries['bootstrap5'] = array(
|
||||||
|
'name' => 'Bootstrap 5 (local)',
|
||||||
|
'vendor_url' => 'http://getbootstrap.com/',
|
||||||
|
'version_arguments' => array(
|
||||||
|
'file' => 'js/bootstrap.bundle.min.js',
|
||||||
|
'pattern' => '/Bootstrap\s+v(\d\.\d\.\d+)/',
|
||||||
|
'lines' => 5,
|
||||||
|
),
|
||||||
|
'files' => array(
|
||||||
|
'js' => array(
|
||||||
|
'js/bootstrap.bundle.min.js' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
'type' => 'footer',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'css' => array(
|
||||||
|
'css/bootstrap.min.css' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
/* 'variants' => array(
|
||||||
|
// 'unminified' version for debugging.
|
||||||
|
'dev' => array(
|
||||||
|
'files' => array(
|
||||||
|
'js' => array(
|
||||||
|
'js/bootstrap.bundle.js' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
'type' => 'footer',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'css' => array(
|
||||||
|
'css/bootstrap.css' => array(
|
||||||
|
'zone' => 2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),*/
|
||||||
|
'library_path' => '{e_WEB}lib/bootstrap',
|
||||||
|
'path' => '5',
|
||||||
|
'version' => '5.0.0',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------- Bootstrap 4 ---------------------------//
|
// ----------------- Bootstrap 4 ---------------------------//
|
||||||
|
|
||||||
|
@ -64,7 +64,13 @@ class social_shortcodes extends e_shortcode
|
|||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
$tmpl = !empty($parm['template']) ? $parm['template'] : 'default';
|
$tmpl = !empty($parm['template']) ? $parm['template'] : 'default';
|
||||||
|
|
||||||
$template = e107::getTemplate('social','social_xurl',$tmpl);
|
$template = e107::getTemplate('social','social_xurl', $tmpl);
|
||||||
|
|
||||||
|
if(empty($template)) // backup if the theme changes.
|
||||||
|
{
|
||||||
|
$template = e107::getTemplate('social','social_xurl', 'default');
|
||||||
|
// return (ADMIN) ? "Unable to load social template [".$tmpl."]" : ''; // NO LAN
|
||||||
|
}
|
||||||
|
|
||||||
$social = array(
|
$social = array(
|
||||||
'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url'=>'news')) : ''), 'title'=>'RSS/Atom Feed'),
|
'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url'=>'news')) : ''), 'title'=>'RSS/Atom Feed'),
|
||||||
|
7
e107_web/lib/bootstrap/5/css/bootstrap.min.css
vendored
Normal file
7
e107_web/lib/bootstrap/5/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
e107_web/lib/bootstrap/5/js/bootstrap.bundle.min.js
vendored
Normal file
7
e107_web/lib/bootstrap/5/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user