phpBB2Drupal is working great for me so far, so maybe I'm missing how to set this... but when using it to import users, it doesn't retain their join dates -- it sets the date as today. Senority is pretty important to my community so this is a must-have for me :) Please let me know how I can do this.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | phpbb2drupal_created.diff | 760 bytes | webchick |
Comments
Comment #1
beginner commentedSomebody complained about that already.
phpbb2drupal uses the Drupal User API to import the users. I'm going to have a look if it's possible to import the registration date, too.
Comment #2
stephthegeek commentedAh, I missed that. FWIW, 'user_regdate' in 'nuke_bbusers' (my phpBB db) looks like it matches up with 'created' in Drupal's 'users'.
Comment #3
beginner commentedyes.
there is a line in the module that maps the one to the other:
But for some reasons, the date is still not being imported.
I am right now coding another new feature for phpbb2drupal (get rid of bbcode altogether). If you want to provide a patch for the user reg date issue, i'll be able to commit it later today. If not, I'll check this issue further when I'm done with bbcode.
Comment #4
beginner commentedI found the problem: Drupal was overriding the registration date with now() when importing the new user.
I have to go to work, now. I'll update cvs with a fix in a 4/5 hours.
Comment #5
beginner commentedfixed in cvs.
Thanks for reporting.
Comment #6
stephthegeek commentedThank you very much!
Comment #7
beginner commentedYou're welcome.
By the way:
should read:
By the way:
;-)
nice site.
Comment #8
stephthegeek commentedThanks beginner :)
Small problem... for some reason a large number of my join dates in phpbb are in a regular short date format (ie. "Mar 22, 2005"). I know it's a long shot, but I just realized this as I'm about to go live and I was wondering if someone would be so kind as to provide a quick query to manually update my join dates from phpbb to drupal to account for both types of date formats.
Comment #9
stephthegeek commentednm, figured it out... updated source data to unix timestamp first with
UPDATE 'nuke_bbusers' SET user_regdate = UNIX_TIMESTAMP(STR_TO_DATE(user_regdate, '%b %e, %Y')) WHERE user_regdate LIKE '%,%'Comment #10
beginner commentedThanks for posting the fix: that may help someone else.
Comment #11
(not verified) commentedComment #12
hakeem commentedWaw! I used the latest update on a linux webserver but all the regdates are 36 years 28 weeks! My website is less than two years old!
Comment #13
beginner commentedthis worked for me and for others.
Can you have a look at your phpBB DB, in the phpbb_users table: what kind of values do you have in the field user_regdate?
Can you give me the value for 2-3 users?
Comment #14
beginner commentedalso give me the list of all phpBB MODs you have installed on your system.
Comment #15
hakeem commentedThe date format is like 'Sep 28, 2004', 'Oct 05, 2004'... I think I should convert these values to Linux timestamp format. Right?
My website is a community for medical students in Damascus University. Why you asked about phpBB mods? I think there is none.
Comment #16
beginner commentedYes.
Comment #17
rkn-dupe commentedJust to let you know regdates are fine for me.
Comment #18
webchickWrapping $user->user_regdate in a strtotime() solved this issue for me (my regdates were like "Aug 01, 2004" as well). Not sure how it affects dates which are already timestamped, though.
Comment #19
beginner commentedThanks webchick for pointing out the function strtotime().
The function does espect a date in the English US format, so I added a setting for such users.
Comment #20
(not verified) commented