WPN
Verfasst: 11.02.2006 11:21
Hallo , hab ein Problem hab den willkommenspn eingebaut , klappt alles, funkt auch ..
Problem ist es steht in der MSG nichts drinnen das heißt ich würd jeden user ne leere MSG schicken hier mal die Anleitung
Ich dachte im letzen teil wär das .. aber dann müsste ja das shcon kommen was als Vorgabe drinnen sthet ..
Aufjedenfall schon mal danke
Problem ist es steht in der MSG nichts drinnen das heißt ich würd jeden user ne leere MSG schicken hier mal die Anleitung
Code: Alles auswählen
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// START - SEND PM ON REGISTER MOD - AbelaJohnB
//
// According to 'netclectic' we need to set the datastamp to '9999999999' in order to
// insure the pop-up notification about a new message existing. I concur with 'netclectic'
// and have thus made the change to his suggestion. Thanks netclectic!
//
$sql = "UPDATE " . USERS_TABLE . "
SET user_new_privmsg = '1', user_last_privmsg = '9999999999'
WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
}
$register_pm_subject = $lang['register_pm_subject'];
$register_pm = $lang['register_pm'];
$privmsgs_date = date("U");
$sql = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES ('0', '" . str_replace("\'", "''", addslashes(sprintf($register_pm_subject,$board_config['sitename']))) . "', '2', " . $user_id . ", " . $privmsgs_date . ", '0', '1', '1', '0')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert private message sent info', '', __LINE__, __FILE__, $sql);
}
$privmsg_sent_id = $db->sql_nextid();
$privmsgs_text = $lang['register_pm_subject'];
//
$sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_text) VALUES ($privmsg_sent_id, '" . str_replace("\'", "''", addslashes(sprintf($register_pm,$board_config['sitename'],$board_config['sitename']))) . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert private message sent text', '', __LINE__, __FILE__, $sql);
}
// END - SEND PM ON REGISTER MOD - AbelaJohnB
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Click_view_privmsg'] = 'Click %sHere%s to visit your Inbox';
#
#-----[ AFTER, ADD ]------------------------------------------
#
// START - SEND PM ON REGISTER MOD - AbelaJohnB
$lang['register_pm_subject'] = 'Welcome to %s';
$lang['register_pm'] = 'Hello!<br /><br />Welcome to %s. <br /><br />We hope you enjoy your time at this site! <br /><br />Feel free to join in and share with others or start your own discussion! <br /><br />~Enjoy!<br />%s Staff ';
// END - SEND PM ON REGISTER MOD - AbelaJohnB
Aufjedenfall schon mal danke
