OpenSanghaFoundation / OSF

Bug/Feature requests tracking and documentation managament
https://opensanghafoundation.org
0 stars 0 forks source link

Multiple issues with User-Photo-Gallery (user-photo-gallery) page #39

Closed coiby closed 1 month ago

coiby commented 1 month ago

Describe the bug

  1. It shouldn't list the thumbnails (smaller images) of the profile photo
  2. There are warnings on the page Screenshot_2024-05-24_20-52-50
  3. A uploaded image doesn't show immediately on the page and refreshing the page is needed
  4. "User this photo as profile photo" doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Go to Profile
  2. Click on User Photos
coiby commented 1 month ago

If this is not a feature for launching the website, we should take them down for now to focus our energy on thoroughly testing the website and fixing found bugs. If it's a must, I'd suggest to use the User Photos - Ultimate Member extension and as follows is a demo, Screenshot_2024-05-24_21-02-12

OSFOSF commented 1 month ago

40x40 and 80x80 not shown foreach ($files as $file) { if ($file == "." || $file == "..") continue; if (strpos($file, '40x40') !== false || strpos($filename, '80x80') !== false) { continue; }

warning fixed (display-name changer to display_name

A uploaded image doesn't show immediately fixed with header('Location: https://opensanghafoundation.org/newsite/user-photo-gallery/'); exit();

"User this photo as profile photo" doesn't work. fixed

coiby commented 1 month ago

40x40 and 80x80 not shown foreach ($files as $file) { if ($file == "." || $file == "..") continue; if (strpos($file, '40x40') !== false || strpos($filename, '80x80') !== false) { continue; }

Profile Photo thumbnails could use different size. So the above fix fail to address the case where there are 120x120 thumbnails. Again, I strongly recommend to use UM User Photos - Ultimate Member extension instead of rolling out own implementation.

OSFOSF commented 1 month ago

there are no 120x120 photos and um does not make any and the photos we allow to be uploaded are set to 200x200 and some 400x400 so the code we have is good and there is nothing to be done and not estra plugins needed for this.  and the forloop works just fine and i would not know how to use a um plugin on this page.

we may need that plugin to get the photo on the add-place page to make the uploaded photo the avatar.  in any case i hope that you will fix this bug and if you have already dome that thanks,   On Monday, June 3, 2024 at 04:51:50 AM GMT+7, Coiby @.***> wrote:

40x40 and 80x80 not shown foreach ($files as $file) { if ($file == "." || $file == "..") continue; if (strpos($file, '40x40') !== false || strpos($filename, '80x80') !== false) { continue; }

Profile Photo thumbnails could use different size. So the above fix fail to address the case where there are 120x120 thumbnails. Again, I strongly recommend to use UM User Photos - Ultimate Member extension instead of rolling out own implementations.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.Message ID: @.***>

OSFOSF commented 1 month ago

there are no 120x120 and um does not allow so no need to add the code forr 120x120

coiby commented 1 month ago

According to https://docs.ultimatemember.com/article/1542-profile-photo-size, obviously 190x190 exists and 120x120 can also exist if configured,

The profile photo uploader creates several thumbnails (smaller images) and compresses images (only for JPEG images).

Use setting "Profile Photo Thumbnail Sizes (px)" to set thumbnails sizes for profile photos. Default thumbnails sizes:

  • 40px - small image (used for messages, etc.)
  • 80px - medium image (used for activity wall, groups, etc.)
  • 190px - main image (used for account, profile, members, etc.)

Screen wp-admin > Ultimate Member > Settings > General > Uploads