";
$str .= " ";
$str .= "\n\n\n";
// now insert all the functions
$str .= test_modules::render_javascript();
echo $str;
//**aob [B1] init.php
/*
openbase restriction
walking from root / down the whole path to search some file is a hack.
having openbase restriction enabled or symlinked the webspace you get a lot of warnings.
there should be a better way.
never go above dirname($_SERVER["DOCUMENT_ROOT"])
$_SERVER["DOCUMENT_ROOT"] for the openbase_restriction
dirname() for symlinked folders
i just put a @ to avoid the errors, it is still a hack
*/
//**aob [B2] g2image.php
/*
all javascript should only be included when needed.
*/
//**aob [B3]
/**
i had problem with utf-8, maybe there is a better place
when i see your webpage i see a lot of strage characters. May be you have seen theese chars visiting a japanese page.
header('content-type: text/html; charset=utf-8');
but inserting a header must be done at the proper position.
gallery2 has its own header handling.
*/
//**aob [B4]
/**
it is a lot easier to use an id for the way i display/hide the additional dialog for each select
*/
//------------------------------------------------------------
class test_modules{
function init(){
global $g2ic_options;
//**aob mod [A1] test in init.php
list( $g2ic_options['image_modules'], $hasErrModules) = all_modules::getModules(dirname(__FILE__)."/modules/");
if(count($hasErrModules)>0){
echo "following Modules are not correct:";
print_r ($hasErrModules);
}
}
function g2ic_get_imginsert_selectoptions(){
global $g2ic_options;
//**aob mod [A2] test
foreach($g2ic_options['image_modules'] as $moduleName => $version){
$imginsert_selectoptions[$moduleName] = array( "text" => all_modules::call($moduleName, "select") ) ;
}
return $imginsert_selectoptions;
}
function render_javascript(){
global $g2ic_options;
//**aob [A3] add all needed functions
$html = ' ' . "\n";
return $html;
}
}
?>