Page 1 of 1

How to count all images of a particular user in category vie

Posted: 28 Apr 2015, 15:46
by Wundertyros
Hi,

I use phoca gallery 4.2.1 .
In UCP the upload limit works because only the owner of the category can upload.
In category view it does not work, because the owner is not the only one who can upload.

I found the following core hack in the phoca forum:

…com_phocagallery/controllers/category.php
(line 420: single user upload)

Code: Select all

$maxUserImageSize = (int)$paramsC->get( 'user_images_max_size', 20971520 );
$allFileSize  = PhocaGalleryFileUploadFront::getSizeAllOriginalImages($file, $user->get('id', 0));
   
if ($maxUserImageSize > 0 && (int) $allFileSize > $maxUserImageSize) {
$errUploadMsg = JText::_('COM_PHOCAGALLERY_WARNING_USERIMAGES_TOOLARGE');	
$app->redirect($redirectUrl, $errUploadMsg);
return false;
			}
But I need to change the limit.
So I want to summarize the overall UserImageSizes of all categories of a particular user.

Maybe better, I want to count all uploaded images of all categories of a particular user.

How do I change the code? I would be grateful for any help.

Thank you!

Re: How to count all images of a particular user in category

Posted: 30 Apr 2015, 00:10
by Jan
Hi, in Options of Phoca Gallery, you can set the limit in size:

Maximal Size of all User's Images Set maximal size of all user's images which can be uploaded (Only original images are included, not thumbnails)


https://www.phoca.cz/documents/2-phoca-g ... e-joomla-3

Jan

Re: How to count all images of a particular user in category

Posted: 01 May 2015, 16:38
by Wundertyros
So, I can not limit the number of the images.
What a pity!

Re: How to count all images of a particular user in category

Posted: 02 May 2015, 15:13
by Jan
Hi, no as most of the users wanted to limit the real size of the images then count of the images (e.g. one image can have 3MB but 100 images can have 2MB) So the limit for size was selected.

Jan