How to disable upload

General Forum
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: How to disable upload

Post by Benno »

Hi,
Hi everyone. As you can see I am new here, therefor I am new to phoca gallery too. I have a noob question: How do I disable the users upload in frontend? I do not want my registered users to have the abillity to upload images. Only I want to have access to that ...
Disable User Control Panel and load up your images in backend...
Kind regards,
Benno
f16jack
Phoca Member
Phoca Member
Posts: 15
Joined: 28 Mar 2014, 20:00

Re: How to disable upload

Post by f16jack »

Easily done.

Have two different Menu items

Menu item 1 - Phoca Gallery Categories. When creating it have it accessible by all Registered Users
Menu item 2 - Phoca Gallery User Control Panel. When creating it have it accessible by Special Users

Now go into the php (on your server) and remove the ability for users to upload on the Category page.
the file is: /components/com_phocagallery/views/category/view.html.php

Edit this file.
go to the section that begins with
// - - - - - - - - - - - - - - - -
// TABS
// - - - - - - - - - - - - - - - -

Just prior to this line place the following script:

/* COMMENTED OUT BY ME

Then go to the end of the TABS section. This is just above the following lines (truncated for brevity):

$this->tmpl['dem'] = '<div style="
// ADD STATISTICS

Right above the $this-> line, end your comments. It should read like this at the end

// **** END OF COMMENTED OUT TABS BY Me
*/
$this->tmpl['dem'] = '<div style="text-align:right;color:#ccc;display:block">Powered by <a href="https://www.phoca.cz/phocagallery">Phoca Gallery</a></div>';
// ADD STATISTICS


By doing this your remove all tabs at the bottom of the category view (including the upload tabs).
Since only you (as a special user) can access the User Control Panel (Menu item 2 above), you are the only one who can upload images from the front end.

voila!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to disable upload

Post by Jan »

Ok, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply