Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[v0.2] phpBB Migrator

1101113151620

Comments

  • Doh, it looks like the post ordering problem is not related to if or when the post was edited,as I originally stated. Instead, I think something is going wrong in the conversion of the timestamp from the seconds-since-1970 UNIX format used in phpBB to the YYYY-MM-DD ISO format used in Vanilla. It's as if the function used to convert timestamp formats doesn't take into account the difference between 12 hour and 24 hour time. Every comment that was made after noon has an incorrect time stamp after conversion. For example, a post that was made at 3 p.m. in phpBB has a timestamp of 03:00:00 after conversion to Vanilla, but it should be 15:00:00. I think I've traced it to the mysqldetail.php script where the DateTimeFromTimeStamp function is defined. I think the lowercase 'h' below (line 20) should be a capital 'H'. return date("Y-m-d h:i:s", $TimeStamp); Sorry for the confusion. I hope that helps.
  • Ahh, how odd. I took that function straight from vanilla so i barely even considered it. If you're happy it works with your suggestion then i'll change it up on the download. Cheers :)
  • I was able to run the migrator again and confirm that the capital 'H' in place of the lowercase 'h' in the DateTimeFromTimeStamp function does indeed fix the post ordering problem I encountered. (Perhaps in whatever context vanilla uses the function, the distinction between 24 hour and 12 hour time doesn't make a difference.) I'm just amazed that I was able to figure it out on my own. This script is much better than what I might have done if I had to do this on my own, which would have been to dump the databases to CSV and clean them up. That would have taken forever. Now, I all I have to do is something about the bbcode problem before I convert for real in a couple weeks. I'll report back if I come up with something.
  • NickENickE New
    edited December 2005
    Just get the value from the bbcode_uid field and do something like preg_replace("/\[(\/?)(.+):$uid\]/", "[\\1\\2]", $Str); (assuming $uid is the bbcode uid and $Str is the post text). That would, of course, change it to universally recognized bbcodes, you'd have to modify it slightly if you wanted it to convert everything to html.
  • Hmm. Could be useful SirNot, then again the migrators bbcode functionality needs completely adding when it moves into the universal migrator. Care to join the team?
  • There's a team? Sure, whatever, although I'm not making any gurantees.
  • lol. well me and ADM had a bit of a conversation about where to go with it. It's just a matter of stopping being lazy and doing something ^o)
  • And I like to be the guinea pig for the migrator. Seeing as my DB is phat.
  • any updates on this guys? does it work with the new vanilla beta release?
  • edited December 2005
    I'm a massive fan of the 'try it and see' methodology. I havent examined the db changes but they seemed mainly to do with roles so chances are at the least the vast majority of it would still work. Roles might just have a bit of funny behaviour. after checking, the only chances to the DB occur on the lum_role table (which i dont touch) and the user table but thats only changing the field type of a column i also dont use (settings)
  • Hi there, I used your migrator and it worked like a charme. The only problem is that I (me, myself, blah ;) ) made a mistake. Since I had to change something in the script, I had to execute it twice. The first time was not completed successfully, but the second did. The result is that I have a great number of "double postings" in my forum. There are many postings added twice by the migrator where the commentid is not the same, but the content/body is. Anyone got an idea how to fix this? I'd like to use phpmyadmin to simply delete the double entries, but I dont know why. Especially since there are no double commentids, but double contents...
  • hi, i have decided to 'vanilla' my phpbb and i use the 'migrator' .. but i have many problems as : Parse error: parse error, unexpected '>' in /home/bezoard/www/vanilla/migrator/discussions.php on line 85 Parse error: parse error, unexpected '>' in /home/bezoard/www/vanilla/migrator/comments.php on line 92 whereas it is working well for 'users', do you know why, how could i fixed it ? thanks
  • This is really wierd. Can anyone with more of a clue than me look at the code (which hasnt changed for quite some time) and explain why it works 'fine' for some people and breaks for others?

    bezoard - just to double check it wasnt a transfer error somewhere, try re-downloading and uploading the migrator. If that doesnt help i'll try thinking deeper.

    akb - if you ran the script twice it's natural it would have doubled some stuff up. All i can suggest is to flush and start over. Sorry it took a while to reply - i'm sure i responded once but it turns out i must have been dreaming.
  • i have the same problems as bezoard, but also in categories :-/
  • Right. I think i might know why. Can you guys grab the latest copy (0.4S) from my server and run through it and see what you get. I'm pretty sure you'll get data transfer errors but you shouldnt get code execution errors.
  • hi minisweeper, well, the problem is that its a great community site which needs to save its topics. its much, very much... but we dont want to lose it. i still got the old (phpbb) backup here, but there are enough new entries that i dont want to lose too... and i dont think i can filter them out and merge it later... bit of a problem i think :-/ i know this has to work somehow with mysql directly... but i am not that killer in mysql...
  • Hmm. Well you could make a script which ran through the entire database and checked if there was a post with the same phpBBid value and deleted one if so (which would take a fair bit of time)
    What might be easier is to wipe everything which *has* a phpBBid value (your new comments shouldnt do) and then run the migrator again on the old set of data. I think that should be easier and less resource intensive. Though whether you can wipe all the phpBB stuff with a single command i'm not sure.

    Before you do anything, though, backup your current stuff :)
  • ah... your last idea sounds interesting. never thought of that, but in theory this should help :-) now i only need some time to do this :D
  • akbakb
    edited February 2006
    i got something for these parse errors. theres one line few lines above with an syntax error. in case of comments.php this error is at line 74. the line says: echo "<br> ERROR ROW ".$count."; but has to be echo "<br> ERROR ROW ".$count; since the last added quote "comments" all the following out. edit: btw... minisweeper, it worked :-) i killed all phpbbpostid != 0, exported the entries that were not killed (the new ones after migration), emptied the table and imported again. now i got no double postings any more :-)
  • edited February 2006
    awesome :)
    and yeah, i keep meaning to fix that
    *does it now*

    //seems i already did. you must have had an older version. glad it worked for you anyway
Sign In or Register to comment.