[eluser]Daniel Moore[/eluser]
Place your settings file where you were wanting to like you stated, and have it put the variables in there you were wanting to configure.
Then, in the config.php and database.php files, simply place a "require_once(/path/to/settings.php)" statement at the top so that those values will be imported.
There is no need to mess with the core. Just use a "require_once" or "include_once" and you should be good to go.