forum.coppermine-gallery.net
No Support => Feature requests => Topic started by: jpepin on March 23, 2004, 02:41:48 am
-
Is there a way to set it up so that when a person registers it automatically creates a user album for them (album name would=user name)?
-
tagging along. i would enjoy this feature too, to have a default album created until they get the hang of making their own.
-
I'm searching for info on this exact topic. Definitely should be on a wish list.
-
Agreed, I'm having enough trouble getting to grips with my new album and I foresee a flood of "How do I" coming from users when I let them loose! ::)
-
It's on our todo list for a future version. It will have to be admin settable though.
-
Hmm...I thought I'd whip up some SQL to do this, but unfortunately I'm running a cpg installation which is integrated with phpBB, and I'm having difficulty figuring out how to tag along on the phpBB registration.
I'm going to keep plugging away at it, will let you know if I figure it out
T.
-
As bridged installations use the board user management, this will be very difficult, if not impossible to achieve, without altering the forums registation process.
-
For non-bridged users, try this
in register.php find
$sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
"(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_location, user_interests, user_website, user_occupation) ".
"VALUES (NOW(), '$active', '$act_key', '".addslashes($user_name)."', '".addslashes($password)."', '".addslashes($email)."', '$location', '$interests', '$website', '$occupation' )";
$result = db_query($sql);
and add after it
$sql = "SELECT user_id FROM {$CONFIG['TABLE_USERS']} WHERE 1";
$result = db_query($sql);
$row=mysql_fetch_row($result);
$uid=$row[0]+10000;
$sql = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos) VALUES ('$uid', 'New Album', 'NO', '1')";
$result = db_query($sql);
My installation is heavily modified, so no guarantees. :D
-
hi! your mod its good! tks
but i need another thing, but dont know how i do. you mod search 1 userid and create one album, it does not give to create the gallery with the name of user that it was registered?
tks
-
On my coppermine version 1.3.3 the mysql query to get the users id is different:
$sql = "SELECT user_id FROM {$CONFIG['TABLE_USERS']} WHERE user_name='" . addslashes($user_name) . "';";
$result = db_query($sql);
$row=mysql_fetch_row($result);
$uid=$row[0]+10000;
$sql = "INSERT INTO {$CONFIG['TABLE_ALBUMS']} (category, title, uploads, pos) VALUES ('$uid', 'meine Fotos', 'NO\', '1')";
$result = db_query($sql);
the difference is that I dont say WHERE 1 but WHERE user_name='" . addslashes($user_name)
Now it works for me!
-
using 1.34
if i use the code by oasis the album is created in the name of the admin..not of the newly registered user..if i use the code by mister black it just gives an error..would like to get this feature going but doesnt seem to work for me...