Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: User albums private by default  (Read 5310 times)

0 Members and 1 Guest are viewing this topic.

charlie99

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
User albums private by default
« on: November 26, 2006, 02:47:23 pm »

Hi
I start this as a new topic, because i dont see any action in another similar topic. I just want all new user albums members are creating as private by a default value (only me). With a possibility to change that by them selves later if they want.

I played little with modify_album.php, changed some hidden values to 10002 and tried even in the database but with no luck so i have changed all back again.

Perhaps i played with wrong file or wrong place or it needs changes on more than one file? Anyway this should not be very difficult to solve, tell me if i'm wrong, but i need help, Please!

Congratulations to a fantastic gallery script!
Regards,Charlie
« Last Edit: November 27, 2006, 08:50:35 am by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: User albums private by default
« Reply #1 on: November 26, 2006, 09:53:55 pm »

Then play with delete.php ;)
look for case albmgr: and add visibility and its value to mysql insert query
Hope you got the idea
Logged
‍I don't answer to PM with support question
Please post your issue to related board

charlie99

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: User albums private by default
« Reply #2 on: November 26, 2006, 11:14:32 pm »

Sorry, i dont get it!
Perhaps you can explane little more when and if you have time to it.
Logged

Nibbler

  • Guest
Re: User albums private by default
« Reply #3 on: November 27, 2006, 12:46:58 am »

The insert query should look similar to this:

Code: [Select]
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '')";
You can change that to

Code: [Select]
if (GALLERY_ADMIN_MODE){           
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '')";   
} else {
$query = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos, description, visibility) VALUES ('$category', '".addslashes($op['album_nm'])."', 'NO',  '{$op['album_sort']}', '', " . (FIRST_USER_CAT + USER_ID) . ")";
}

to mean "me only" for user albums.
Logged

charlie99

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: User albums private by default
« Reply #4 on: November 27, 2006, 08:21:16 am »

Thanks Nibbler
This worked fine. I now have the gallery exactly as i want it! Great!!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: User albums private by default
« Reply #5 on: November 27, 2006, 08:56:50 am »

Glad your issue is solved. Just for clarification: in Coppermine terms, the thread subject might be a bit misleading, as "me only" means exactly what it says: the pics in an album that is set to "me only" will only be visible for the user who owns the album. No other user (except the admin) will be able to view the pics contained in that album. Most users won't realize that their pics is not visible for the public and therefor won't edit the permissions. Subsequently, they will wonder why their pics don't get viewed at all.
The settings mentioned in this thread are not recommended at all, as most gallery owners like to have as many hits as possible.

Logged

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: User albums private by default
« Reply #6 on: November 27, 2006, 09:06:23 am »

I tried replacing the mentioned query string in delete.php in two places that the string appeared in and it did not work. I must be modifying the wrong file?

I tried creating a new album logged in as myself as well as through uploading a file via the XP Publishing Wizard. Both still created an album that was viewable by Everybody.

Thanks!
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: User albums private by default
« Reply #7 on: November 27, 2006, 11:40:09 am »

This hack doesn't apply to uploaded file by XP publishing wizard
Logged
‍I don't answer to PM with support question
Please post your issue to related board

natrlhy

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 77
Re: User albums private by default
« Reply #8 on: November 29, 2006, 06:33:58 pm »

Thanks for the clarification Sami,

I'm still on the hunt for a way for when any user creates an album it is automatically created to be only viewable by the Registered users group.

Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 15 queries.