1
Hello, i`m new at working at xoops. Right now, i`m trying to convert an already existing search egine, to a module. Because i found nowhere such a module. Altough, everything is going great, and it already working. But there is still one slightly problem. And i think it's gonna be a big issue, since the search engine has a config file for connecting to the mysql. I can just write my own information in it, and it works. But i one to configure this automatic when someone installs this module. I'l already know about the $xoopsDB option, but is there a way, so that it first loads the XOOPS variables en then change them to the original variables from this script.(sorry, my english is a little bit crappy :() But already thanx.
$database="xoops";
$mysql_user = "";
$mysql_password = "";
$mysql_host = "localhost";
$mysql_table_prefix = "";
$success = mysql_pconnect ($mysql_host, $mysql_user, $mysql_password);
if (!$success)
die ("Cannot connect to database, check if username, password and host are correct.");
$success = mysql_select_db ($database);
if (!$success) {
print "Cannot choose database, check if database name is correct.";
die();
}
?>