Despite being a relative noobie I was able to solve this creating a plugin in qa-plugin/avatar as follows. Basically it forces gravatars on for new users, and also changes the img url used for gravatars to include : I also incremented the flags field in the user database by 8 for each existing avatar who I wanted to turn gravatars on. Hope this is all reasonable.
qa-plugin.php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../../');
exit;
}
qa_register_plugin_overrides('qa-avatar-users-edit.php');
qa_register_plugin_overrides('qa-avatar-format.php');
qa-avatar-format.php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../');
exit;
}
function qa_get_gravatar_html($email, $size)
{
if ($size>0)
return '<IMG SRC="'.(qa_is_https_probably() ? 'https' : 'http').
'://www.gravatar.com/avatar/'.md5(strtolower(trim($email))).'?d=identicon&s='.(int)$size.
'" WIDTH="'.(int)$size.'" HEIGHT="'.(int)$size.'" CLASS="qa-avatar-image" ALT=""/>';
else
return null;
}
qa-avatar-users-edit.php
if (!defined('QA_VERSION')) { // don't allow this page to be requested directly from browser
header('Location: ../');
exit;
}
function qa_create_new_user($email, $password, $handle, $level=QA_USER_LEVEL_BASIC, $confirmed=false) {
$userid = qa_create_new_user_base($email, $password, $handle, $level, $confirmed);
if (qa_opt('avatar_allow_gravatar'))
qa_db_user_set_flag($userid, QA_USER_FLAGS_SHOW_GRAVATAR, true);
return $userid;
}