6
This one works ...
$pics_dir = '/modules/fatalquery/'.getmoduleoption('map_pic_dir');
$pic = $server_var['map']."".getmoduleoption('mappic_ext');
$server_var['map_pic'] = ($server_var['map'] && is_file(XOOPS_ROOT_PATH.$pics_dir.$pic)) ? XOOPS_URL.$pics_dir.$pic : XOOPS_URL.$pics_dir.getmoduleoption('default_pic_name').getmoduleoption('mappic_ext') ;
after
if($server->mMap() == '0'){
$server_var['map'] ='';
}else{
$server_var['map'] = shorten($server->mMap());
}
and
function getmoduleoption($option, $repmodule='fatalquery')
{
global $xoopsModuleConfig, $xoopsModule;
static $tbloptions= Array();
if(is_array($tbloptions) && array_key_exists($option,$tbloptions)) {
return $tbloptions[$option];
}
$retval=false;
if (isset($xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive')))
{
if(isset($xoopsModuleConfig[$option])) {
$retval= $xoopsModuleConfig[$option];
}
} else {
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname($repmodule);
$config_handler =& xoops_gethandler('config');
if ($module) {
$moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
if(isset($moduleConfig[$option])) {
$retval= $moduleConfig[$option];
}
}
}
$tbloptions[$option]=$retval;
return $retval;
}
at the end of the file, before ?>