Posted on: 11/29/05 10:41pm
By: machinari
if (empty ($photo)) { // no photo - try gravatar.com, if allowed if ($_CONF['use_gravatar']) { $img = 'http://www.gravatar.com/avatar.php?gravatar_id=' . md5 ($email); if ($width > 0) { $img .= '&size=' . $width; } if (!empty ($_CONF['gravatar_rating'])) { $img .= '&rating=' . $_CONF['gravatar_rating']; } if (!empty ($_CONF['default_photo'])) { $img .= '&default=' . urlencode ($_CONF['default_photo']); } } } else {and replace it with this slightly expanded version
if (empty ($photo)) { // no photo - try gravatar.com, if allowed if ($_CONF['use_gravatar']) { $img = 'http://www.gravatar.com/avatar.php?gravatar_id=' . md5 ($email); if ($width > 0) { $img .= '&size=' . $width; } if (!empty ($_CONF['gravatar_rating'])) { $img .= '&rating=' . $_CONF['gravatar_rating']; } if (!empty ($_CONF['default_photo'])) { $img .= '&default=' . urlencode ($_CONF['default_photo']); } } elseif (isset($_CONF['use_gallery'])){ $photo = PLG_replaceTags($_CONF['use_gallery']); return $photo; } } else {
// Use avatars from gravatar.com (if set = true). // A gravatar will only be requested if there is no uploaded photo. $_CONF['use_gravatar'] = false; // gravatar.com provides "movie-style" ratings of the avatars (G, PG, R, X). // Setting this to 'R' would allow avatars rated as G, PG, and R (but not X). // $_CONF['gravatar_rating'] = 'R'; // Force a max. width when displaying the user photo (also used for gravatars) // $_CONF['force_photo_width'] = 75; // Use this image when there's neither an uploaded photo nor a gravatar. // Should be the complete URL of the image. // $_CONF['default_photo'] = 'http://example.com/default.jpg';and replace it with this expanded version.
// Use avatars from gravatar.com (if set = true). // A gravatar will only be requested if there is no uploaded photo. $_CONF['use_gravatar'] = false; // gravatar.com provides "movie-style" ratings of the avatars (G, PG, R, X). // Setting this to 'R' would allow avatars rated as G, PG, and R (but not X). // $_CONF['gravatar_rating'] = 'R'; // Force a max. width when displaying the user photo (also used for gravatars) // $_CONF['force_photo_width'] = 75; // Use an image provided by image gallery plugins that support autolinks. // Usually the resulting images include a link to the gallery's larger image. // $_CONF['use_gravatar'] must be set to false in order to enable this option. // Inmemoriam Media Gallery syntax: [thumb:1234] where the number represents // the image ID. // Media Gallery syntax: [album:12 1234] where the first number is an album ID // and the 2nd is the image ID. $_CONF['use_gallery'] = '[thumb:375]'; // Use this image when there's neither an uploaded photo nor a gravatar. // Should be the complete URL of the image. // $_CONF['default_photo'] = 'http://example.com/default.jpg';
Posted on: 11/29/05 10:46pm
By: machinari
Posted on: 12/02/05 03:55am
By: machinari