Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Importing PHPBB3 Avatars and Signatures
meshugy
✭✭
Can anyone offer any advice on how to import avatars and signatures from PHPBB3 into Vanilla? This operation is not performed by the importer so I'll need to find another way to do it.
Thanks,
Michael
0
Comments
if the avatars are actual file locations you can transfer them to uploads/userpics then there is a filed in the user table so obviously you will perform a text replace in your query.
if it is not actually file location, you will need to find the reference to the actual location and use that.
Signatures is a plugin,
It uses the UserMeta table, so is not sort in the User Table column, instead it is stored as key=>value.
So in the you put the
[UserID], 'Sig', 'Actual text'
grep is your friend.
Thanks for the reply...
I have over 4000 users so I need some way of mapping the imported users in Vanilla with the old avatar images from PHPBB3. Is they any script that will perform this function? I uploaded all the images into the uploads/userpics folder but they still need all the file locations to point to the correct images. I there a way to automate this?
thanks!
If the userId in phpbb was for example 1391, there is no way to say that thecsame user will have that userId. If avatar 1391 belongs to userId 1391 and in old database the UserName was 'x00' but now it's 'UnderDog' I will suddenly get x00's avatar
You can do a couple of things ... if x00 comes up with something, take his idea...
Make an extra field in the Vanilla DB and make sure it's filled with the old UserID from PhpBB. You might need to change the import script for that
Another option is to copy phpbb's user table and Vanilla's User table (in a separate database), inner join them on the UserName (careful!) And create a new table. You now know the old UserID and the Vanilla UserID
There was an error rendering this rich post.
I took a closer look at the databases and the user ids match perfectly. I tried to copy all the avatar file names from phpbb with this MYSQL statement:
update vanilla_django_forum.GDN_User, django_forum.phpbb_users
set vanilla_django_forum.GDN_User.Photo = django_forum.phpbb_users.user_avatar
where vanilla_django_forum.GDN_User.UserID = django_forum.phpbb_users.user_id;
I didn't get an error, but it didn't copy the file names either. Any idea what the correct syntax is for this operation? I'm trying to copy the file names store in the field user_avatar from my phpbbb database to the Photo field in the Vanilla database.
thanks,
Michael
I copied the phpbb user table into the Vanilla database and then performed this operation:
INSERT INTO
GDN_User
(Photo
) SELECTuser_avatar
FROMphpbb_users_new
That worked!
ok, so now I have all the old phpbb avatars in the /uploads/userpics folder with file names matching the Photo field of the GDN_User table. However, the avatars aren't displaying....what am I missing here?
...
BTW the correct format would have been an update with a join and where condition. But your way happened to viable in this case.
grep is your friend.
You are going to have to debug. Are the avatar set with view permissions, it the path absolute right (relative/absolute).
grep is your friend.
Ok, I figured it out. The file paths in the Photo field of the GDN_User table need to be userpics/img.jpg
So I ran this query:
UPDATE
GDN_User
SETPhoto
=CONCAT("userpics/",Photo
) WHEREPhoto
LIKE "%jpg"Some avatars had gif or png extensions so I did the same for those.
Then, I renamed all the avatar filenames of the images themselves in bulk to have the prefeix "n" (i.e. "nimg.jpg) and then made a whole other copy of all the avatar images and added the prefix "p" (i.e. "pimg.jpg). I uploaded both sets of images to the uploads/userpics folder and BINGO, all avatars imported from phpbb!
Now I'm wondering if anyone has a good method for importing phpbb signatures? In phpbb the signatures are stored in a field of the phpbb_user table. In Vanilla, they are stored separately in the GDN_UserMeta table. I guess I'd need a SQL query that would copy the signature and id fields from the phpbb_user table and insert them into the GDN_UserMeta table. That may be a little beyond my skill, any suggestions?
@meshugy
glad you resolved it.
http://vanillaforums.org/discussion/comment/196973/#Comment_196973
you could possibly improve things by physically resizing all nXXXimage.xxx to 40 x 40.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks, just resized!
I just discovered the latest importer which fixes nearly all the import issues I was having and low and behold, it imports signatures as well!
https://github.com/lincolnwebs/VanillaPorter
I've released a new version of the Porter.