User uploading

Phoca Gallery - image gallery extension
jcmartini
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Mar 2009, 11:24

User uploading

Post 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 ?
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: User uploading

Post 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
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
jcmartini
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Mar 2009, 11:24

Re: User uploading

Post 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.
User avatar
caro84g
Phoca Hero
Phoca Hero
Posts: 1369
Joined: 11 Feb 2008, 17:52
Location: Holland
Contact:

Re: User uploading

Post 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
Please ask your support questions in the forums and not via PM - I delete those PM's
Backup before you do any major change to your website (and test first)
jcmartini
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 05 Mar 2009, 11:24

Re: User uploading

Post 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.
Last edited by caro84g on 06 Mar 2009, 16:43, edited 1 time in total.
Reason: added code tags
Post Reply