mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
JS-Manager: Fix for CDN URLs containing the '|' character. Minor theme fixes.
This commit is contained in:
parent
aea0fd2e53
commit
36f57d805b
@ -217,6 +217,9 @@ class e_jsmanager
|
||||
|
||||
protected $_cache_enabled = false;
|
||||
|
||||
|
||||
protected $_sep = '#|#';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -949,25 +952,25 @@ class e_jsmanager
|
||||
{
|
||||
case 'core':
|
||||
// added direct CDN support
|
||||
$file_path = (strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path)."|{$pre}|{$post}";
|
||||
$file_path = (strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path).$this->_sep.$pre.$this->_sep.$post;
|
||||
$registry = &$this->_e_jslib_core;
|
||||
break;
|
||||
|
||||
case 'plugin':
|
||||
$file_path = explode(':', $file_path);
|
||||
$file_path = '{e_PLUGIN}'.$file_path[0].'/'.trim($file_path[1], '/')."|{$pre}|{$post}";
|
||||
$file_path = '{e_PLUGIN}'.$file_path[0].'/'.trim($file_path[1], '/').$this->_sep.$pre.$this->_sep.$post;
|
||||
$registry = &$this->_e_jslib_plugin;
|
||||
break;
|
||||
|
||||
case 'theme':
|
||||
$file_path = '{e_THEME}'.$this->getCurrentTheme().'/'.trim($file_path, '/')."|{$pre}|{$post}";
|
||||
$file_path = '{e_THEME}'.$this->getCurrentTheme().'/'.trim($file_path, '/').$this->_sep.$pre.$this->_sep.$post;
|
||||
//echo "file-Path = ".$file_path;
|
||||
$registry = &$this->_e_jslib_theme;
|
||||
break;
|
||||
|
||||
case 'core_css': //FIXME - core CSS should point to new e_WEB/css; add one more case - js_css -> e_WEB/jslib/
|
||||
// added direct CDN support
|
||||
$file_path = $runtime_location.'|'.(strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path)."|{$pre}|{$post}";
|
||||
$file_path = $runtime_location.$this->_sep.(strpos($file_path, 'http') !== 0 && strpos($file_path, '//') !== 0 ? '{e_WEB_JS}'.trim($file_path, '/') : $file_path).$this->_sep.$pre.$this->_sep.$post;
|
||||
if(!isset($this->_e_css['core'])) $this->_e_css['core'] = array();
|
||||
$registry = &$this->_e_css['core'];
|
||||
$runtime = true;
|
||||
@ -975,21 +978,21 @@ class e_jsmanager
|
||||
|
||||
case 'plugin_css':
|
||||
$file_path = explode(':', $file_path);
|
||||
$file_path = $runtime_location.'|{e_PLUGIN}'.$file_path[0].'/'.trim($file_path[1], '/')."|{$pre}|{$post}";
|
||||
$file_path = $runtime_location.$this->_sep.'{e_PLUGIN}'.$file_path[0].'/'.trim($file_path[1], '/').$this->_sep.$pre.$this->_sep.$post;
|
||||
if(!isset($this->_e_css['plugin'])) $this->_e_css['plugin'] = array();
|
||||
$registry = &$this->_e_css['plugin'];
|
||||
$runtime = true;
|
||||
break;
|
||||
|
||||
case 'theme_css':
|
||||
$file_path = $runtime_location.'|{e_THEME}'.$this->getCurrentTheme().'/'.trim($file_path, '/')."|{$pre}|{$post}";
|
||||
$file_path = $runtime_location.$this->_sep.'{e_THEME}'.$this->getCurrentTheme().'/'.trim($file_path, '/').$this->_sep.$pre.$this->_sep.$post;
|
||||
if(!isset($this->_e_css['theme'])) $this->_e_css['theme'] = array();
|
||||
$registry = &$this->_e_css['theme'];
|
||||
$runtime = true;
|
||||
break;
|
||||
|
||||
case 'other_css':
|
||||
$file_path = $runtime_location.'|'.$tp->createConstants($file_path, 'mix')."|{$pre}|{$post}";
|
||||
$file_path = $runtime_location.$this->_sep.$tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
||||
if(!isset($this->_e_css['other'])) $this->_e_css['other'] = array();
|
||||
$registry = &$this->_e_css['other'];
|
||||
$runtime = true;
|
||||
@ -1003,7 +1006,7 @@ class e_jsmanager
|
||||
|
||||
|
||||
case 'header':
|
||||
$file_path = $tp->createConstants($file_path, 'mix')."|{$pre}|{$post}";
|
||||
$file_path = $tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
||||
$zone = intval($runtime_location);
|
||||
if($zone > 5 || $zone < 1)
|
||||
{
|
||||
@ -1018,7 +1021,7 @@ class e_jsmanager
|
||||
break;
|
||||
|
||||
case 'footer':
|
||||
$file_path = $tp->createConstants($file_path, 'mix')."|{$pre}|{$post}";
|
||||
$file_path = $tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
||||
$zone = intval($runtime_location);
|
||||
if($zone > 5 || $zone < 1)
|
||||
{
|
||||
@ -1277,7 +1280,7 @@ class e_jsmanager
|
||||
{
|
||||
if('css' === $external)
|
||||
{
|
||||
$path = explode('|', $path, 4);
|
||||
$path = explode($this->_sep, $path, 4);
|
||||
$media = $path[0] ? $path[0] : 'all';
|
||||
// support of IE checks
|
||||
$pre = varset($path[2]) ? $path[2]."\n" : '';
|
||||
@ -1297,7 +1300,7 @@ class e_jsmanager
|
||||
{
|
||||
if(strpos($path, 'http') === 0 || strpos($path, '//') === 0) continue; // not allowed
|
||||
|
||||
$path = explode('|', $path, 3);
|
||||
$path = explode($this->_sep, $path, 3);
|
||||
$pre = varset($path[1], '');
|
||||
if($pre) $pre .= "\n";
|
||||
$post = varset($path[2], '');
|
||||
@ -1327,7 +1330,7 @@ class e_jsmanager
|
||||
|
||||
if('css' === $external)
|
||||
{
|
||||
$path = explode('|', $path, 4);
|
||||
$path = explode($this->_sep, $path, 4);
|
||||
$media = $path[0];
|
||||
// support of IE checks
|
||||
$pre = varset($path[2]) ? $path[2]."\n" : '';
|
||||
@ -1348,7 +1351,7 @@ class e_jsmanager
|
||||
continue;
|
||||
}
|
||||
|
||||
$path = explode('|', $path, 4);
|
||||
$path = explode($this->_sep, $path, 4);
|
||||
$pre = varset($path[1], '');
|
||||
if($pre) $pre .= "\n";
|
||||
$post = varset($path[2], '');
|
||||
|
@ -82,7 +82,8 @@ $NEWS_TEMPLATE['default']['item'] = '
|
||||
|
||||
$NEWS_TEMPLATE['default']['item'] = '
|
||||
{SETIMAGE: w=900&h=300}
|
||||
<h2>{NEWSTITLELINK}</h2>
|
||||
<div class="default-item">
|
||||
<h2 class="news-title">{NEWSTITLELINK}</h2>
|
||||
<p class="lead">{GLYPH=user} {NEWSAUTHOR}</p>
|
||||
<hr>
|
||||
<div class="row">
|
||||
@ -102,7 +103,7 @@ $NEWS_TEMPLATE['default']['item'] = '
|
||||
<div class="options">
|
||||
<div class="btn-group hidden-print">{NEWSCOMMENTLINK: glyph=comments&class=btn btn-default}{PRINTICON: class=btn btn-default}{PDFICON}{SOCIALSHARE}{ADMINOPTIONS: class=btn btn-default}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
|
@ -83,11 +83,8 @@ class social_shortcodes extends e_shortcode
|
||||
if($data['href'] != '')
|
||||
{
|
||||
|
||||
$text .= '<a rel="external" href="'.$data['href'].'" class="e-tip social-icon social-'.$id.'" title="'.$data['title'].'">
|
||||
<span class="fa fa-'.$id.' '.$class.'"></span>
|
||||
</a>';
|
||||
|
||||
$text .= "\n";
|
||||
$text .= '<a rel="external" href="'.$data['href'].'" class="e-tip social-icon social-'.$id.'" title="'.$data['title'].'"><span class="fa fa-'.$id.' '.$class.'"></span></a>';
|
||||
$text .= "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,13 +269,15 @@ class social_shortcodes extends e_shortcode
|
||||
if(vartrue($parm['dropdown']))
|
||||
{
|
||||
$dir = ($parm['dropdown'] == 'right') ? 'pull-right' : '';
|
||||
|
||||
$class = varset($parm['class'],'btn-group');
|
||||
|
||||
|
||||
$text = '<div class="btn-group hidden-print '.$dir.'">
|
||||
<a class="e-tip btn btn-dropdown btn-default btn-'.$size.' dropdown-toggle" data-toggle="dropdown" href="#" title="Share">'.$label.'</a>
|
||||
|
||||
<ul class="dropdown-menu" role="menu" style="min-width:435px">
|
||||
|
||||
<li><div class="btn-group" style="padding-left: 7px;">'.implode("\n",$opt).'</div></li>
|
||||
<li><div class="'.$class.'" style="padding-left: 7px;">'.implode("\n",$opt).'</div></li>
|
||||
</ul>
|
||||
</div>';
|
||||
|
||||
@ -287,10 +286,9 @@ class social_shortcodes extends e_shortcode
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
return '<div class="btn-group text-center hidden-print">'.implode("\n",$opt)."</div>";
|
||||
$class = varset($parm['class'],'btn-group');
|
||||
|
||||
return '<div class="'.$class.' text-center hidden-print">'.implode("\n",$opt)."</div>";
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user