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 [2]   Go Down

Author Topic: Member Album Request  (Read 16323 times)

0 Members and 1 Guest are viewing this topic.

AWJunkies

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
Re: Member Album Request
« Reply #20 on: February 21, 2006, 10:10:05 pm »

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.
Logged

nickfzx

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 285
Re: Member Album Request
« Reply #21 on: March 09, 2007, 08:02:04 pm »

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:

Code: [Select]
// 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.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.017 seconds with 19 queries.