Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Wbb to VB, half way done Details »»
Wbb to VB, half way done
Version: , by pawel pawel is offline
Developer Last Online: Aug 2005 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-03-2003 Last Update: Never Installs: 0
 
No support by the author.

Hi,
I am almost done writing a wbb to VB converter but I ran into some trouble. First, when you post a new thread, register, or reply it gives you a database error but it performs the action. Second, all the users appear as guests but I think that's because I didn't add them to the activation table. For now those are the 2 biggest problems. Here is the script:
PHP Code:
<?

mysql_connect("localhost", "xxx", "xxx");
$db_wbb = xxx;

mysql_select_db("$db_wbb")
or die("Could not select database");
print "Connected successfully<br><br>impoting...<br>";

//$result = mysql_query("SELECT userid, groupid, username, userpassword, useremail, userhp, usericq, aim, yim, signatur, statusextra, regdate, posts FROM bb1_user_table");

// User Import

$result = mysql_query("SELECT userid, groupid, username, userpassword, useremail, userhp, usericq, aim, yim, signatur, statusextra, regdate, userposts FROM bb1_user_table");


while ($row = mysql_fetch_array($result))
{
$password = $row["userpassword"];

$usergroup = $row["groupid"];

if($usergroup == 1) // admin
{
$usergroup = 6;
}
else if($usergroup == 3) // std user
{
$usergroup = 2;
}
else if($usergroup == 2) // Moderator
{
$usergroup = 7;
}


else {
$usergroup = 3;
}

$userid = $row["userid"];

if($userid == 1)
{
$userid = 2;
}

$username = $row["username"];
$email = $row["useremail"];
$posts = $row["posts"];
$joindate = $row["regdate"];
$lastvisit = $row["lastvisit"];
$lastactivity = $row["lastactivity"];
$signature = $row["signatur"];
$icq = $row["usericq"];
$aim = $row["aim"];
$yim = $row["yim"];
$homepage = $row["userhp"];
$usertitle = $row["usertitle"];

//stucture
//$result = mysql_query("SELECT userid, usergroupid, username, password, email, homepage, icq, aim, yahoo, signature, usertitle, joindate, posts FROM user");


// mysql_query("INSERT into bb1_user_table VALUES ('$userid', '$username', '$password', '$email', '$email', '$posts', '$usergroup', '', '$joindate', '$lastvisit', '$lastactivity', '1', '$signature', '$icq', '$aim', '$yim', '$homepage', '', '0', '0', '0', '', '', '$usertitle', '0', '', '0', '1', '1', '0', '0', '0', '0', '0', '1', '0', '1', '0')");
//mysql_query("INSERT into user VALUES ('$userid', '$username', '$password', '$email', '$email', '$posts', '$usergroup', '', '$joindate', '$lastvisit', '$lastactivity', '1', '$signature', '$icq', '$aim', '$yim', '$homepage', '', '0', '0', '0', '', '', '$usertitle', '0', '', '0', '1', '1', '0', '0', '0', '0', '0', '1', '0', '1', '0')");


mysql_query("INSERT into user VALUES ('$userid', '$usergroup', '$username' ,'$password', '$email', '1', '', '0', '$homepage', '$icq', '$aim', ' $yim', '$signature', '1', '1', '0', 'User', '0', '$joindate', '1', '-1', '$lastvisit', '$lastactivity', '', '$posts', '0', '0', '', '', '', '1', '1', '1', '1', '15', '0000-00-00', '-1', '1', '', '0', '0', '0')");
}
echo "imported users";


//Import Boards


$result = mysql_query("SELECT boardid, boardparentid, boardname, boardpassword, descriptiontext, threads, posts, lastposttime, lastpostid, sort, isboard, invisible, style_set FROM bb1_boards");


while ($row = mysql_fetch_array($result))
{

$boardid = $row["boardid"];
$boardparentid = $row["boardparentid"];
$boardname = $row["boardname"];
$boardpassword = $row["boardpassword"];
$descriptiontext = $row["descriptiontext"];
$threads = $row["threads"];
$posts = $row["posts"];
$lastposttime = $row["lastposttime"];
$lastpostid = $row["lastpostid"];
$sort = $row["sort"];
$isboard = $row["isboard"];
$invisible = $row["invisible"];
$homepage = $row["style_set"];

if ($isboard == 0) {
    $allowposting = 0;
    $cancontainthreads = 0;
    $daysprune = 0;

}
else {
    $allowposting = 1;
    $cancontainthreads = 1;
    $daysprune = 1;
}

if ($boardparentid == 0) {
    $boardparentid1 = -1;
}

else {
    $boardparentid1 = $row["boardparentid"];
}


echo "importing $boardname";
mysql_query("INSERT into forum VALUES ('$boardid', '1', '$boardname' ,'$descriptiontext', '1', '1', '$posts', '$lastposttime', 'unknown', '$threads', '$allowposting', '$cancontainthreads', '$daysprune', '', '', '0', '0', '1', '1', '0', '1', '1', '$boardparentid1', '', '1', '1', '0')");
echo "...done <br>";
}
echo "imported boards";


//import threads
$result = mysql_query("SELECT boardparentid, starttime, threadid, threadname, authorid, author, lastposterid, replies, views, timelastreply, important FROM bb1_threads");


while ($row = mysql_fetch_array($result))
{

$boardparentid = $row["boardparentid"];
$starttime = $row["starttime"];
$threadid = $row["threadid"];
$threadname = $row["threadname"];
$authorid = $row["authorid"];
$author = $row["author"];
$lastposterid = $row["lastposterid"];
$replies = $row["replies"];
$views = $row["views"];
$timelastreply = $row["timelastreply"];
$important = $row["important"];



echo "importing $threadname";
mysql_query("INSERT into thread VALUES ('$threadid',
'$threadname',
'$timelastreply',
'$boardparentid',
'0',
'1',
'$replies',
'$author',
'$authorid',
'unknown',
'$starttime',
'$views',
'0',
'',
'1',
'$important',
'0',
'0',
'0')")
or die(mysql_error());


echo "...done <br>";
}
echo "<b>imported threads</b>";


//import posts
$result = mysql_query("SELECT boardparentid, threadparentid, postid, userid, posttime, edittime, editorid, posttopic, message, posticon, ip FROM bb1_posts");


while ($row = mysql_fetch_array($result))
{

$boardparentid = $row["boardparentid"];
$threadparentid = $row["threadparentid"];
$postid = $row["postid"];
$userid = $row["userid"];
$posttime = $row["posttime"];
$edittime = $row["edittime"];
$editorid = $row["editorid"];
$posttopic = $row["posttopic"];
$message = $row["message"];
$posticon = $row["posticon"];
$ip = $row["ip"];

$result1 = mysql_query("SELECT username FROM bb1_user_table WHERE userid='$userid'");

        while ($row1 = mysql_fetch_array($result1))
                {

                    $username = $row1["username"];
            }

echo "importing $posttopic";
mysql_query("INSERT into post VALUES ('$postid',
'$threadparentid',
'$username',
'$userid',
'$posttopic',
'$posttime',
'',
'$message',
'1',
'1',
'$ip',
'0',
'1',
'$editorid',
'$edittime')")
or die(mysql_error());


echo "...done <br>";
}
echo "<b>imported Posts</b>";

mysql_close();
?>
Any help would be appreciated.
Thank You,
Paul

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-03-2003, 09:42 PM
pawel pawel is offline
 
Join Date: Feb 2002
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Somebody please help. If I don't get this done I will lose over 5,500 posts.
Thanks,
Paul
Reply With Quote
  #3  
Old 01-03-2003, 09:50 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There no need to bump threads just because nobody as responeded in a few hours.
Reply With Quote
  #4  
Old 01-03-2003, 09:57 PM
pawel pawel is offline
 
Join Date: Feb 2002
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know, I'm sorry, I'm becoming desperate. I will pay someone $50 to fix the above script.
Thank You,
Paul
Reply With Quote
  #5  
Old 05-23-2003, 02:51 PM
pawel pawel is offline
 
Join Date: Feb 2002
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just remembered this post. If anyone needs this I got it working. The code is still a little messy so I will have to clean it up a bit, let me know if anyone is interested in it.
Paul
Reply With Quote
  #6  
Old 07-05-2003, 12:33 PM
Morpheus84 Morpheus84 is offline
 
Join Date: May 2003
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it an wBB 2.1 to vBulletin Converter ?

And if its, is it an wbb 2.0.x to vb3 or wbb 2.1 to vb 2.3.0 converter ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03883 seconds
  • Memory Usage 2,262KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete