mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #57 from jaredkipe/master
FIX: Full Gravatar API implementation.
This commit is contained in:
commit
0711ce5913
@ -28,6 +28,8 @@ class Commenting {
|
||||
'include_js' => true, // Enhance operation by ajax behaviour on moderation links
|
||||
'use_gravatar' => false, // set to true to show gravatar icons,
|
||||
'gravatar_size' => 80, // size of gravatar in pixels. This is the same as the standard default
|
||||
'gravatar_default' => 'identicon', // theme for 'not found' gravatar (see http://gravatar.com/site/implement/images/)
|
||||
'gravatar_rating' => 'g', // gravatar rating. This is the same as the standard default
|
||||
'show_comments_when_disabled' => false, // when comments are disabled should we show older comments (if available)
|
||||
'order_comments_by' => "\"Created\" DESC",
|
||||
'comments_per_page' => 10,
|
||||
|
@ -404,7 +404,9 @@ class Comment extends DataObject {
|
||||
if ($use_gravatar) {
|
||||
$gravatar = "http://www.gravatar.com/avatar/" . md5( strtolower(trim($this->Email)));
|
||||
$gravatarsize = Commenting::get_config_value($this->BaseClass, 'gravatar_size');
|
||||
$gravatar.= "?s=".$gravatarsize."&d=mm";
|
||||
$gravatardefault = Commenting::get_config_value($this->BaseClass, 'gravatar_default');
|
||||
$gravatarrating = Commenting::get_config_value($this->BaseClass, 'gravatar_rating');
|
||||
$gravatar.= "?s=".$gravatarsize."&d=".$gravatardefault."&r=".$gravatarrating;
|
||||
}
|
||||
|
||||
return $gravatar;
|
||||
|
Loading…
Reference in New Issue
Block a user