Hi everybody,
Copy of the topic I started in the French board.
I got a Mantis 2.5 with the GRAVATAR plugin activated.
I'd like to change the default avatar to get a customized picture.
If the user have a Gravatar account, Mantis display his avatar. If not, it display the default customized picture.
Si I edit the file gravatar.php in /plugins/gravatar/ and I get this code :
------------------------------
function config() {
return array(
/**
* The rating of the avatar to show: 'G', 'PG', 'R', 'X'
* @link http://en.gravatar.com/site/implement/images/
*/
'rating' => self::GRAVATAR_RATING_G,
/**
* The kind of avatar to use:
*
* - One of Gravatar's defaults (mm, identicon, monsterid, wavatar, retro)
* @link http://en.gravatar.com/site/implement/images/
* - An URL to the default image to be used (for example,
* "http:/path/to/unknown.jpg" or "%path%images/avatar.png")
*/
'default_avatar' => self::GRAVATAR_DEFAULT_MYSTERYMAN
);
}
---------------------------
I tried to replace 'default_avatar' => self::GRAVATAR_DEFAULT_MYSTERYMAN par 'default_avatar' => "https://sitename.com/images/avatar.png" but Mantis doesn't display the picture, like it can't find it.
Off course the picture is can be accessed with any browser.
I don't get any error in Mantis so I think the syntax I used is correct.
When I click and open the picture in a new tab from Mantis, I get this message :
I think there's something about how Gravatar works that I don't know but I can't find any clear information about this subject (or I'm not skilled enough to understand them, that's also maybe true)
Can someone help me ?
It's not something critical but I don't like to stand dumb if front of an issue...
Changing Gravatar's default avatar to a custom picture
Moderators: Developer, Contributor
Re: Changing Gravatar's default avatar to a custom picture
you cannot just make that change, it takes more.
Look at the docs and it will demonstrate you how to adjust the default script
http://nl.gravatar.com/site/implement/images/php/
Look at the docs and it will demonstrate you how to adjust the default script
http://nl.gravatar.com/site/implement/images/php/