To use Meez avatars instead of user-uploadable pictures throughout your website, follow this step-by-step guide.

These instructions assume that that you are using a phptemplate-based theme named "MYTHEMENAME". Adjust as necessary for your particular configuration.

  1. Install Meez integration module
  2. Visit admin/user/profile/add/textfield to add a profile field to hold your Meez username. I filled in the form as follows:
    Category: Avatar
    Title: Meez Username
    Form name: profile_meez
    Explanation: Go to <a href="http://www.meez.com/" target=_blank>www.meez.com</a>, create an account, and build an avatar. Then come back here and fill in your Meez username to link the newly-built avatar to your account here.
    Visibility: (*) Hidden
  3. In your theme directory, add the following to your template.php file:
    Note: if your template.php file already has a MYTHEMENAME_theme() function, just combine its contents with the one provided here.
          /* Add custom theme hooks */
          function MYTHEMENAME_theme(&$existing, $theme, $path) {
            /* Add hooks for custom-themed user picture */
             $hooks['user_picture'] = array(
              'arguments' => array('account' => NULL),
              'preprocess functions' => array('MYTHEMENAME_preprocess_user_picture'),
              'template' => 'user-picture',
            );
          }
          function MYTHEMENAME_preprocess_user_picture(&$vars, $hook) {
            /* replace picture with Meez avatar */
            $imgattr = array('class'=>'picture');
            $account = $vars['account'];
            $data = unserialize($account->data);
            if (isset($data['avatars']['head_sm'])) {
              $head_sm = $data['avatars']['head_sm'];
              $imgsrc = trim($head_sm->src);
              $imgattr['width'] = $head_sm->width;
              $imgattr['height'] = $head_sm->height;
            }
            else {
              $imgsrc = variable_get('user_picture_default', '');
            }
    
            if (isset($imgsrc)) {
              $picture = theme('image',$imgsrc,'avatar','',$imgattr,FALSE);
              if (isset($account->name)) {
                $name = $account->name;
                $alt = t("@user's profile", array('@user' => $name));
                if (!empty($account->uid) && user_access('access user profiles')) {
                  $picture= l($picture, "user/$account->uid", array('alt' => $alt, 'title' => $alt, 'html'=>TRUE));
                }
              }
              $vars['picture'] = $picture;
            }
          }
    
  4. In your theme directory, create a file called user-picture.tpl.php and paste the following code into it:
    if (isset($picture)) { print $picture; }
  5. If you use APC with apc.file_update_protection = 0 then you need to restart your webserver at this point.
  6. Visit admin/settings/performance and click on the Clear Cache button.
  7. Visit admin/user/settings and make sure that Picture support is (*) Enabled.
  8. Visit admin/build/themes/settings and make sure that Display post information on is checked for at least one content type. Also check make sure that your MYTHEMENAME configuration has User pictures in posts and/or User pictures in comments checked.
  9. Register at meez.com, build an avatar, and save it.
  10. Update your My Account settings to add your Meez Username to your profile.
  11. Create a test page/comment that has Display post information enabled and your Meez avatar should appear.