mirror of
https://github.com/e107inc/e107.git
synced 2025-09-01 18:32:44 +02:00
updated themes to use e107::library(). e107::getCache()->clearAll() now accepts 'library' as an option.
This commit is contained in:
@@ -43,4 +43,9 @@
|
||||
</menuPresets>
|
||||
</layout>
|
||||
</layouts>
|
||||
<themePrefs>
|
||||
<pref name='branding'>sitename</pref>
|
||||
<pref name='nav_alignment'>right</pref>
|
||||
<pref name='usernav_placement'>top</pref>
|
||||
</themePrefs>
|
||||
</e107Theme>
|
@@ -14,7 +14,6 @@ class theme_config implements e_theme_config
|
||||
$brandingOpts = array('sitename'=>LAN_THEMEPREF_04, 'logo' => LAN_THEMEPREF_05, 'sitenamelogo'=>LAN_THEMEPREF_06);
|
||||
|
||||
$bootswatch = array(
|
||||
// '' => LAN_DEFAULT,
|
||||
"cerulean"=> 'Cerulean',
|
||||
"cosmo"=> 'Cosmo',
|
||||
"cyborg"=> 'Cyborg',
|
||||
@@ -40,7 +39,7 @@ class theme_config implements e_theme_config
|
||||
'branding' => array('title'=>LAN_THEMEPREF_00, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> $brandingOpts)),
|
||||
'nav_alignment' => array('title'=>LAN_THEMEPREF_01, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> array('left'=> LAN_THEMEPREF_07,'right'=> LAN_THEMEPREF_08))),
|
||||
'usernav_placement' => array('title'=>LAN_THEMEPREF_02, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> array('top'=> LAN_THEMEPREF_09, 'bottom'=> LAN_THEMEPREF_10))),
|
||||
'bootswatch' => array('title'=>LAN_THEMEPREF_03, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> $bootswatch, 'post'=>$previewLink)),
|
||||
'bootswatch' => array('title'=>LAN_THEMEPREF_03, 'type'=>'dropdown', 'writeParms'=>array('optArray'=> $bootswatch, 'post'=>$previewLink, 'default'=>LAN_DEFAULT)),
|
||||
);
|
||||
|
||||
return $fields;
|
||||
|
@@ -34,7 +34,7 @@ class theme_library
|
||||
{
|
||||
$bootswatch = e107::pref('theme', 'bootswatch', false);
|
||||
|
||||
if($bootswatch)
|
||||
if(!empty($bootswatch))
|
||||
{
|
||||
// Disable Bootstrap CSS.
|
||||
unset($libraries['cdn.bootstrap']['files']['css']);
|
||||
|
@@ -15,13 +15,16 @@ define('VIEWPORT', "width=device-width, initial-scale=1.0");
|
||||
e107::lan('theme');
|
||||
|
||||
$cndPref = e107::pref('theme', 'cdn','cdnjs');
|
||||
|
||||
e107::library('load', 'bootstrap');
|
||||
e107::library('load', 'fontawesome');
|
||||
|
||||
switch($cndPref)
|
||||
{
|
||||
case "jsdelivr":
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.min.css');
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css');
|
||||
e107::js("footer", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery');
|
||||
// e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.7/css/bootstrap.min.css');
|
||||
// e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css');
|
||||
// e107::js("footer", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery');
|
||||
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js", 'jquery');
|
||||
|
||||
|
||||
@@ -32,9 +35,9 @@ switch($cndPref)
|
||||
break; */
|
||||
case "cdnjs":
|
||||
default:
|
||||
e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css');
|
||||
e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
|
||||
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js", 'jquery', 2);
|
||||
// e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css');
|
||||
// e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
|
||||
// e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js", 'jquery', 2);
|
||||
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js", 'jquery', 2);
|
||||
|
||||
|
||||
|
@@ -46,4 +46,7 @@
|
||||
<glyphicons>
|
||||
<glyph name='ionicons' pattern='\.(ion-[a-z-]*):before\{' path='css/ionicons.min.css' prefix='ion-' tag='i' />
|
||||
</glyphicons>
|
||||
<themePrefs>
|
||||
<pref name='usernav_placement'>top</pref>
|
||||
</themePrefs>
|
||||
</e107Theme>
|
@@ -4,7 +4,6 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
e107::lan('theme', 'admin',true);
|
||||
|
||||
// Dummy Theme Configuration File.
|
||||
class theme_config implements e_theme_config
|
||||
{
|
||||
|
||||
@@ -23,8 +22,8 @@ class theme_config implements e_theme_config
|
||||
'videomobilebackground' => array('title' => LAN_LZ_THEMEPREF_01, 'type'=>'image', 'help'=>''),
|
||||
'videoposter' => array('title' => LAN_LZ_THEMEPREF_02, 'type'=>'image', 'help'=>''),
|
||||
'videourl' => array('title' => LAN_LZ_THEMEPREF_03, 'type'=>'text', 'writeParms'=>array('size'=>'xxlarge'),'help'=>''),
|
||||
'usernav_placement' => array('title' => LAN_LZ_THEMEPREF_04, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array(LAN_LZ_THEMEPREF_05, LAN_LZ_THEMEPREF_06), 'useValues'=>1)),
|
||||
'cdn' => array('title' => 'CDN', 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array( 'cdnjs' => 'CDNJS (Cloudflare)', 'jsdelivr' => 'jsDelivr')))
|
||||
'usernav_placement' => array('title' => LAN_LZ_THEMEPREF_04, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array('top'=>LAN_LZ_THEMEPREF_05, 'bottom'=>LAN_LZ_THEMEPREF_06))),
|
||||
// 'cdn' => array('title' => 'CDN', 'type'=>'dropdown', 'writeParms'=>array('optArray'=>array( 'cdnjs' => 'CDNJS (Cloudflare)', 'jsdelivr' => 'jsDelivr')))
|
||||
);
|
||||
|
||||
return $fields;
|
||||
|
@@ -113,42 +113,45 @@ class theme_shortcodes extends e_shortcode
|
||||
|
||||
$text .= ' '.$sitedisclaimer;
|
||||
return e107::getParser()->toHtml($text, true, 'SUMMARY');
|
||||
}
|
||||
|
||||
function sc_xurl_icons() {
|
||||
$social = array(
|
||||
'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url'=>'news')) : ''), 'title'=>'RSS/Atom Feed'),
|
||||
'facebook' => array('href'=> deftrue('XURL_FACEBOOK'), 'title'=>'Facebook'),
|
||||
'twitter' => array('href'=> deftrue('XURL_TWITTER'), 'title'=>'Twitter'),
|
||||
'google' => array('href'=> deftrue('XURL_GOOGLE'), 'title'=>'Google Plus'),
|
||||
'linkedin' => array('href'=> deftrue('XURL_LINKEDIN'), 'title'=>'LinkedIn'),
|
||||
'github' => array('href'=> deftrue('XURL_GITHUB'), 'title'=>'Github'),
|
||||
'pinterest' => array('href'=> deftrue('XURL_PINTEREST'), 'title'=>'Pinterest'),
|
||||
'flickr' => array('href'=> deftrue('XURL_FLICKR'), 'title'=>'Flickr'),
|
||||
'instagram' => array('href'=> deftrue('XURL_INSTAGRAM'), 'title'=>'Instagram'),
|
||||
'youtube' => array('href'=> deftrue('XURL_YOUTUBE'), 'title'=>'YouTube'),
|
||||
'question-circle' => array('href'=> deftrue('XURL_VIMEO'), 'title'=>'e107 HELP')
|
||||
);
|
||||
|
||||
//Fixme - GooglePlus not working.
|
||||
}
|
||||
|
||||
$text = '';
|
||||
$textstart ='<ul class="list-inline lz-social-icons">';
|
||||
$textend = '</ul>';
|
||||
foreach($social as $id => $data)
|
||||
{
|
||||
if($data['href'] != '')
|
||||
{
|
||||
$text .= '
|
||||
<li><a rel="nofollow" target="_blank" href="'.$data['href'].'" title="'.$data['title'].'"><i class="icon-lg ion-social-'.$id.'-outline"></i></a> </li>';
|
||||
$text .= "\n";
|
||||
}
|
||||
}
|
||||
if($text !='')
|
||||
{
|
||||
return $textstart.$text.$textend;
|
||||
}
|
||||
}
|
||||
|
||||
//@todo Replace with social template.
|
||||
function sc_xurl_icons()
|
||||
{
|
||||
$social = array(
|
||||
'rss' => array('href' => (e107::isInstalled('rss_menu') ? e107::url('rss_menu', 'index', array('rss_url' => 'news')) : ''), 'title' => 'RSS/Atom Feed'),
|
||||
'facebook' => array('href' => deftrue('XURL_FACEBOOK'), 'title' => 'Facebook'),
|
||||
'twitter' => array('href' => deftrue('XURL_TWITTER'), 'title' => 'Twitter'),
|
||||
'google' => array('href' => deftrue('XURL_GOOGLE'), 'title' => 'Google Plus'),
|
||||
'linkedin' => array('href' => deftrue('XURL_LINKEDIN'), 'title' => 'LinkedIn'),
|
||||
'github' => array('href' => deftrue('XURL_GITHUB'), 'title' => 'Github'),
|
||||
'pinterest' => array('href' => deftrue('XURL_PINTEREST'), 'title' => 'Pinterest'),
|
||||
'flickr' => array('href' => deftrue('XURL_FLICKR'), 'title' => 'Flickr'),
|
||||
'instagram' => array('href' => deftrue('XURL_INSTAGRAM'), 'title' => 'Instagram'),
|
||||
'youtube' => array('href' => deftrue('XURL_YOUTUBE'), 'title' => 'YouTube'),
|
||||
'question-circle' => array('href' => deftrue('XURL_VIMEO'), 'title' => 'e107 HELP')
|
||||
);
|
||||
|
||||
//Fixme - GooglePlus not working.
|
||||
|
||||
$text = '';
|
||||
$textstart = '<ul class="list-inline lz-social-icons">';
|
||||
$textend = '</ul>';
|
||||
foreach($social as $id => $data)
|
||||
{
|
||||
if($data['href'] != '')
|
||||
{
|
||||
$text .= '
|
||||
<li><a rel="nofollow" target="_blank" href="' . $data['href'] . '" title="' . $data['title'] . '"><i class="icon-lg ion-social-' . $id . '-outline"></i></a> </li>';
|
||||
$text .= "\n";
|
||||
}
|
||||
}
|
||||
if($text != '')
|
||||
{
|
||||
return $textstart . $text . $textend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function sc_lz_subscribe()
|
||||
|
@@ -20,9 +20,14 @@ define('VIEWPORT', "width=device-width, initial-scale=1.0");
|
||||
// Warning: Some bootstrap CDNs are not compiled with popup.js
|
||||
// use https if e107 is using https.
|
||||
|
||||
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
|
||||
/*e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css');
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');*/
|
||||
|
||||
e107::library('load', 'bootstrap');
|
||||
e107::library('load', 'fontawesome');
|
||||
|
||||
|
||||
e107::css('url', 'http://fonts.googleapis.com/css?family=Bad+Script|Raleway:400,500,600,700,300|Lora:400');
|
||||
// e107::css('theme','voux.css');
|
||||
e107::css('url', 'http://fonts.googleapis.com/css?family=Montserrat:400,700&ver=4.2.4');
|
||||
|
Reference in New Issue
Block a user