2010-09-24, 04:20 PM
In SMF 1.1, all but remote avatars are currently not properly handled by the merge.
SMF provides three ways to set an avatar, and consequently three different ways of storing that info in the DB.
Case one: A remote avatar. The URL to the avatar is stored in smf_members->avatar. The merge currently correctly handles this case.
Cases two and three are not currently correctly handled by the merge:
Case two: A local avatar selected from a pre-installed library of avatars. SMF allows admins to upload sets of avatars for users to pick from (and can restrict users to only these avatars); the files are stored in SMF_PATH/avatars. The relative path to the avatar is stored in smf_members->avatar (e.g., if the user picked the avatar corresponding to the file SMF_PATH/avatars/Actors/Bruce_Campbell.jpg, smf_members->avatar will be set to Actors/Bruce_Campbell.jpg). Currently, these are presumed by the functions in users.php to be remote avatars, when they are not. The local avatar repositories should be copied over to the MyBB avatar folder, and the mybb_users entry set to point to a local avatar (don't know how this is done).
Case three: The user uploads their own avatar. These get stored as attachments, and smf_members->avatar is left blank in this case. Instead, an entry in smf_attachments is created with smf_attachments->ID_MEMBER set to the user ID (normally it is left 0). In this case, the filename is not munged (as with regular attachments, whose filenames are altered to include a hash, and worse), thus you can count on smf_attachments->filename to be the correct filename when looking for the file to copy to the MyBB installation.
SMF provides three ways to set an avatar, and consequently three different ways of storing that info in the DB.
Case one: A remote avatar. The URL to the avatar is stored in smf_members->avatar. The merge currently correctly handles this case.
Cases two and three are not currently correctly handled by the merge:
Case two: A local avatar selected from a pre-installed library of avatars. SMF allows admins to upload sets of avatars for users to pick from (and can restrict users to only these avatars); the files are stored in SMF_PATH/avatars. The relative path to the avatar is stored in smf_members->avatar (e.g., if the user picked the avatar corresponding to the file SMF_PATH/avatars/Actors/Bruce_Campbell.jpg, smf_members->avatar will be set to Actors/Bruce_Campbell.jpg). Currently, these are presumed by the functions in users.php to be remote avatars, when they are not. The local avatar repositories should be copied over to the MyBB avatar folder, and the mybb_users entry set to point to a local avatar (don't know how this is done).
Case three: The user uploads their own avatar. These get stored as attachments, and smf_members->avatar is left blank in this case. Instead, an entry in smf_attachments is created with smf_attachments->ID_MEMBER set to the user ID (normally it is left 0). In this case, the filename is not munged (as with regular attachments, whose filenames are altered to include a hash, and worse), thus you can count on smf_attachments->filename to be the correct filename when looking for the file to copy to the MyBB installation.