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

Phoca Gallery - image gallery extension
Wundertyros
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Jul 2010, 15:16

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

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Wundertyros
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 20 Jul 2010, 15:16

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

Post by Wundertyros »

So, I can not limit the number of the images.
What a pity!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Post Reply