From XavierS:
http://xoops.org/modules/newbb/viewtopic.php?post_id=344695#forumpost344695
could you send this very small hack to the core team
to correct a lot of pb about order script and css loading in theme
( i think, it's also an open way for switching to a mobile theme)
Quote:
function xoInit($options = array()){
.....
$GLOBALS['xoopsTpl'] =& $this->template;
//to control order of loading JS and CSS
if (file_exists($this->path ."/theme_onload.php"))
include_once($this->path ."/theme_onload.php");
<?
global $xoTheme;
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/ui/jquery.ui.core.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/ui/jquery.ui.draggable.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/ui/jquery.ui.resizable.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.metadata.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/styleswitch.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/jquery.hoverIntent.js');
$xoTheme->addScript('browse.php?Frameworks/jquery/mbTooltip.js');
$xoTheme->addStyleSheet('xoops.css');
$xoTheme->addStyleSheet('css/smoothness/jquery-ui-1.8.5.custom.css');
$xoTheme->addStyleSheet('css/style.css');
$xoTheme->addScript('browse.php?Frameworks/jquery/mbMenu.js');
$xoTheme->addStyleSheet('css/menu_style.css');
// by the way we can charge some script only for 1 module
if ($GLOBALS['xoopsModule']->getVar('dirname')=="newbb"){
$xoTheme->addScript('browse.php?Frameworks/jquery/mbContainer.js');
$xoTheme->addStyleSheet('css/menu_red.css');
$xoTheme->addStyleSheet('css/mbContainer.css');
}
?>