1
download here
http://xoops-rb-framework.googlecode.com/files/class.load.phpafter (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
<script type="text/javascript" src="http://www.google.com/jsapi?key=GOOGLE_API_KEY">script>
<script type="text/javascript">
//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