forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Scias on January 29, 2008, 04:31:06 am

Title: Enabling User Album Creation
Post by: Scias on January 29, 2008, 04:31:06 am
ok! i was recently baffled at the thought of having users being able to CREATE albums under pre-created categorys.

for example lets say my gallerys like this.

Category 1
User galleries
Category 2

anywho, how would i allow users to create albums, in category 1 and 2?

im sorry if already been asked, i have searched the board, but no info on what im asking :(

ty again.
Title: Re: Enabling User Album Creation
Post by: Joachim Müller on January 29, 2008, 08:09:04 am
anywho, how would i allow users to create albums, in category 1 and 2?
Not at all.

im sorry if already been asked, i have searched the board, but no info on what im asking :(
Indeed this has been asked a thousand times. Answer is already the same: that's currently not possible. Will be a feature in cpg1.5.x. That feature will not be backported to cpg1.4.x. There is no scheduled release date for cpg1.5.x
Title: Re: Enabling User Album Creation
Post by: vivison on February 12, 2008, 09:14:23 am
If you have an SMF bridge you could use my "workaround": (1) Let all users be USER_IS_ADMIN, (2) Let real SMF Admin be SMFUSER_IS_ADMIN (new variable), (3) Use SMFUSER_IS_ADMIN to restrict normal user from undesired features (such as Config/Admin Tools/etc.) 

Specific mods are as follows:
For (1): Mod bridge/smf10.inc.php (since I'm using SMF1.4)
change: define('USER_IS_ADMIN', $USER_DATA['has_admin_access']);
to:        define('USER_IS_ADMIN', 1);
add:      define('SMFUSER_IS_ADMIN', $USER_DATA['has_admin_access']);

For (2): Add the restriction to the affected php file such as admin.php (for Config), util.php (for Admin Tools), etc.
change: if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);    'enable_encrypted_passwords',
);
to: if (!SMFUSER_IS_ADMIN || !GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);    'enable_encrypted_passwords',
);

Please make sure that this approach meets your need.
Title: Re: Enabling User Album Creation
Post by: Joachim Müller on February 12, 2008, 10:11:53 am
This should get you hacked in no time ::)