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

sync developers work

This commit is contained in:
secretr
2012-05-14 06:58:59 +00:00
parent 375a194e2f
commit 9bd53420f5

View File

@@ -1348,7 +1348,7 @@ class e107
}
/**
* Proxy method for easy js registering. Prefered is shortcode script path
* JS Common Public Function. Prefered is shortcode script path
* @param string $type core|theme|footer|inline|footer-inline|url or any existing plugin_name
* @param string $data depends on the type - path/url or inline js source
* @param integer $zone [optional] leave it null for default zone
@@ -1397,6 +1397,7 @@ class e107
// $type is plugin name
default:
// data is e.g. 'jslib/myplug.js'
if(!$this->isInstalled($type)) return;
if(null !== $zone) $jshandler->requirePluginLib($type, $data, $zone);
else $jshandler->requirePluginLib($type, $data);
break;
@@ -1404,7 +1405,7 @@ class e107
}
/**
* Proxy method for easy css registering
* CSS Common Public Function. Prefered is shortcode script path
* @param string $type core|theme|footer|inline|footer-inline|url or any existing plugin_name
* @param string $data depends on the type - path/url or inline js source
* @param string $media any valid media attribute string - http://www.w3schools.com/TAGS/att_link_media.asp
@@ -1439,7 +1440,7 @@ class e107
// $type is plugin name
default:
// data is e.g. 'css/myplug.css'
$jshandler->pluginCSS($type, $data, $media, $preComment, $postComment);
if($this->isInstalled($type)) $jshandler->pluginCSS($type, $data, $media, $preComment, $postComment);
break;
}
}
@@ -1467,88 +1468,6 @@ class e107
{
return e107::getUrl()->response()->addMeta($name, $content, $extended);
}
/**
* CSS Common Public Function
* @var string $type - core | inline | theme | other | (plugin folder name)
*/
public static function css($type = null, $file_path = null, $media = 'all', $preComment = '', $postComment = '')
{
if($type == 'core')
{
return e107::getJs()->coreCSS($file_path, $media, $preComment, $postComment);
}
if($type == 'inline')
{
return e107::getJs()->inlineCSS($file_path, $media);
}
if($type == 'theme')
{
return e107::getJs()->themeCSS($file_path, $media, $preComment, $postComment);
}
if($type == 'other')
{
return e107::getJs()->otherCSS($file_path, $media, $preComment, $postComment);
}
if($this->isInstalled($type)) // plugin
{
return e107::getJs()->pluginCSS($type, $file_path, $media, $preComment, $postComment);
}
}
/**
* JS Common Public Function
* @var string $type - core | file | header_inline | footer | footer_inline | theme | (plugin folder name)
*/
public static function js($type, $file_path ='', $zone='')
{
if($type == 'core')
{
if(empty($zone)){ $zone = 2; }
return e107::getJs()->headerCore($file_path, $zone);
}
if($type == 'file' || $type == 'header')
{
if(empty($zone)){ $zone = 5; }
e107::getJs()->headerFile($file_path, $zone);
}
if($type == 'header_inline')
{
if(empty($zone)){ $zone = 5; }
e107::getJs()->headerInline($file_path, $zone);
}
if($type == 'footer_inline')
{
if(empty($zone)){ $zone = 5; }
e107::getJs()->footerInline($file_path, $zone);
}
if($type == 'footer')
{
if(empty($zone)){ $zone = 2; }
e107::getJs()->footerFile($file_path, $zone);
}
if($type=='theme')
{
if(empty($zone)){ $zone = 5; }
return e107::getJs()->headerTheme($file_path, $zone);
}
if($this->isInstalled($type)) // plugin
{
return e107::getJs()->headerPlugin($type, $file_path);
}
}
/**
* Retrieve admin dispatcher instance.