при регистрации нового человека отдельное окно было которое либо появлялось либо еще как нить с приветствием нового зарегистрированного

Код: Выделить всё
## MOD Title: Send PM On User Registration
## MOD Author: AbelaJohnB < support@phpbb2mods.com > (John B. Abela) http://www.phpbb2mods.com/
## MOD Description: This MOD will send an internal PM to all new users when they register.
Код: Выделить всё
## easymod compliant
########################################################################################################
## MOD Title: Send PM On User Registration
## MOD Author: AbelaJohnB < support@phpbb2mods.com > (John B. Abela) http://www.phpbb2mods.com/
## MOD Description: This MOD will send an internal PM to all new users when they register.
## MOD Version: 2.0.14a_em
##
## Installation Level: Easy
## Installation Time: 15 minutes
## Files To Edit:
## includes/usercp_register.php
## language/lang_english/lang_main.php
##
## Included Files:
## N/A
########################################################################################################
## Author Notes:
##
## Copyright й John B. Abela, < support@phpbb2mods.com > http://www.phpbb2mods.com/
##
## I do not support the latest versions of my MOD's anywhere except at http://www.phpbb2mods.com/
## so please visit there for support. If you intend to take my work and modify it, you *must* legally
## retain my above Copyright within any install file. This does not mean you have to ask me to -use-
## this MOD, but that does mean you cannot -distribute- this MOD, in modified or non-modified format,
## without my copyright left intact. Contact me at: support@phpbb2mods.com - www.phpBB2mods.Com
##
## This MOD, like all phpBB MOD's, is released under the GNU/GPL License. A copy of this license
## should have been included with the distribution package that included this install.txt file.
## If it was not than chances are you are using a version of this MOD that very likely has been
## edited by someone other than myself, and thus, perhaps, a greater security risk to you!!
##
########################################################################################################
## Possible Future Plans: None
##
## This MOD does not take into consideration any user registration methods.
## ie: confirm via email, auto register, etc) Any new person that registers will get a PM,
## even if they have not confirmed their account. I do not plan on changing this, as I do
## not really see the point in doing such.
##
########################################################################################################
## John B. Abela - (aka: AbelaJohnB) http://www.phpbb2mods.com/ - support@phpbb2mods.com
##
## Stop By And Say Hello If You Feel Like It :)
##
## I maintain a "Mailing Group" for email notification of any new/updated MOD's. Just stop by my
## forum, register, than join the Group within the Usersgroup section of my MOD Forums!
########################################################################################################
## History:
##
## 04/28/2005 - Version 2.0.14a_em
## - Updated Header To Reflect New URL/Website name.
## - Restructured Version numbering system.
## Please See: http://www.phpbb2mods.com/viewtopic.php?t=129
##
## 1/17/2005 - Version 1.0.3
## - Updated For phpBB 2.0.11. A host of bug-fixes and a general update that was badly needed.
##
## 01/10/2003 - Version 1.0.2
## - Included fix by 'netclectic' to account for instant pop-up of new message.
##
## 09/19/2002 - Version 1.0.1
## - Updated Language Section To Include 'typicalgeek's method of site name.
##
## 08/2002 - Version 1.0.0
## - Initial Release
##
########################################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
########################################################################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// START - Send PM On User Register
// Copyright й John B. Abela, < support@phpbb2mods.com > http://www.phpbb2mods.com/
//
// "netclectic" get's credit for pointing out the need to set the datastamp to '9999999999'
// "danbk" get's credit for pointing out that MS int value has to be less than 65535 (oopps!)
// "Herbalite" get's credit for having the members username be displayed within the sent PM.
//
$sql = "UPDATE " . USERS_TABLE . " SET user_new_privmsg = '1', user_last_privmsg = '65534' 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,$username,$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 User Register - (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 User Register - (AbelaJohnB)
// Copyright й John B. Abela, < support@phpbb2mods.com > http://www.phpbb2mods.com/
//
$lang['register_pm_subject'] = 'Welcome to %s'; // PM Title
$lang['register_pm'] = 'Hello %s!<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 '; // PM Message Text
//
// END - Send PM On User Register - (AbelaJohnB)
//
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
Powered by
#
#-----[ IN-LINE FIND ]------------------------------------------
#
phpBB Group
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<BR />phpBB MOD's Provided By: <A HREF="http://www.phpbb2mods.com/" class="copyright">phpBB2mods.Com</A>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Я видел реализацию Welcom PM на IPB - мне там очень понравилось.Vladson писал(а):У меня была идея мода приветствующая новичков в ЛС, но я не получил поддержки в его разработки, по этому мой мод будет готов не скоро, но есть подобный мод уже готовый, поищи на этом форуме он упомянался... (правда он давольно запаренный, мне он не понравился)
(ЛС это тоже окно с приветствием)
Ведь что-то вроде окожка откроется и там будет вот это?!$lang['register_pm_subject'] = 'Welcome to %s'; // PM Title
$lang['register_pm'] = 'Hello %s!<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 '; // PM Message Text