Define new Database connection from Plugin
#1
One of my MyBB based sites uses a 2nd database, which until now I add into inc/init.php after each upgrade as $db2, eg:

$db2->connect($config['hostname2'], $config['username2'], $config['password2']);
$db2->select_db($config['database2']);

But I know want to do this from a plugin so I don't have to make the modifications after each upgrade.

Which plugin hook if any could I use to create the database connection so that it would then be persistent across all files as it is when I manually add it into inc/init.php ?

Thanks
that's not a bug, thats an unexpected feature

demp.se/y - Messenger Plus! SoundPack DB - Weird Fish
Reply
#2
As far as i know, you would have to perform core edits. I dont know if the hooks system can handle this Confused
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)