0 Members and 1 Guest are viewing this topic.

Here is what I understand about Private albums:
  • there seems to be an unlimited number of albums that can be added if the membership level allows it (seems like a design flaw)
  • the value 'Number of Photos allowed to upload' on the membership (which is $userdata['uploadpicturecnt'] below) is a limit per album, not a limit of all the private pictures allowed.

In admin/userpics.php, we have 

Code: [Select]
$t->assign('max_picture_cnt', (count($data) < $userdata['uploadpicturecnt'])? count($data) : $userdata['uploadpicturecnt'] );

  • max_picture_cnt (a value used in the template as the limit for a loop) to be the lesser of count($data) or $userdata['uploadpicturecnt']
  • $data - is an array of all the member pictures, count is a total of all pictures (profile and gallery/private)
  • $userdata['uploadpicturecnt'] is the max # of pictures this member can have according to the membership setting.

Let's say for the membership of the user, the max profile pic count is 10, and max private pic count is 10
  • if the user has 5 profile pics and 4 private pics, 9 < 10, so max_picture_cnt is set to 9. All is good on the template as 9 profiles are displayed.
  • if the user has 5 profile pics and 6 private pics, 11 < 10, so max_picture_cnt is set to 10. However, the template only brings back 10 out of the 11 pictures.  This is a problem.


Since we are in Administration mode, we simply want to bring back whatever pictures have been uploaded.


The code should be updated to

Code: [Select]
$t->assign ('max_picture_cnt', (count($data)));

This way, on the Admin site, all the pictures can be retrieved for updates if needed.

I am not sure why the code was written the way it was originally or if there is a combination of profile/private counts that would make sense with the original code. In my production version, there were uploaded pictures that could not be accessed on the administration site until this change was made
PHPStorm, MAMP Pro, Sequel Pro
Currently converting my 2.1.6 site to osDateEvo 1.2

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: osDateEvo v1.2 admin/userpics.tpl has a potential bug with max_picture_cnt
« Reply #1 on: November 28, 2017, 09:53:35 PM »
Hi arievaul,

Thanks for that, will look at it soon.

Not sure why or what, but this was done by the original developers .
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: osDateEvo v1.2 admin/userpics.tpl has a potential bug with max_picture_cnt
« Reply #2 on: November 28, 2017, 11:03:43 PM »
Hi arievaul,

In osDateEvo in the standard templates in the admin, I can see and edit all photo's including the albums and profile pics.

The albums and Profile pics are all in one area.
I have attached a screenshots.
« Last Edit: November 28, 2017, 11:05:37 PM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

Re: osDateEvo v1.2 admin/userpics.tpl has a potential bug with max_picture_cnt
« Reply #3 on: November 28, 2017, 11:17:16 PM »
Hi Phill,

That's true in my version as well - both Profile, Public and all Private photos are edited on the same page.

The issue occurs when the total count of photos exceeds the count that is allowed for private photos (based on the membership).

For example, if the membership count for private photos is 10, but there are 5 profile photos and 6 private photos, then the template only brings back 10 photos, even though the total of all phots is 11. After the change, the template will bring back however many photos there are regardless of profile/public/private.

PHPStorm, MAMP Pro, Sequel Pro
Currently converting my 2.1.6 site to osDateEvo 1.2

*

Pharg

  • *****
  • 3,118
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: osDateEvo v1.2 admin/userpics.tpl has a potential bug with max_picture_cnt
« Reply #4 on: November 28, 2017, 11:26:47 PM »
Hi arievaul,

Oh ok I understand better now, I will have another look soon, thanks  :)
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35