Skip to content

Feat: add usage of gravatar for user avatars#495

Merged
itinerare merged 8 commits into
lk-arpg:developfrom
ScuffedNewt:main
Jun 4, 2023
Merged

Feat: add usage of gravatar for user avatars#495
itinerare merged 8 commits into
lk-arpg:developfrom
ScuffedNewt:main

Conversation

@ScuffedNewt
Copy link
Copy Markdown
Contributor

No description provided.

@itinerare itinerare changed the base branch from main to develop January 13, 2023 13:32
@itinerare itinerare added the needs review Pull requests that are pending community review label Jan 13, 2023
@itinerare itinerare added the enhancement New feature or request label Jan 13, 2023
Copy link
Copy Markdown
Contributor

@SpeedyD SpeedyD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine except for the jpeg vs jpg file extension..

Comment thread app/Models/User/User.php Outdated
$headers = @get_headers($url);
return $url;
if (!preg_match("|200|", $headers[0])) {
return url('assets/images/avatars/default.jpeg');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...Isn't this a problem? Filename is default.jpeg, while the default file is default.jpg.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to look into this more, and also realised that there's also return $url; on line 348, which means the if-else wouldn't be reached.

That said, url('assets/images/avatars/default.jpeg') should also be url('images/avatars/default.jpg') (inclusive of the jpeg to jpg change.

Copy link
Copy Markdown
Collaborator

@Draginraptor Draginraptor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check over the comments on the User model's getAvatarUrlAttribute function

@SpeedyD
Copy link
Copy Markdown
Contributor

SpeedyD commented Apr 28, 2023

Looking through unmerged PRs, I noticed this one still hasn't been touched, and I realize something..

This is not a toggleable feature. I know of a few sites who are very fond of their default image, and would rather not have Gravatars pick it up by default.

I would like to suggest that, once the other points are fixed, that it's also made to become a toggleable feature.

And Newt? Put an entry on the credits page too, you deserve credit for this.

ScuffedNewt and others added 4 commits May 30, 2023 20:25
# Conflicts:
#	resources/views/comments/_comment.blade.php
#	resources/views/comments/_perma_comments.blade.php
#	resources/views/galleries/submission.blade.php
#	resources/views/user/profile.blade.php
@ScuffedNewt ScuffedNewt requested a review from Draginraptor May 30, 2023 19:31
@itinerare itinerare added reviewed Pull requests that have received community review and are pending merge and removed needs review Pull requests that are pending community review labels Jun 4, 2023
@itinerare itinerare merged commit 7e5936b into lk-arpg:develop Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request reviewed Pull requests that have received community review and are pending merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants