MyBB Community Forums

Full Version: SMF 1.1 avatars
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
You get all 3 on mybb to except uploadedavatars are stored as files not attachments when you merge you attachments it will also merge the avatars but will read them as attachments and not avatars.
Actually, the attachment part of the merge doesn't handle avatars entirely correctly, because of issues surrounding the filename. Although the DB entries are created for the second case listed above, the actual files are never copied, and the avatar type is incorrectly set to "remote". So, I stand by my claim that neither cases 2 nor 3 are merged correctly.
personally i would just scrap the avatars and get members to reupload them.
plus they are aware there are problems with smf attachments in the merge system and these are being looked into i belive
Actually have you read through this http://community.mybb.com/thread-75867.html.