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.
Options

phpBB convertion problem

uziuzi
edited August 2006 in Vanilla 1.0 Help
I converted my databyse from phpBB and now all users have moderator status! How can I change it automatically to member???

Comments

  • Options
    edited April 2006
    Run the following query in MySQL:
    SELECT `RoleID` FROM `LUM_Role` WHERE `Name` = 'Member';

    You should get a numeric result after execution. This is the role ID that represents member roles. With the value of that result, you should run the following query with replaced values:
    UPDATE `LUM_User` SET `RoleID` = '[member_role_id]' WHERE `Name` <> '[admin_username]';

    The values you should replace are:
    [member_role_id] - this will be the result you got from the first query.
    [admin_username] - this is the username of the administrator of the forum (you definitely don't want to set the role for this user to Member)

    Hope that helps :)
  • Options
    Thank you! It was exactly what I have need! Worked fine!
  • Options
    thinking about converting my punbb install to phpbb, then phpbb to Vanilla.. any other problems that anyone has run into?
  • Options
    I just converted a phpBB forum to Vanilla 1.0 using a modified version of the available script. Worked just fine.
  • Options
    modified similar to what akinwale suggested, or something else? what was modified?
  • Options
    I modified it to not create a new field which supposedly kept track of things, I just figured out a different way. I also modified it to just make every user transfer over as a regular user. It could be adapted per phpBB database to handle groups pretty well actually and switch users to the role of your choice. This would take a little time and know how but its definitely doable. I moved 700 users, 20000 posts, 1500 topics and 24 forums in a matter of minutes once I tweaked the script. I'd be happy to answer questions and help. It just depends on how complex your forum is. You could even just skip the phpBB step and just go straight from punBB. I haven't seen a punBB database but I'd say its a lot cleaner than a phpBB one.
  • Options
    lamentlament
    edited July 2006
    forum is here. i'm definitely itching to move over..

    Total number of registered users: 991
    Total number of topics: 1140
    Total number of posts: 8617
  • Options
    Am i right in thinking you removed the phpBBxxxID columns from the databases metacode? If so I'd be interested to hear how... Does it not transfer every user as a regular user normally?
  • Options
    edited July 2006
    I basically matched my old db index for index. Doing so required a little hands on with both dbs. 1. I looked at the index key on the forums in my phpBB database and compared it with the default general category index key (1) in vanilla. 2. I then edited the vanilla index key on the general category to be different, in this case I changed it to 0 since my phpBB was using 1. 3. I removed the welcome discussion/comment from the vanilla database and compared the newly created admin user index key with my phpBB users index keys (no match) 4. I commented out the line that creates the phpBBxxxID field and changed the input query to use the actual index field in each case (users, forums, discussions and comments.) 5. For the RoleID I just sat it to 3 for everyone (that was the initial index for member in Vanilla). If you were able to look at the phpBB database you could tweak this per conversion. I only had a few groups (roles) on my phpBB and wasn't really using them so I just set everyone to the member role, since I had a new account when I installed Vanilla that was an admin role. Then I switched my role to admin using the vanilla interface after the switch. If someone had a couple of groups you could recreate that easily after seeing the group table and what index keys were used. 6. The only other thing I did was modify the discussion and comment inserts to check the userid, categoryid and discussionid against the originating info in the phpBB tables before doing the insert to make sure I was matching them up in the new database and things would show the right discussion or comments when looking at them in vanilla. This all worked without a hitch and I went from phpBB (2.0.11) to a fresh install of Vanilla 1.0. I'd be happy to help tweak the conversion script and or just send you my changes. The script could just remove the initial category and discussion/comment and even users. An anonymous user is index -1 in phpBB which I just manually deleted after the switch since it no longer gets used. On the topic of the user role after the switch my groups were a bit weird index wise on the phpBB system so if I ran it as is I would have had a lot of admins (I guess I renamed some stuff in my phpBB install overtime and really switched it around from the initial way it was setup). So, I just commented out a few lines and set everyone to a rold id of 3 in Vanilla. After installing a few extensions I had bbcode from phpBB showing up right in Vanilla. I'm still messing with things now but this is the site (its in the midst of a rewrite of sorts for the rest of the site) <a href="http://www.kymba.org/forum/">www.kymba.org</a>
  • Options
    I see. So what you're saying is the ID's for everything in your vanilla forum are identical to what they were in your phpBB forum? Or have i mis-understood?
  • Options
    Yup, thats the much more simple explanation I should have used :)
  • Options
    I see. Any particular reason for that, just out of interest?
  • Options
    Nope, I'm a programmer so I wanted to tinker with things some because of reading that you couldn't use it to go straight to Vanilla 1.0 and decided I could do it without the extra field. What you've created is great and saves a ton of time. It might be good for Vanilla to expand on it even more and encourage others to switch.
  • Options
    the only migration issue I had when looking at the PunBB -> Vanilla is that passwords in PunBB are hashed using SHA1, whereas in Vanilla they're hashed using MD5. This means that regardless of the way you migrate, you'll have to reset peoples passwords. Unless of course you hack your own Vanilla installation to use SHA1 too.
  • Options
    Fair enough metacode. I do have plans to make a better migration system to deal with more conversions but a) I'm lazy b) I'm not that great at programming. if you have some free time and would like to help you're more than welcome?
  • Options
    I'm also lazy :) My programming skills aren't the best either but I can manage to whip somethings together like you have done. I'm sure if someone with more skills looked at my code they would know of a better/faster way. I'd be happy to help in any way possible. I'll clean up what I've done and make it a little more versatile and send you a copy.
  • Options
    edited August 2006
    Hi there everyone. I converted my database from phpBB and now all users have moderator status including myself (the admin. How can I change it everyone to member and make me the Admin user once again. If I run the SQL lines noted above and run it as instructed, everyone of my members including myself gets turned to an applicant. I'm running Vanilla 0.9.2.6 and used the Migrator 0.5 The first query returns a value of: 3, and my admin name is: steve. I hope someone can help, thanks in advance, S
  • Options
    Sorted it after a bit of database tinkering.
This discussion has been closed.