7
           
            
                
     
    
    Quote:
AngeloRocha wrote:
The problem is the rw-banner module when i insert the hack in the header.php of xoops core.
 $mod = XoopsModule::getByDirname("rw_banner"); 
if ($mod){ 
    include_once (XOOPS_ROOT_PATH.'/modules/rw_banner/include/maketags.php'); 
}  
You said, you have "rw-banner 1.6" 
Where did you get it? Do you have a link? I am aware only of 
1.51, and Zyspec made some changes and it will become then 1.52.
One more thing:
You need to be careful where you insert the hack in the header.php, otherwise you'll get a "Fatal Error" and a blank screen, because when XOOPS gets to maketags.php, and goes to this line:
 $xoopsTpl->assign($lista_tags[$i]->getName(), $rwbanner->showBanner($lista_tags[$i]->getCateg(), $lista_tags[$i]->getQtde(), $lista_tags[$i]->getCols()));  
and because the $xoopsTpl is not defined yet, it will generate something like this because the $xoopsTpl is not yet available:
Quote:
Fatal error: Call to a member function assign() on null in \modules\rwbanner\include\maketags.php on line 53
So the best way is to insert your hack lines after these lines in header.php:
 $xoTheme  =& $xoopsThemeFactory->createInstance(array('contentTemplate' => @$xoopsOption['template_main'])); 
    $xoopsTpl =& $xoTheme->template;