Default album visibility set to (Album Owner) Default album visibility set to (Album Owner)
 

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

Default album visibility set to (Album Owner)

Started by jdm1ke, March 10, 2004, 01:20:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jdm1ke

i'd like to know if its possible to make it that whenever anyone creates a new album, their default visibility is set to "Album Owner" instead of "Everybody (public album)"

Casper

You can change the default setting in the database, but this would affect all albums, those created by admin as well, which would only be visible to admin.
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

jdm1ke

Quote from: "casper"You can change the default setting in the database, but this would affect all albums, those created by admin as well, which would only be visible to admin.

how do i go about doing this. i have access to PHPmyAdmin but i dont know excatly what setting(s) to change. thanks.

Casper

This is actually not as easy as I thought it would be  :oops:

The field that sets who can view is the visibility field in the albums table.  By default, it is set to everyone, i.e. '0'.  Changing it to any group by default would be easy, such as registered, set the default to 2.

But to set it to album owner only, as each owner has a different setting, which would be their UID + 10000, it cannot be done this way.

I don't know enough about sql to know if a query can be run to achieve this.

OT. But I must be clever, to post my first reply before you even asked  :lol:
Sourceforges server clock seems to be playing up again.
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

intranet

Thanks, I wanted to make that exact change to make the default for registered users, it worked great. Could you please tell me how to go about removing public view as an option all together?

thanks for the help!

Nibbler

modifyalb.php, line 278, find:


$options = array(0 => $lang_modifyalb_php['public_alb'],FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],
);


change it to


$options = array(FIRST_USER_CAT + USER_ID => $lang_modifyalb_php['me_only'],);

Casper

@ intranet, This probably won't work, but you can try it.  Turn off the 'users can have private albums'.

This has the effect usually of setting all albums at '0', but I don't know if it does it by telling the DB to set them at '0', or 'default'.  If '0', it will not work, all your albums will be visible to all, but if default, they will all be 2, registered only.
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

intranet

I was able to change the default to 2 by altering the column and with nibblers change I was able to remove the ability for users to set albums to public.

Seems to be working so far. I had to turn the icon option to ON because it was removing the Edit and Properties etc.. buttons for certain folders, it was very strange.

But I notice it has Anonymous and Banned as options too, can I remove those as well?

I tried removing Anonymous group all together but there was no checkbox beside it to allow me to remove it.