User albums private by default User albums private by default
 

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

Main Menu

User albums private by default

Started by charlie99, November 26, 2006, 02:47:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

charlie99

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

Sami

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

charlie99

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

Nibbler

The insert query should look similar to this:

$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

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.

charlie99

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

Joachim Müller

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.


natrlhy

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!

Sami

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

natrlhy

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!