xoops forums

sugar

Just popping in
Posted on: 2010/3/22 9:47
sugar
sugar (Show more)
Just popping in
Posts: 26
Since: 2003/8/24
#1

Xoops module header rewrite handler

download here
http://xoops-rb-framework.googlecode.com/files/class.load.php


after (need $xoopsTpl or $xoTheme)
include_once $GLOBALS['xoops']->path('header.php');
OR
include_once XOOPS_ROOT_PATH.'/header.php';

use
include_once XOOPS_ROOT_PATH.'/(Frameworks/rb/)class.load.php';
$handler = new RbLoad();
$handler // Method Chaining
->setApiKey('GOOGLE_API_KEY')
->
setLibrary('jquery''1.4.2')
->
setBaseUrl(XOOPS_URL.'/Frameworks/jquery')
->
loadJs('001.js')
->
loadJs('002.js')
->
loadCss('001.css')
->
loadCss('002.css')
->
loadPlugin('captify')
->
rewrite();


output
<!-- Google AJAX Libraries -->
<
script type="text/javascript" src="http://www.google.com/jsapi?key=GOOGLE_API_KEY"></script>
<
script type="text/javascript">
//<![CDATA[
google.load('jquery''1.4.2');
//]]>
</script>
<
script type="text/javascript" src="http://XOOPS_URL/Frameworks/jquery/001.js"></script>
<
script type="text/javascript" src="http://XOOPS_URL/Frameworks/jquery/002.js"></script>
<
link rel="stylesheet" type="text/css" href="http://XOOPS_URL/Frameworks/jquery/001.css" />
<
link rel="stylesheet" type="text/css" href="http://XOOPS_URL/Frameworks/jquery/002.css" />
<
link rel="stylesheet" type="text/css" href="http://XOOPS_URL/Frameworks/jquery/captify/captify.css" />
<
script type="text/javascript" src="http://XOOPS_URL/Frameworks/jquery/captify/captify.js"></script>


to your theme "xoops_module_header"
different $xoTheme it's load files by your code order
loadPlugin() very simple to load a lot of files