diff --git a/gravatar.tgz b/gravatar.tgz index 38e942f8..25106f26 100644 Binary files a/gravatar.tgz and b/gravatar.tgz differ diff --git a/gravatar/gravatar.php b/gravatar/gravatar.php index b9435a31..fc5358eb 100644 --- a/gravatar/gravatar.php +++ b/gravatar/gravatar.php @@ -2,7 +2,7 @@ /** * Name: Gravatar Support * Description: If there is no avatar image for a new user or contact this plugin will look for one at Gravatar. - * Version: 1.0 + * Version: 1.1 * Author: Klaus Weidenbach */ @@ -12,7 +12,7 @@ function gravatar_install() { register_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup'); - logger("installed gravatar"); + logger("registered gravatar in avatar_lookup hook"); } /** @@ -21,7 +21,7 @@ function gravatar_install() { function gravatar_uninstall() { unregister_hook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup'); - logger("uninstalled gravatar"); + logger("unregistered gravatar in avatar_lookup hook"); } /** @@ -81,7 +81,16 @@ function gravatar_plugin_admin (&$a, &$o) { 'x' => 'x' ); - $o = ''; + // Check if Libravatar is enabled and show warning + $r = q("SELECT * FROM `addon` WHERE `name` = '%s' and `installed` = 1", + dbesc('libravatar') + ); + if (count($r)) { + $o = '
' .t('Information') .'

' .t('Libravatar addon is installed, too. Please disable Libravatar addon or this Gravatar addon.
The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar.') .'



'; + } + + // output Gravatar settings + $o .= ''; $o .= replace_macros( $t, array( '$submit' => t('Submit'), '$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars),