Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
und wie verhindere ich dies?
Beiträge: 25.762
Themen: 269
Registriert seit: 20.09.2005
Bei dem Webspace wohl nicht...
Bitte die Foren-Regeln beachten und im Profil die verwendete MyBB-Version angeben.
Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
Und dafür kauf ich mir extra Paidspace von netcup?
Brauche eig nur meine alten Daten, mehr nicht, bisher ist eig. alles drinne denke ich, bis auf dem Fehler im Adminmenü...
Beiträge: 25.762
Themen: 269
Registriert seit: 20.09.2005
Warum konvertierst du nicht lokal mit XAMPP?
Bitte die Foren-Regeln beachten und im Profil die verwendete MyBB-Version angeben.
Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
und dann einfach importieren die ganzen Datenbank?
1. Also am besten nun alles löschen?
2. Mybb auf Xampp installieren
3. Konvertieren
4. Datenbank hochladen
Beiträge: 161
Themen: 2
Registriert seit: 24.10.2009
MyBB-Version: 1.4.11
Ja das ist der beste Weg.
Lokal brauchst du dann mit keinerlei Beschränkungen rechnen.
Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
Klappt nicht, zumindestens wenn ich die 30 Sekunden drinne habe, meckert er wieder, das die Zeit überschritten wird. Wenn ich sie auf 0 setze, also unendlich, dann läd er einfach nur ewig...
Wieso kommen bei mir diese ganzen Fehler?
http://n3oth3on3.hostingsociety.com/down...onvert.rar
Hier ist meine convert.php, vielleicht mach ich irgendwas einfach nur falsch =(
Beiträge: 161
Themen: 2
Registriert seit: 24.10.2009
MyBB-Version: 1.4.11
Ich habe die Datei kurz an den relevanten Stellen überflogen konnte aber keine Probleme soweit entdecken.
Bezüglich des Abbruches des Skriptes:
- Das liegt an einer zugroßen Menge an Privaten Nachrichten.
Siehe dazu auch Beitrag 53
Das du lokal Probleme hast mit der Skriptlaufzeit und dem set_time_limit kann ich nicht nachvollziehen.
Hast du es wie unter Beitrag 50 durchgeführt?
Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
21.12.2011, 11:39
(Dieser Beitrag wurde zuletzt bearbeitet: 21.12.2011, 11:39 von n3oth3on3.)
Die Konvertierung wurde erfolgreich durchgeführt!
Hat nun alles geklappt, es lag tatsächlich an den Privaten Nachrichten...
Für die, die das gleiche Problem haben sollten:
von
PHP-Code: // ---------------- PM ------------------------ $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL "); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` INT( 5 ) UNSIGNED NOT NULL DEFAULT '1'");
$num = $wbb->query("select * from ".$wcfprefix."pm"); if($num->num_rows != 0) {
while($insert = $num->fetch_assoc()) {
$subject = $mybb->real_escape_string($insert['subject']); $message = $mybb->real_escape_string($insert['message']);
$test = $mybb->query("insert into ".$mybbprefix."privatemessages ( pmid, fromid, subject, message, dateline, includesig, smilieoff
) values ( '$insert[epmid]', '$insert[userID]', '$subject', '$message', '$insert[time]', '$insert[showSignature]', '$insert[enableSmilies]' ) "); } if(!$test) { echo "fehler"; }
$pmselect = $mybb->query("select * from ".$mybbprefix."privatemessages"); while($temp = $pmselect->fetch_assoc()) { $sql = "select * from ".$wcfprefix."pm_to_user"; $wbbpmselect = $wbb->query($sql); while($temp2 = $wbbpmselect->fetch_assoc()) { $sqlstr = "update ".$mybbprefix."privatemessages set uid = '$temp2[recipientID]' , toid = '$temp2[recipientID]', folder = $temp2[folderID] where pmid = $temp2[epmid]"; $mybb->query($sqlstr);
} }
$mybb->query("update ".$mybbprefix."privatemessages set receipt = 1");
$mybb->query("update ".$mybbprefix."privatemessages set folder = 1 where folder = 0"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 2 where folder = -1"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 3 where folder = -2"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 4 where folder = -3");
} $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '1'"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD PRIMARY KEY(`pmID`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT "); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD PRIMARY KEY(`pmID`)");
ersetzen mit
PHP-Code: // ---------------- PM ------------------------ /* $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL "); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` INT( 5 ) UNSIGNED NOT NULL DEFAULT '1'");
$num = $wbb->query("select * from ".$wcfprefix."pm"); if($num->num_rows != 0) {
while($insert = $num->fetch_assoc()) {
$subject = $mybb->real_escape_string($insert['subject']); $message = $mybb->real_escape_string($insert['message']);
$test = $mybb->query("insert into ".$mybbprefix."privatemessages ( pmid, fromid, subject, message, dateline, includesig, smilieoff
) values ( '$insert[epmid]', '$insert[userID]', '$subject', '$message', '$insert[time]', '$insert[showSignature]', '$insert[enableSmilies]' ) "); } if(!$test) { echo "fehler"; }
$pmselect = $mybb->query("select * from ".$mybbprefix."privatemessages"); while($temp = $pmselect->fetch_assoc()) { $sql = "select * from ".$wcfprefix."pm_to_user"; $wbbpmselect = $wbb->query($sql); while($temp2 = $wbbpmselect->fetch_assoc()) { $sqlstr = "update ".$mybbprefix."privatemessages set uid = '$temp2[recipientID]' , toid = '$temp2[recipientID]', folder = $temp2[folderID] where pmid = $temp2[epmid]"; $mybb->query($sqlstr);
} }
$mybb->query("update ".$mybbprefix."privatemessages set receipt = 1");
$mybb->query("update ".$mybbprefix."privatemessages set folder = 1 where folder = 0"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 2 where folder = -1"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 3 where folder = -2"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 4 where folder = -3");
} $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '1'"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD PRIMARY KEY(`pmID`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT "); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD PRIMARY KEY(`pmID`)"); */
also von Zeile 1424 bis 1506, einfach auskommentieren =)
Die komplette convert.php ohne PN's, Userdaten ( Ort ... )
PHP-Code: <?php
$wbbhost = "$_GET[wbbhost]"; $wbbuser = "$_GET[wbbuser]"; $wbbpass = "$_GET[wbbpass]"; $mybbhost = "$_GET[mybbhost]"; $mybbuser = "$_GET[mybbuser]"; $mybbpass = "$_GET[mybbpass]"; $wbbdb = "$_GET[wbbdb]"; $mybbdb = "$_GET[mybbdb]"; $mybbprefix = "$_GET[mybbprefix]"; $wbbprefix = "$_GET[wbbprefix]"; $wbbversion = "$_GET[wbbversion]_"; $wcfprefix = "$_GET[wcfprefix]";
if($wbbhost != "" and $mybbhost != "" and $wbbuser != "" and $mybbuser != "" and $wbbdb != "" and $mybbdb != "" and $mybbprefix != "" and $wbbprefix != "" and $wbbversion != "" and $wcfprefix != "") {
$mybb = new mysqli($mybbhost,$mybbuser,$mybbpass,$mybbdb); if ($mybb->connect_error) { Print("Fehler in der Konfiguration der Mybb Daten<br>"); die('Connect Error: ' . $mybb->connect_error); } $wbb = new mysqli($wbbhost,$wbbuser,$wbbpass,$wbbdb); if ($wbb->connect_error) { Print("Fehler in der Konfiguration der Wbb Daten<br>"); die('Connect Error: ' . $wbb->connect_error); }
/* ------------ Fertig -------------- */
// ------------ Check ob bereits konvertiert wurde ---------------
if(isset($_POST['submit']) and $_POST['submit'] == "Trotzdem Konvertieren") {
$mybb->query("UPDATE ".$mybbprefix."convert SET `check` = '0' LIMIT 1 ");
}
$mybb->query("CREATE TABLE `".$mybbprefix."convert` (`ID` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `check` INT NOT NULL) ENGINE = MyISAM;");
$str = "insert into ".$mybbprefix."convert (`ID`, `check` ) values ('1', '0' )";
$mybb->query($str);
$erg = $mybb->query("select * from ".$mybbprefix."convert"); if(!$erg) { printf("Errormessage1: %s\n", $mybb->error); } $check = $erg->fetch_array(MYSQLI_ASSOC); if(!$check) { printf("Errormessage2: %s\n", $mybb->error); }
if($check['check'] != "" and $check['check'] == "1") { echo "<br><br><br><br><br><br>"; echo "<center>"; echo "<font style='font-size:20pt; font-weight:bold; color:red;'>"; echo "Sie haben die Konvertierung bereits einmal erfolgreich durchgeführt!"; echo "</font>"; echo "<br><br>"; echo "<font style='font-size:17pt; font-weight:bold; color:red;'>"; echo "Eine erneute Konvertierung kann zu Datenvelust führen."; echo "</font>"; echo "<br><br><br>"; echo "<form action=# method=post>"; echo "<input type='submit' name='submit' value='Trotzdem Konvertieren' style='width:25%; height:7%;'>"; echo "<input type='hidden' name='convert' value='convert'>"; echo "</form>"; echo "</center>"; } else {
// ------------ Tabellen lehren ------------
$truncate = $mybb->query("Truncate table ".$mybbprefix."forums"); if(!$truncate) { printf("Errormessage3: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."forumsread"); if(!$truncate) { printf("Errormessage4: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."forumsubscriptions"); if(!$truncate) { printf("Errormessage5: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."posts"); if(!$truncate) { printf("Errormessage6: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."threadratings"); if(!$truncate) { printf("Errormessage7: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."threads"); if(!$truncate) { printf("Errormessage8: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."threadsread"); if(!$truncate) { printf("Errormessage9: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."threadsubscriptions"); if(!$truncate) { printf("Errormessage10: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."userfields"); if(!$truncate) { printf("Errormessage11: %s\n", $mybb->error); } $truncate = $mybb->query("TRUNCATE TABLE ".$mybbprefix."usergroups"); if(!$truncate) { printf("Errormessage12: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."users"); if(!$truncate) { printf("Errormessage13: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."polls"); if(!$truncate) { printf("Errormessage14: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."pollvotes"); if(!$truncate) { printf("Errormessage15: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."attachments"); if(!$truncate) { printf("Errormessage16: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."moderators"); if(!$truncate) { printf("Errormessage16a: %s\n", $mybb->error); } $truncate = $mybb->query("Truncate table ".$mybbprefix."privatemessages"); if(!$truncate) { printf("Errormessage16b: %s\n", $mybb->error); } // ------------ Forums -------------- $erg = $wbb->query("select `boardID`, `parentID`, `title`, `description`, `externalURL`, `boardType`, `isClosed`, `threads`, `posts`, `sortField`, `sortOrder` from ".$wbbprefix.$wbbversion."board"); if(!$erg) { printf("Errormessage17: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $posts = $mybb->real_escape_string($insert['posts']); $description = $mybb->real_escape_string($insert['description']); $title = $mybb->real_escape_string($insert['title']);
$Mybb_Forums = "insert into ".$mybbprefix."forums ( fid, pid, name, description, linkto, type, open, threads, posts, defaultsortby, defaultsortorder ) values ( '".$insert['boardID']."', '".$insert['parentID']."', '".$title."', '".$description."', '".$insert['externalURL']."', '".$insert['boardType']."', '".$insert['isClosed']."', '".$insert['threads']."', '".$posts."', '".$insert['sortField']."', '".$insert['sortOrder']."' ) ";
$cont = $mybb->query($Mybb_Forums); if(!$cont) { printf("Errormessage18: %s\n", $mybb->error); } } $sql = $wbb->query("select * from ".$wbbprefix.$wbbversion."board_structure"); if(!$sql) { printf("Errormessage19: %s\n", $wbb->error); }
while($temp1 = $sql->fetch_assoc()) { $tempcont = $mybb->query("update ".$mybbprefix."forums set disporder = $temp1[position] where fid = $temp1[boardID]"); if(!$tempcont) { printf("Errormessage20: %s\n", $mybb->error); } }
$sql = $wbb->query("select * from ".$wbbprefix.$wbbversion."board"); if(!$sql) { printf("Errormessage21: %s\n", $wbb->error); } while($temp1 = $sql->fetch_assoc()) {
$erg = $mybb->query("update ".$mybbprefix."forums set parentlist = '".$temp1['boardID']."' where fid = ".$temp1['boardID'].""); if(!$erg) { printf("Errormessage22: %s\n", $mybb->error); } }
$parentlistupdate_1 = $mybb->query("select * from ".$mybbprefix."forums order by pid ASC"); if(!$parentlistupdate_1) { printf("Errormessage23: %s\n", $mybb->error); } while($parentlisttemp_1 = $parentlistupdate_1->fetch_assoc()) { if($parentlisttemp_1['pid'] != 0) { $parentlistupdate_2 = $mybb->query("select * from ".$mybbprefix."forums where fid = ".$parentlisttemp_1['pid']."");
if(!$parentlistupdate_2) { printf("Errormessage24: %s\n", $mybb->error); }
while($parentlisttemp_2 = $parentlistupdate_2->fetch_assoc()) { $parentlist = $parentlisttemp_2['parentlist'].",".$parentlisttemp_1['fid']; $cont = $mybb->query("update ".$mybbprefix."forums set parentlist = '".$parentlist."' where fid = ".$parentlisttemp_1['fid'].""); if(!$cont) { printf("Errormessage25: %s\n", $mybb->error); } } } }
$sql = $wbb->query("select * from ".$wbbprefix.$wbbversion."thread"); if(!$sql) { printf("Errormessage26: %s\n", $wbb->error); } while($temp1 = $sql->fetch_assoc()) { $control = $mybb->query("update ".$mybbprefix."forums set lastpost = '".$temp1['lastPostTime']."', lastposter = '".$temp1['lastPoster']."', lastposteruid = '".$temp1['lastPosterID']."' where fid = ".$temp1['boardID'].""); if(!$control) { printf("Errormessage27: %s\n", $mybb->error); } }
$upd = $mybb->query("update ".$mybbprefix."forums set type = 'c' where type = '1'"); if(!$upd) { printf("Errormessage28: %s\n", $mybb->error); } $upd = $mybb->query("update ".$mybbprefix."forums set type = 'f' where type = '0'"); if(!$upd) { printf("Errormessage29: %s\n", $mybb->error); } $upd = $mybb->query("update ".$mybbprefix."forums set open = '2' where open = '1'"); if(!$upd) { printf("Errormessage30: %s\n", $mybb->error); } $upd = $mybb->query("update ".$mybbprefix."forums set open = '1' where open = '0'"); if(!$upd) { printf("Errormessage31: %s\n", $mybb->error); } $upd = $mybb->query("update ".$mybbprefix."forums set open = '0' where open = '2'"); if(!$upd) { printf("Errormessage32: %s\n", $mybb->error); } $upd = $mybb->query("update ".$mybbprefix."forums set allowmycode = '1', allowsmilies = '1', allowimgcode = '1', allowpicons = '1', usepostcounts = '1', showinjump = '1', active = '1'"); if(!$upd) { printf("Errormessage33: %s\n", $mybb->error); }
// ---------------- Forumsread ---------------- $erg = $wbb->query("select threadID, userID , lastVisitTime from ".$wbbprefix.$wbbversion."thread_visit"); if(!$erg) { printf("Errormessage34: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."forumsread ( fid, uid, dateline ) values ( '".$insert['threadID']."', '".$insert['userID']."' , '".$insert['lastVisitTime']."' ) "); if(!$contr) { printf("Errormessage35: %s\n", $mybb->error); } } // ---------------- Forumsubscription ---------------- $erg = $wbb->query("select threadID, userID from ".$wbbprefix.$wbbversion."thread_subscription"); if(!$erg) { printf("Errormessage36: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."forumsubscriptions ( fid, uid ) values ( '".$insert['threadID']."', '".$insert['userID']."' ) "); if(!$contr) { printf("Errormessage37: %s\n", $mybb->error); } } // ---------------- Posts ---------------- $erg = $wbb->query("select postID, threadID, subject, userID, username, time, message, editorID, lastEditTime from ".$wbbprefix.$wbbversion."post"); if(!$erg) { printf("Errormessage38: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) {
$message = $mybb->real_escape_string($insert['message']); $subject = $mybb->real_escape_string($insert['subject']);
$str = 'insert into '.$mybbprefix.'posts ( pid, tid, subject, uid, username, dateline, message, edituid, edittime, visible ) values ( "'.$insert['postID'].'", "'.$insert['threadID'].'", "'.$subject.'", "'.$insert['userID'].'", "'.$insert['username'].'", "'.$insert['time'].'", "'.$message.'", "'.$insert['editorID'].'", "'.$insert['lastEditTime'].'", "1" ) '; $contr = $mybb->query($str); if(!$contr) { echo $str."<br>"; printf("<br>Errormessage391: %s\n", $mybb->error); } }
$sql = $wbb->query("select * from ".$wbbprefix.$wbbversion."thread");
if(!$sql) { printf("Errormessage40: %s\n", $wbb->error); }
while($temp1 = $sql->fetch_assoc()) { $contr = $mybb->query("update ".$mybbprefix."posts set fid = '".$temp1['boardID']."' where tid = ".$temp1['threadID'].""); if(!$contr) { printf("Errormessage41: %s\n", $mybb->error); } }
// ---------------- Threadratings ---------------- $erg = $wbb->query("select threadID, userID, rating, ipAddress from ".$wbbprefix.$wbbversion."thread_rating");
if(!$erg) { printf("Errormessage42: %s\n", $wbb->error); }
while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."threadratings ( tid, uid, rating, ipaddress ) values ( '".$insert['threadID']."', '".$insert['userID']."', '".$insert['rating']."', '".$insert['ipAddress']."' ) ");
if(!$contr) { printf("Errormessage43: %s\n", $mybb->error); } } // ---------------- Threads ----------------- $erg = $wbb->query("select threadID, boardID, topic, polls, userID, username, time, firstPostID, lastPostTime, lastPoster, lastPosterID, views, replies, isClosed, isSticky, attachments, deleteTime from ".$wbbprefix.$wbbversion."thread");
if(!$erg) { printf("Errormessage44: %s\n", $wbb->error); }
while($insert = $erg->fetch_assoc()) {
$username = $mybb->real_escape_string($insert['username']); $subject = $mybb->real_escape_string($insert['topic']);
$sqlstr = "insert into ".$mybbprefix."threads ( tid, fid, subject, poll, uid, username, dateline, firstpost, lastpost, lastposter, lastposteruid, views, replies, closed, sticky, attachmentcount, deletetime ) values ( '".$insert['threadID']."', '".$insert['boardID']."', '".$subject."', '".$insert['polls']."', '".$insert['userID']."', '".$username."', '".$insert['time']."', '".$insert['firstPostID']."', '".$insert['lastPostTime']."', '".$insert['lastPoster']."', '".$insert['lastPosterID']."', '".$insert['views']."', '".$insert['replies']."', '".$insert['isClosed']."', '".$insert['isSticky']."', '".$insert['attachments']."', '".$insert['deleteTime']."' ) "; $contr = $mybb->query($sqlstr); if(!$contr) { printf("Errormessage45: %s\n", $mybb->error); echo "<br>".$sqlstr."<br>"; } } $contr = $mybb->query("update ".$mybbprefix."threads set visible = '1'"); if(!$contr) {
printf("Errormessage46: %s\n", $mybb->error); }
// ---------------- Threadsread ----------------- $erg = $wbb->query("select threadID, userID, lastVisitTime from ".$wbbprefix.$wbbversion."thread_visit"); if(!$erg) { printf("Errormessage47: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."threadsread ( tid, uid, dateline ) values ( '".$insert['threadID']."', '".$insert['userID']."', '".$insert['lastVisitTime']."' ) "); if(!$contr) { printf("Errormessage48: %s\n", $mybb->error); } } // ---------------- Threadsratings ----------------- $erg = $wbb->query("select `threadID`, `userID`, `rating`, `ipAddress` from `".$wbbprefix.$wbbversion."thread_rating`");
while($insert = $erg->fetch_assoc()) { $mybb->query("insert into ".$mybbprefix."threadsratings ( tid, uid, rating, ipadress ) values ( '$insert[threadID]', '$insert[userID]', '$insert[rating]', '$insert[ipAddress]' ) "); } // ---------------- Threadsubscriptions ----------------- $string = "select userID, threadID, enableNotification from ".$wbbprefix.$wbbversion."thread_subscription";
$erg = $wbb->query($string); if(!$erg) { printf("Errormessage49: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."threadsubscriptions ( uid, tid, notification ) values ( '".$insert['userID']."', '".$insert['threadID']."', '".$insert['enableNotification']."' ) "); if(!$contr) { printf("Errormessage50: %s\n", $mybb->error); } } // ---------------- Userfields ----------------- /* $erg = $wbb->query("select userID, userOption13, userOption12 from ".$wcfprefix."user_option_value"); if(!$erg) { printf("Errormessage51: %s\n", $wbb->error); } while($insert = $erg->fetch_assoc()) { $contr = $mybb->query("insert into ".$mybbprefix."userfields ( ufid, fid1, fid3 ) values ( '".$insert['userID']."', '".$insert['userOption13']."', '".$insert['userOption12']."' ) "); if(!$contr) { printf("Errormessage52: %s\n", $mybb->error); } } $contr = $mybb->query("update ".$mybbprefix."userfields set fid3 = 'Keine Angabe' where fid3 = '0'"); if(!$contr) { printf("Errormessage53: %s\n", $mybb->error); } $contr = $mybb->query("update ".$mybbprefix."userfields set fid3 = 'Männlich' where fid3 = '1'"); if(!$contr) { printf("Errormessage54: %s\n", $mybb->error); } $contr = $mybb->query("update ".$mybbprefix."userfields set fid3 = 'Weiblich' where fid3 = '2'"); if(!$contr) { printf("Errormessage55: %s\n", $mybb->error); }
*/ // ---------------- Usergroups ----------------
$sql = $wbb->query("select * from ".$wcfprefix."group"); if(!$sql) { printf("Errormessage56: %s\n", $wbb->error); } while($temp1 = $sql->fetch_assoc()) { $gid = "$temp1[groupID]"; $ugtitle = $wbb->real_escape_string($temp1["groupName"]);
$tempo = $mybb->query("insert into ".$mybbprefix."usergroups ( gid, type, title, namestyle, starimage, disporder, isbannedgroup, canview, canviewthreads, canviewprofiles, candlattachments, canpostthreads, canpostreplys, canpostattachments, canratethreads, caneditposts, candeleteposts, candeletethreads, caneditattachments, canpostpolls, canvotepolls, canusepms, cansendpms, cantrackpms, candenypmreceipts, pmquota, maxpmrecipients, cansendemail, maxemails, canviewmemberlist, canviewcalendar, canaddevents, canbypasseventmod, canmoderateevents, canviewonline, canviewwolinvis, canviewonlineips, cancp, issupermod, cansearch, canusercp, canuploadavatars, canratemembers, canchangename, showforumteam, usereputationsystem, cangivereputations, reputationpower, maxreputationsday, candisplaygroup, attachquota, cancustomtitle, canwarnusers, canreceivewarnings, maxwarningsday, canmodcp ) values ( ".$gid.", '".$temp1['groupType']."', '".$ugtitle."', '{username}', 'images/star.gif', 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 200, 5, 1, 10, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 5, 1, 0, 1, 0, 1, 1, 0 )");
if(!$tempo) { printf("Errormessage57: %s\n", $mybb->error); }
}
$mybb_group = $mybb->query("SELECT * FROM ".$mybbprefix."usergroups"); while($mybb_group_temp = $mybb_group->fetch_assoc()) { $usergroupstars = $wbb->query("select * from ".$wcfprefix."user_rank where groupID = ".$mybb_group_temp['gid'].""); while($usergroupstars_temp = $usergroupstars->fetch_assoc()) { $mybb->query("update ".$mybbprefix."usergroups set stars = '".$usergroupstars_temp['repeatImage']."' where gid = ".$mybb_group_temp['gid'].""); }
}
$optname = array( "mod.board.isSuperMod", "mod.board.isSuperMod", "user.board.canViewBoard", "user.board.canViewBoard", "user.profile.canView", "user.board.canDownloadAttachment", "user.board.canStartThread", "user.board.canStartThread", "user.board.canReplyThread", "user.board.canUploadAttachment", "user.board.canRateThread", "user.board.canEditOwnPost", "user.board.canDeleteOwnPost", "mod.board.canDeleteThread", "user.board.canStartPoll", "user.board.canVotePoll", "user.pm.canUsePM", "user.pm.canUsePM", "user.pm.canUsePM", "user.pm.canUsePM", "user.pm.maxPm", "user.pm.maxRecipients", "user.mail.canMail", "user.membersList.canView", "user.usersOnline.canView", "admin.general.canViewInvisible", "admin.general.canViewIpAddress", "admin.general.canUseAcp", "user.profile.avatar.canUploadAvatar", "user.profile.canRename", "user.board.maxAttachmentCount", "admin.user.infraction.canWarnUser" );
$useropt = array( "issupermod", "canmodcp", "canviewthreads", "canview", "canviewprofiles", "candlattchment", "canpostthreads", "canpostthreads", "canpostreplys", "canpostattachments", "canratethreads", "caneditposts", "candeleteposts", "candeletethreads", "canpostpolls", "canvotepolls", "canusepms", "candenypmreceipts", "cansendpms", "cantrackpms", "pmquota", "maxpmrecipients", "cansendmail", "canviewmemberlist", "canviewonline", "canviewwolinvis", "canviewonlineips", "cancp", "canuploadavatars", "canchangename", "attachquota", "canwarnUser" );
$n = 0; $i = 1;
set_time_limit(30); $usergroupcount = $mybb->query("select Distinct gid from ".$mybbprefix."usergroups");
while($i <= count($useropt)) {
$a = 1; $tempstr = $wbb->query("select * from ".$wcfprefix."group_option where `optionName` like '$optname[$n]'"); $temp = $tempstr->fetch_array(MYSQLI_ASSOC); $optid = $temp['optionID']; while($anzahl = $usergroupcount->fetch_array(MYSQLI_ASSOC)) {
$pmetstr = "select * from ".$wcfprefix."group_option_value where `optionID` = '$optid' and groupID = $anzahl[gid]"; $temp = $wbb->query($pmetstr); $pmet = $temp->fetch_assoc(); if(!$pmet) { printf("Errormessage58b: %s\n", $mybb->error); echo $pmetstr; } $querystr = "update ".$mybbprefix."usergroups set `$useropt[$n]` = $pmet[optionValue] where gid = '$pmet[groupID]'" ; $mybb->query($querystr); $a++; } $i++; $n++; }
$mybb->query("update ".$mybbprefix."usergroups set candlattachments = 0, canpostthreads = 0, canpostreplys = 0, canpostattachments = 0, canratethreads = 0, caneditposts = 0, candeleteposts = 0, candeletethreads = 0, caneditattachments = 0, canpostpolls = 0, canvotepolls = 0, canusepms = 0, cansendpms = 0, cantrackpms = 0, candenypmreceipts = 0, pmquota = 0, maxpmrecipients = 0, cansendemail = 0, maxemails = 0, canaddevents = 0, canusercp = 0, canuploadavatars = 0, canratemembers = 0, canchangename = 0 where title like '%gäste%' or title like '%guest%' or title like '%gaeste%'");
// ---------------- User -------------------- $mybb->query("Alter table ".$mybbprefix."users add ( wbbpassword varchar(50) not Null, wbbsalt varchar(50) not Null )");
$strstr = "select userID, username, email, registrationDate, lastActivityTime, signature, pmTotalCount, pmUnreadCount, password, salt from ".$wcfprefix."user"; $erg = $wbb->query($strstr); if(!$erg) { printf("Errormessage58: %s\n", $wbb->error); echo $strstr;}
while($insert = $erg->fetch_assoc()) {
$username = $mybb->real_escape_string($insert['username']); $signature = $mybb->real_escape_string($insert['signature']); $mybb->query("update ".$mybbprefix."users set password=\"\",salt=\"\",loginkey=\"\""); $contr = $mybb->query("insert into ".$mybbprefix."users ( uid, username, email, regdate, lastactive, signature, postnum, totalpms, unreadpms, wbbpassword, wbbsalt ) values ( '$insert[userID]', '".$username."', '$insert[email]', '$insert[registrationDate]', '$insert[lastActivityTime]', '".$signature."', '$insert[pmTotalCount]', '$insert[pmTotalCount]', '$insert[pmUnreadCount]', '$insert[password]', '$insert[salt]'
) "); if(!$contr) { printf("Errormessage59: %s\n", $mybb->error); } }
$sql = $wbb->query("select * from ".$wbbprefix.$wbbversion."user"); while($temp1 = $sql->fetch_assoc()) { $mybb->query("update ".$mybbprefix."users set postnum = '".$temp1['posts']."' where uid = ".$temp1['userID'].""); }
$sql = $wbb->query("select * from ".$wcfprefix."user"); while($temp1 = $sql->fetch_assoc()) { $avatar = $wbb->query("select * from ".$wcfprefix."avatar where avatarID = ".$temp1['avatarID'].""); while($temp2 = $avatar->fetch_assoc()) {
$mybb->query("update ".$mybbprefix."users set avatar = './images/avatars/avatar-".$temp2['avatarID'].".".$temp2['avatarExtension']."', avatardimensions = '".$temp2['width']."|".$temp2['height']."', avatartype = 'upload', allownotices = '1', receivepms = '1', pmnotice = '1', remember = '1', threadmode = 'linear', showsigs = '1', showavatars = '1', showquickreply = '1', showredirect = '1', showcodebuttons = '1', loginattempts = '1' where uid = ".$temp1['userID']."");
} $useroption = $wbb->query("select * from ".$wcfprefix."user_option_value where userID = ".$temp1['userID'].""); while($temp3 = $useroption->fetch_assoc()) {
$birth = explode("-",$temp3['userOption11']);
$mybb->query("update ".$mybbprefix."users set website = '".$temp3['userOption17']."', birthday = '".$temp3['userOption11']."', hideemail = '".$temp3['userOption20']."', invisible = '".$temp3['userOption19']."' where uid = ".$temp1['userID']."");
}
}
$usergroup = $wbb->query("select * from ".$wcfprefix."user_to_groups"); while($temp4 = $usergroup->fetch_assoc()) { if($temp4['groupID'] == 4) {
$mybb->query("update ".$mybbprefix."users set usergroup = '4' where uid = ".$temp4['userID'].""); } } $additionalgroup_1 = $mybb->query("select * from ".$mybbprefix."users"); while($additionalgrouptemp_1 = $additionalgroup_1->fetch_assoc()) { $additionalgrouplist = ""; $additionalgroup_2 = $wbb->query("select * from ".$wcfprefix."user_to_groups where userID = ".$additionalgrouptemp_1['uid'].""); while($additionalgrouptemp_2 =$additionalgroup_2->fetch_assoc()) { $additionalgrouplist .= ",".$additionalgrouptemp_2['groupID']; } $additionalgrouplist = substr($additionalgrouplist,1); $mybb->query("update ".$mybbprefix."users set additionalgroups = '".$additionalgrouplist."' where uid = ".$additionalgrouptemp_1['uid']."");
}
$buddy = ""; $ignore = "";
$dateform = $mybb->query("select * from ".$mybbprefix."users"); while($temp5 = $dateform->fetch_assoc()) { /* if($temp5['birthday'] != "") { list($Jahr, $Monat, $Tag) = explode("-","$temp5[birthday]");
if(!checkdate($Tag, $Monat, $Jahr)) { $birth = ""; } else { $Tag = round($Monat); $Monat = round($Tag); $Jahr = round($Jahr); $birth = "".$Tag."-".$Monat."-".$Jahr.""; }
$mybb->query("update ".$mybbprefix."users set birthday = '$birth' where uid = ".$temp5['uid'].""); } */
$userbuddy = $wbb->query("select * from ".$wcfprefix."user_whitelist where userID = ".$temp5['uid'].""); while($buddytemp = $userbuddy->fetch_assoc()) { $buddy .= ",".$buddytemp['whiteUserID']; }
$userignore =$wbb->query("select * from ".$wcfprefix."user_blacklist where userID = ".$temp5['uid'].""); while($ignoretemp = $userignore->fetch_assoc()) { $ignore .= ",".$ignoretemp['blackUserID']; }
$ignore = substr($ignore,1); $buddy = substr($buddy,1);
$mybb->query("update ".$mybbprefix."users set buddylist = ".$buddy.", ignorelist = ".$ignore." where uid = ".$temp5['uid'].""); }
// ---------------- Polls ------------------- $erg = $wbb->query("select pollID, question, time, votes, endTime from ".$wcfprefix."poll"); while($insert = $erg->fetch_assoc()) { $mybb->query("insert into ".$mybbprefix."polls ( pid, question, dateline, numvotes, timeout ) values ( '$insert[pollID]', '$insert[question]', '$insert[time]', '$insert[votes]', '$insert[endTime]' )"); } $option = ""; $votes = "";
$pollthread = $mybb->query("select * from ".$mybbprefix."polls"); while($temp6 = $pollthread->fetch_assoc()) { $erg = $wbb->query("select * from ".$wbbprefix.$wbbversion."post where pollID = ".$temp6['pid'].""); $wbbtid = $erg->fetch_assoc(); $mybb->query("update ".$mybbprefix."polls set tid = ".$wbbtid['threadID']." where pid = ".$wbbtid['pollID']."");
$numoptions = 0;
$pollsoption = $wbb->query("select * from ".$wcfprefix."poll_option where pollID = ".$temp6['pid'].""); while($temp8 = $pollsoption->fetch_assoc()) { $option .= "||~|~||".$temp8['pollOption']; $votes .= "||~|~||".$temp8['votes']; $numoptions++; }
$option = substr($option,7); $votes = substr($votes,7);
$mybb->query("update ".$mybbprefix."polls set options = '".$option."', votes = '".$votes."', numoptions = ".$numoptions.", multiple = '1' where pid = ".$temp6['pid']."");
$option = ""; $votes = ""; }
// ---------------- Pollvotes ----------------
$erg = $wbb->query("select pollID, userID from ".$wcfprefix."poll_option_vote"); while($insert = $erg->fetch_assoc()) { $mybb->query("insert into ".$mybbprefix."pollvotes ( pid, uid ) values ( '$insert[pollID]', '$insert[userID]' )"); } $voteoption_1 = $mybb->query("select * from ".$mybbprefix."pollvotes"); while($temp9 = $voteoption_1->fetch_assoc()) { $voteoption_2 = $wbb->query("select * from ".$wcfprefix."poll_option_vote where pollID = ".$temp9['pid'].""); while($temp10 = $voteoption_2->fetch_assoc()) { $voteoption_3 = $wbb->query("select * from ".$wcfprefix."poll_option where pollOptionID = ".$temp10['pollOptionID'].""); while($temp11 = $voteoption_3->fetch_assoc()) { $showOrder = $temp11['showOrder']; $showOrder++; $mybb->query("update ".$mybbprefix."pollvotes set voteoption = ".$showOrder." where pid = ".$temp9['pid'].""); } } }
// -------------------- Attachments ------------------------ /* $erg = $wbb->query("select attachmentID, containerID, userID, attachmentName, fileType, attachmentSize, downloads, uploadTime from ".$wcfprefix."attachment"); while($insert = $erg->fetch_assoc()) { $filename = $mybb->real_escape_string($insert['attachmentName']); $mybb->query("insert into ".$mybbprefix."attachments ( aid, pid, uid, filename, filetype, filesize, downloads, dateuploaded ) values ( '$insert[attachmentID]', '$insert[containerID]', '$insert[userID]', '$filename', '$insert[fileType]', '$insert[attachmentSize]', '$insert[downloads]', '$insert[uploadTime]' ) "); } $attachments_1 = $mybb->query("select * from ".$mybbprefix."attachments"); while($attachmentstemp_1 = $attachments_1->fetch_assoc()) { $attachments_2 = $wbb->query("select * from ".$wcfprefix."attachment where attachmentID = ".$attachmentstemp_1['aid'].""); while($attachmentstemp_2 = $attachments_2->fetch_assoc()) { $mybb->query("update ".$mybbprefix."attachments set attachname = 'attachments/attachment-".$attachmentstemp_2['attachmentID']."', visible = '1' where aid = ".$attachmentstemp_1['aid'].""); if($attachmentstemp_2['thumbnailType'] != "") { $mybb->query("update ".$mybbprefix."attachments set thumbnail = 'attachments/thumbnail-".$attachmentstemp_2['attachmentID']."' where aid = ".$attachmentstemp_1['aid'].""); } } }
*/ // ---------------- Moderators ---------------- $erg = $wbb->query("select boardID, userID, canEditPost, canDeletePost, canEnableThread, canMoveThread from ".$wbbprefix.$wbbversion."board_moderator"); while($insert = $erg->fetch_assoc()) { $mybb->query("insert into ".$mybbprefix."moderators ( fid, uid, caneditposts, candeleteposts, canopenclosethreads, canmovetononmodforum ) values ( '$insert[boardID]', '$insert[userID]', '$insert[canEditPost]', '$insert[canDeletePost]', '$insert[canEnableThread]', '$insert[canMoveThread]' ) ");
} $mybb->query("update ".$mybbprefix."moderators set canviewips = 1");
// ---------------- PM ------------------------ /* $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP PRIMARY KEY"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL "); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD `epmid` INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`epmid`)"); $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` INT( 5 ) UNSIGNED NOT NULL DEFAULT '1'");
$num = $wbb->query("select * from ".$wcfprefix."pm"); if($num->num_rows != 0) {
while($insert = $num->fetch_assoc()) {
$subject = $mybb->real_escape_string($insert['subject']); $message = $mybb->real_escape_string($insert['message']);
$test = $mybb->query("insert into ".$mybbprefix."privatemessages ( pmid, fromid, subject, message, dateline, includesig, smilieoff
) values ( '$insert[epmid]', '$insert[userID]', '$subject', '$message', '$insert[time]', '$insert[showSignature]', '$insert[enableSmilies]' ) "); } if(!$test) { echo "fehler"; }
$pmselect = $mybb->query("select * from ".$mybbprefix."privatemessages"); while($temp = $pmselect->fetch_assoc()) { $sql = "select * from ".$wcfprefix."pm_to_user"; $wbbpmselect = $wbb->query($sql); while($temp2 = $wbbpmselect->fetch_assoc()) { $sqlstr = "update ".$mybbprefix."privatemessages set uid = '$temp2[recipientID]' , toid = '$temp2[recipientID]', folder = $temp2[folderID] where pmid = $temp2[epmid]"; $mybb->query($sqlstr);
} }
$mybb->query("update ".$mybbprefix."privatemessages set receipt = 1");
$mybb->query("update ".$mybbprefix."privatemessages set folder = 1 where folder = 0"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 2 where folder = -1"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 3 where folder = -2"); $mybb->query("update ".$mybbprefix."privatemessages set folder = 4 where folder = -3");
} $mybb->query("ALTER TABLE ".$mybbprefix."privatemessages CHANGE `folder` `folder` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '1'"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm DROP `epmid`"); $wbb->query("ALTER TABLE ".$wcfprefix."pm_to_user ADD PRIMARY KEY(`pmID`)"); $wbb->query("ALTER TABLE ".$wcfprefix."pm CHANGE `pmID` `pmID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT "); $wbb->query("ALTER TABLE ".$wcfprefix."pm ADD PRIMARY KEY(`pmID`)"); */
echo "<br><br><br><br><br><br><br><br>"; echo "<center>"; echo "<font style='font-size:24pt; font-weight:bold; color:green;'>"; echo "Die Konvertierung wurde erfolgreich durchgeführt!"; echo "</font>"; echo "</center>"; $con = $mybb->query("update ".$mybbprefix."convert set `check` = '1'"); if($con) { echo ""; } else { $mybb->query("insert into ".$mybbprefix."convert ( `check` ) values ( '1' )"); }
}
} else { ?> <center><br><br><br><br><br><br> <h3 style="color:red; font-size:1cm;">Geben Sie Ihre Daten unter <a href="config.php">>> Konfiguration</a> neu ein!</h3> </center> <?php }
?>
Dann bleibt nur noch der Fehler in der Benutzer-Berechtigungen
PHP-Code: MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY u.username ASC' at line 4 Query: SELECT u.uid, u.username, u.lastactive, u.usergroup, u.additionalgroups, a.permissions FROM mybb_users u LEFT JOIN mybb_adminoptions a ON (a.uid=u.uid) WHERE u.usergroup IN () ORDER BY u.username ASC
Beiträge: 28
Themen: 6
Registriert seit: 14.12.2011
MyBB-Version: 1.6.5
Kann man den Konverter so umstellen das nur diese Sachen rübergezogen werden:
Themen
Beiträge - Umfragen, Ratings,...
User
Also alles bis auf die Privaten Nachrichten, die Usergroupen und die Benutzer-Felder(Ort,Bday) usw.?
Ansich hab ich alles bis auf die Usergroupen, das die 4 Standard bleiben, da ich damals in WBB 8 Usergroups hatte.
|