2008-12-15, 11:34 AM
I am working on this so if you want this help me okai i have this so far
This Checks Your Database With The Mybb's Database And Shows The People That Need To Be Imported!
Obviously Change The backend/functions to the file that connects to ure database.
the beginframe,stdhead,endframe,stdfoot can all be removed if your site doesnt use them
Update The Mysql Querys Have username WHERE users and agen at the bottom and then it will work bearing in mind you have mybb prefix
the next part is insertmyBBuser which im currently working on where it will easy move details frm ure database to mybb
This Checks Your Database With The Mybb's Database And Shows The People That Need To Be Imported!
<?
define("IN_MYBB", 1);
define('THIS_SCRIPT', 'mybb_user_import.php');
require("backend/functions.php");
dbconn(false);
if ($CURUSER["control_panel"] != "yes")
show_error_msg("Error", "Access Denied");
stdhead("Import TT users to myBB");
begin_frame("");
if ($_POST['act']) {
require("backend/myBB.php");
$res = mysql_query("SELECT `username`, `password`, `email`, MD5(`secret`) AS `secret`, `ip` FROM `users` WHERE `enabled` = 'yes' AND (`username` NOT IN (SELECT `username` FROM `mybb_users`))");
while($row=mysql_fetch_assoc($res)) {
insertmyBBuser($row['username'], $row['password'], $row['email'], $row['secret'], true, $row['ip']);
echo "$row[username] created.<BR>";
}
}
echo "<H4>The following users will be added to myBB:</H4>";
require("forum/inc/init.php");
$res = mysql_query("SELECT `username` FROM `users` WHERE `enabled` = 'yes' AND (`username` NOT IN (SELECT `username` FROM `mybb_users`))");
if (mysql_num_rows($res) == 0)
echo "<font color='red'>Nothing to show.</font>";
else {
while($row=mysql_fetch_array($res))
echo "$row[0]<BR>";
echo "<BR><form action='mybb_user_import.php' method='POST'><input type='submit' name='act' value='Go'></form>";
}
end_frame();
stdfoot();
?>
Obviously Change The backend/functions to the file that connects to ure database.
the beginframe,stdhead,endframe,stdfoot can all be removed if your site doesnt use them
Update The Mysql Querys Have username WHERE users and agen at the bottom and then it will work bearing in mind you have mybb prefix
the next part is insertmyBBuser which im currently working on where it will easy move details frm ure database to mybb