Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2]   Go Down

Author Topic: Administrators not in Registered User group?  (Read 15135 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Administrators not in Registered User group?
« Reply #20 on: January 21, 2004, 10:39:33 am »

like I said earlier in this thread: this has been fixed for the dev version (next release).

GauGau
Logged

Trinity

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Free
« Reply #21 on: January 23, 2004, 08:10:34 am »

I agree and I think we all would like to se this fixed, but the bottom line here.... IT"S FREE. You may want to show a little more respect for these guys that have spent a ton of time putting this awesome gallery together anf GAVE it to you for nothing.  :P


I for one want to take a sec to tell them how I feel. THANKS GUYS!!!

I love the proggy keep up the good work, and please be patient with us as we forget sometimes that this stuff has been given to us and act as if you owe us something, when in reality you have no obligations to us at all.

Many Thanks
Trin
Logged

LiX

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 27
Administrators not in Registered User group?
« Reply #22 on: February 15, 2004, 02:30:13 pm »

:evil:  this discussion is just frustrating...

thanx for your fix anyway malc
Logged

javara

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Administrators not in Registered User group?
« Reply #23 on: February 25, 2004, 08:21:02 am »

The MOD you created, does only work if you're admin group is called "Administrators" isn't it?
Logged

javara

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Administrators not in Registered User group?
« Reply #24 on: February 25, 2004, 08:29:47 am »

I've used this code:

Code: [Select]

if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || $visibility == $USER_DATA['group_id'] || $USER_DATA['group_id'] == '1') {


The same als Malc posted but than it checks for groupID, where the admins are always 1.
Malc's code only works if your admin group is called "Administrators"
Logged

javara

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Administrators not in Registered User group?
« Reply #25 on: February 25, 2004, 08:41:09 am »

Hmmmmzzz...

Now the private album for the "registered" groups can see the thumbnail [after clicking the category-link first, to browse one cat.] but when clicking-on the private-album thumbnail, there's no album ID specified.

Also you only see the thumbnail on the specific catergory page. There's no text or anything next to it
Logged

javara

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Administrators not in Registered User group?
« Reply #26 on: February 25, 2004, 09:07:43 am »

Quote from: "javara"
Hmmmmzzz...

Now the private album for the "registered" groups can see the thumbnail [after clicking the category-link first, to browse one cat.] but when clicking-on the private-album thumbnail, there's no album ID specified.

Also you only see the thumbnail on the specific catergory page. There's no text or anything next to it


Also chose "yes" for "show private icon for anonymous users"
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Administrators not in Registered User group?
« Reply #27 on: February 25, 2004, 09:18:42 am »

Quote from: "javara"
Also chose "yes" for "show private icon for anonymous users"


Which takes you back to where you where without the mod  :?
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

lendy

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Here's the code...
« Reply #28 on: February 26, 2004, 04:04:33 am »

I think add

    $sql = "SELECT a.aid, a.title, a.description, visibility, category, ...
            $visibility = $alb_thumb['visibility'];
            $category = $alb_thumb['category'];
            if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || strstr(USER_GROUP_SET, $visibility) || $category == (FIRST_USER_CAT + USER_ID)) {

$category == (FIRST_USER_CAT + USER_ID)

then,you can view and edit your albums.

1.2.1 can't view and edit self albums,if albums visibility is not  0 or
FIRST_USER_CAT + USER_ID
it not logic,i think it is bug!

Quote from: "malc"
I don't know why GauGau thinks the solution is not that simple, 'cos here's a quick Mod to do what you want.  It involves changing exactly three lines!

In index.php, lines 360, 451, and 472 (version 1.2.1 final/standalone) change the part of the line (it's an if statement) that reads:

Code: [Select]
if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || $visibility == $USER_DATA['group_id']) {


to read:

Code: [Select]
if ($visibility == '0' || $visibility == (FIRST_USER_CAT + USER_ID) || $visibility == $USER_DATA['group_id'] || $USER_DATA['group_name'] == 'Administrators') {


(For other versions, search for USER_DATA and you'll find the three "if" statements that are concerned with visibility!)

What this does is simply treat the case where the album is private *and* the user is an administrator exactly as if the user was a member of the authorized group.

Enjoy...

[ And feel free to move this over to the "Mod" section if appropriate! ]
Logged

Nerd3D

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Still not seing a thumb nail to the album
« Reply #29 on: March 04, 2004, 02:14:35 am »

Even with these changes the admin can't actually open the album because there is no thumbnail displayed. Or did I mess up the hack?
Logged
Happy Rendering

cayne

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Administrators not in Registered User group?
« Reply #30 on: April 13, 2004, 05:58:58 pm »

Quote from: "casper"
I have the same problem.  I set an album to registered users only, and can no longer view, or edit.


Where can I set a album for registered users only? If I go on "Properties" I can chose only :

Visitors can upload pictures                  
Visitors can post comments                  
Visitors can rate pictures

But where I give the permission that only registered users can access this album?!
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Administrators not in Registered User group?
« Reply #31 on: April 13, 2004, 06:03:09 pm »

You have to set 'users can have private albums' to YES, in cofig.
This does not mean users can have their own album, unless you allow it in their group setting.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

inblaq

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Administrators not in Registered User group?
« Reply #32 on: June 06, 2004, 10:05:19 am »

i used malc's code, and theres one small error.

when you're not logged in, under the category where the album is supposed to be, this occurs:
Warning: Invalid argument supplied for foreach() in /home/photos/public_html/photos/themes/water_drop/theme.php on line 1182
this album is for registered users only, and the admins, after i used malc's code.

i would appreciate very much someone's help on this. i dont know any programming.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Administrators not in Registered User group?
« Reply #33 on: June 06, 2004, 12:20:37 pm »

Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: 1 [2]   Go Up
 

Page created in 0.022 seconds with 18 queries.