WBB3: Avatars are not being imported Issue Tools
issueid=25574 Tue 20th May '08 9:20am
vBG.com Team
WBB3: Avatars are not being imported

As an (ugly) workaround I added some code above this code in wbb3/004.php:
Code:
			// Check if object is valid
Code:
			if ($sessionobject->get_session_var('get_avatars') AND $data['avatarID'] != NULL AND $data['avatarID'] != '0')
			{
				// Its going to be in the images/avatars/ dir somewhere hopefully.
				$ava_path = $sessionobject->get_session_var('get_avatars_path');
				if(substr($ava_path, -1) != '/')
				{
					$ava_path .= '/';
				}
				if(is_file($ava_path . 'avatar-' . $data['avatarID'] . '.gif'))
				{
					$try->set_value('nonmandatory', 'avatar', $ava_path . 'avatar-' . $data['avatarID'] . '.gif');
				}
				else if(is_file($ava_path . 'avatar-' . $data['avatarID'] . '.jpg'))
				{
					$try->set_value('nonmandatory', 'avatar', $ava_path . 'avatar-' . $data['avatarID'] . '.jpg');
				}
				else if(is_file($ava_path . 'avatar-' . $data['avatarID'] . '.bmp'))
				{
					$try->set_value('nonmandatory', 'avatar', $ava_path . 'avatar-' . $data['avatarID'] . '.bmp');
				}
				else if(is_file($ava_path . 'avatar-' . $data['avatarID'] . '.png'))
				{
					$try->set_value('nonmandatory', 'avatar', $ava_path . 'avatar-' . $data['avatarID'] . '.png');
				}
			}
I'm sure there is a better solution :)
Issue Details
Project ImpEx
Category Incorrectly associated data
Status Fixed (Closed)
Priority 10 - Lowest
Affected Version 1.86
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

Fri 27th Jun '08 12:23pm
ImpEx Developer
 
So I'm guessing the file extension isn't stored any where?
Reply
Fri 27th Jun '08 3:02pm
vBG.com Team
 
Well....the extension is stored in wcf1_avatar.avatarExtension but I was to lazy to include this table in 004.php :)
Reply
Mon 21st Jul '08 5:50pm
ImpEx Developer
 
Ok, will put it in like that for the moment
Reply
Reply