Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue #1 #3

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Fixing issue #1 #3

wants to merge 10 commits into from

Conversation

saimiri
Copy link

@saimiri saimiri commented Oct 2, 2014

Hi,

I have made some changes that enable members to choose whether to use Gravatar or not. I also added a checkbox on the plugin's settings page which, when checked, forces every member to use Gravatar.

If a member hasn't uploaded an image he/she will get the Gravatar regardless of his/her settings.

In addition, I have also added a tiny bit of JavaScript to members' Settings page that will hide their original (uploaded) avatar and/or the link to gravatar.com when appropriate. It also replaces the Gravatar image with the uploaded image when a member unchecks the "Use Gravatar instead of your own image" checkbox, because I felt it was confusing when it showed the Gravatar.

Three new translatable strings have been added:

$definitions["Force all members to use Gravatar"] = "Force all members to use Gravatar";
$definitions["Use Gravatar instead of your own image"] = "Use Gravatar instead of your own image";
$definitions["Note: This setting has no effect if you haven't uploaded your own image."] = "Note: This setting has no effect if you haven't uploaded your own image.";

I'm sure you want to suggest some improvements to them, as my use of the English language has become somewhat sloppy in recent years. Not enough practice, I'm afraid.

A question regarding line 139 in plugin.php: Should gravatar.useGravatar be Gravatar.useGravatar instead?

@saimiri
Copy link
Author

saimiri commented Oct 3, 2014

I moved the code that generates the URL for uploaded avatars into a static method ETPlugin_Gravatar::getUploadedAvatarSrc() to have it in one place.

Also, as an experiment I wrapped the plugin name and description with the T() function. It seems to work after the plugin is installed but not before. Is there any reason why this shouldn't be done? It would be nice to have translations for these, also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant