Member Album Request - Page 2 Member Album Request - Page 2
 

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]

Main Menu

Member Album Request

Started by lupus2k5, January 30, 2006, 03:46:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AWJunkies

Thanks nibbler i was doing it real fast and totaly forgot that it would bold it and not show him what I ment. Thanks for the edit.

nickfzx

As GauGau rightly said earlier in the thread personal galleries are the way to go.

so with that in mind I have worked out how to create personal galleries at registration when bridged with punbb  (but could easily be adapted to work with other BBs)

add this code underneath the "Add new user" section in punbb's register.php file:

// mod: create new gallery for user
$category_id = ($new_uid+10000);

    $db->query('INSERT INTO copper_albums (title, uploads, category) VALUES(
        \''.$username.'`s gallery\',
        \'YES\',
        \''.$category_id.'\'
    )');


Now my coppermine database prefix is "copper_" so you will have to change this to whatever yours is.  Also my coppermine tables are in the same DB as my PunBB tables so that is a requirement here too.

it seems to work perfectly for me although I have not vigorously tested it.  If anyone can spot any mistakes in it please let me know.