How to count all images of a particular user in category vie
Posted: 28 Apr 2015, 15:46
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)
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!
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;
}
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!