collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Posts

Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]


Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]


Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]


Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]


Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]


Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]


search.html.php refer to rsgsearch.css with a wrong path by whazzup
[January 13, 2018, 08:12:04 PM]


Slow Gallery with many Photos by whazzup
[September 22, 2017, 09:22:33 AM]

Limiting sub-gallery depth

  • 2 replies
  • 4335 views
Limiting sub-gallery depth
« on: June 18, 2008, 07:18:28 AM »
Hi,

I've been searching the forums and couldn't find a post.

Basically I want to block users from making sub-galleries in sub-galleries when creating a new gallery in both the front end and the back end.

I've managed to find the function to create a new gallery for the front-end and added a small parentid check that limits the depth, but I can't find the same function for the back-end; hence a user with admin rights can create a sub-gallery in a sub-gallery while logged into the back-end.

How can I stop galleries being made in sub-galleries?

*

Offline john

  • ****
  • 468
Re: Limiting sub-gallery depth
« Reply #1 on: June 18, 2008, 08:43:59 AM »
Hello

the select list where you can select what gallery will be the parent of the newly create gallery is created in administrator/components/com_rsgallery2/option/galleries.class.php - function galleryParentSelectList.

if you remove the addition of child galleries the users won't be able to select them as a parent gallery

john

Re: Limiting sub-gallery depth
« Reply #2 on: June 23, 2008, 12:29:06 AM »
Thanks.

I added to the SELECT query at the start of the function to only select galleries with 0 as its parent.