Page 1 of 1
User uploading
Posted: 05 Mar 2009, 11:54
by jcmartini
First, thank you for Phoca Gallery it's a great component!
As you told in the documentation in the item about front-end uploading:
"To show the uploaded images and newly created categories you need to create a second menu-item with the type 'Phoca Gallery Category List Layout'. Here you can turn off 'enable user control panel' in the component-parameters. The upload goes through the other menu item."
It seems to me (with user still logged) that upload panels still appear even when I switch off 'enable user panel' at menu level (both Java upload and single file upload panels). They appears without the panel for categorie editing (!).
I tried it with version 2.20 and 2.22 with the same results.
How do I suppress completely theese panels in the page where I show album ?
Re: User uploading
Posted: 05 Mar 2009, 12:47
by caro84g
Hi,
make sure you edit the right menu item. (the menu item with the category list layout)
and could you post a link
Regards, Carolien
Re: User uploading
Posted: 06 Mar 2009, 11:09
by jcmartini
Hello Carolien,
I did several tests with that parm 'enable user control panel' and I see no differences. Panels were perfectely added (category editing and file uploading), but I can't disable showing them. I thought about a bug, because if I disable that parm the panel 'category editing' does not appear anymore, but the panels for uploading file are still present (Java uploader and single file uploader).
I can't post a link because my test site is not yet on the net.
Re: User uploading
Posted: 06 Mar 2009, 12:28
by caro84g
Hi,
to make sure I understand you:
You have 2 menu-items. On is a 'phoca gallery category list layout', the other is 'phoca gallery user panel layout'.
You want to disable the user upload panel under 'phoca gallery category list layout', so you edited the component-parameters of this menu item (2nd box on the right) and set display user control panel to no.
The problem is that it still shows a user control panel (upload panel) when you view a category.
Am I correct, or do I try to solve the wrong problem?
Regards, Carolien
Re: User uploading
Posted: 06 Mar 2009, 16:40
by jcmartini
Yes, I did it as it's descibed in documentation and as you told it. My problem is solved with the following change in:
/component/com_phocagallery/views/category/view.html.php
I replace the following code at line 447:
Code: Select all
if (isset($catParams->params)) {
$rightDisplayUpload = PhocaGalleryHelper::getUserRight($catParams->params, 'uploaduserid', 1, $user->get('aid', 0), $user->get('id', 0), 0);
}
if ($rightDisplayUpload == 1) {
$tmpl['displayupload'] = 1; $document->addCustomTag(PhocaGalleryHelperRender::renderDescriptionUploadJS((int)$tmpl['maxuploadchar']));
}
by :
Code: Select all
if (isset($catParams->params)) {
$rightDisplayUpload = PhocaGalleryHelper::getUserRight($catParams->params, 'uploaduserid', 1, $user->get('aid', 0), $user->get('id', 0), 0);
if (PhocaGalleryHelper::getParamsArray($catParams->params, 'enable_user_cp') == 1) {
if ($rightDisplayUpload == 1) {
$tmpl['displayupload'] = 1;
$document->addCustomTag(PhocaGalleryHelperRender::renderDescriptionUploadJS((int)$tmpl['maxuploadchar']));
}
}
}
Thanks for your help.
Best regards.