Please login or register.
Login with username, password and session length
May 23, 2013, 08:11:25 PM
News: We're back! And here to stay!
collapse

* User Info

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

* Recent Posts

Fatal error: by mailtobala04
[May 17, 2013, 04:36:20 PM]


Backend Items (Images) don't work by bauchinj
[May 15, 2013, 04:18:55 PM]


Permissions issue: a user can upload images in other user galleries by guidocx84
[May 11, 2013, 05:17:44 PM]


Payment after loggin by mirjam
[May 11, 2013, 03:02:56 PM]


image titles without dashes by mirjam
[May 11, 2013, 02:57:48 PM]


Batch Upload Fails by mirjam
[May 11, 2013, 02:52:08 PM]


Slow Gallery with many Photos by mirjam
[May 11, 2013, 02:49:36 PM]


500 error Rackspace by mirjam
[May 11, 2013, 02:23:09 PM]

Advertisement


Pages: [1]   Go Down

Author Topic: Limiting sub-gallery depth  (Read 3227 times)

Offline Glen Neil

  • Newbie
  • *
  • Posts: 2

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

  • Retired from Dev Team
  • Sr. Member
  • ****
  • Posts: 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

Offline Glen Neil

  • Newbie
  • *
  • Posts: 2

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.
Pages: [1]   Go Up
 

anything