From f234b6331724b9b4ba25a1e9b8d809ff7c706f42 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sun, 2 Feb 2003 04:50:59 +0000 Subject: [PATCH] Added a welcome message setting for new registrations. --- docs/gotcha.txt | 9 +++++++++ docs/upgrades/upgrade_5.0.3-5.1.0.sql | 15 +++++++++++++++ lib/WebGUI/Operation/Account.pm | 1 + lib/WebGUI/Operation/Settings.pm | 22 ++++++++++++++++------ 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 34c8a8997..29ae391f1 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -8,6 +8,15 @@ versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +5.1.0 +-------------------------------------------------------------------- + * If you were using the DeleteExpiredGroupings hourly plug-in prior + to this version, please note that its configuration has + changed. It is now configurable per group through the WebGUI + user interface. You may remove any config file variables + you were previously using to configure it. + + 4.9.4 -------------------------------------------------------------------- * The "extras" property in the config file has been renamed to diff --git a/docs/upgrades/upgrade_5.0.3-5.1.0.sql b/docs/upgrades/upgrade_5.0.3-5.1.0.sql index 13482f7e4..4d50cc44a 100644 --- a/docs/upgrades/upgrade_5.0.3-5.1.0.sql +++ b/docs/upgrades/upgrade_5.0.3-5.1.0.sql @@ -40,6 +40,21 @@ insert into international (internationalId,languageId,namespace,message,lastUpda delete from international where languageId=1 and namespace='WebGUI' and internationalId=367; insert into international (internationalId,languageId,namespace,message,lastUpdated) values (367,1,'WebGUI','Expire Offset', 1044126611); insert into international (internationalId,languageId,namespace,message,lastUpdated) values (867,1,'WebGUI','Loss of Privilege', 1044133143); +insert into settings values ('sendWelcomeMessage','0'); +insert into settings values ('welcomeMessage','Welcome to our site.'); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=617; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (617,1,'WebGUI','Settings are items that allow you to adjust WebGUI to your particular needs.\r\n

\r\n\r\n\r\nEdit Company Information
\r\nInformation specific about the company or individual who controls this installation of WebGUI.\r\n

\r\n\r\n\r\nEdit Content Settings
\r\nSettings related to content and content management.\r\n

\r\n\r\n\r\nEdit Messaging Settings
\r\nSettings concerning email and other related messaging functions.\r\n

\r\n\r\n\r\nEdit Miscellaneous Settings
\r\nAnything we couldn\'t find a place for.\r\n

\r\n\r\n\r\nEdit Profile Settings
\r\nDefine what user profiles look like and what the users have the ability to edit.\r\n

\r\n\r\n\r\nEdit User Settings
\r\nSettings relating to users (beyond profile information), like authentication information, and registration options.\r\n

\r\n\r\n\r\n', 1044139325); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=618; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (618,1,'WebGUI','SMTP Server
\r\nThis is the address of your local mail server. It is needed for all features that use the Internet email system (such as password recovery).\r\n

\r\nOptionally, if you are running a sendmail server on the same machine as WebGUI, you can also specify a path to your sendmail executable. On most Linux systems this can be found at "/usr/lib/sendmail".\r\n\r\n

\r\n\r\nSend welcome message?
\r\nDo you wish to send a message to the user when they register for the site?\r\n

\r\n\r\nWelcome Message
\r\nType the message you wish to send to the user upon registration.\r\n

\r\n\r\nRecover Password Message
\r\nThe message that gets sent to a user when they use the "recover password" function.\r\n

\r\n\r\nEmail Footer
\r\nThis footer will be processed for macros and attached to every email sent from this WebGUI instance.\r\n

\r\n\r\nAlert on new user?
\r\nShould someone be alerted when a new user registers anonymously?\r\n

\r\n\r\nGroup To Alert On New User
\r\nWhat group should be alerted when a new user registers?\r\n

\r\n\r\n', 1044139289); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=607; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (607,1,'WebGUI','Anonymous Registration
\r\nDo you wish visitors to your site to be able to register themselves?\r\n

\r\n\r\nRun On Registration
\r\nIf there is a command line specified here, it will be executed each time a user registers anonymously.\r\n

\r\n\r\nEnable Karma?
\r\nShould karma be enabled?\r\n

\r\n\r\nKarma Per Login
\r\nThe amount of karma a user should be given when they log in. This only takes affect if karma is enabled.\r\n

\r\n\r\nSession Timeout
\r\nThe amount of time that a user session remains active (before needing to log in again). This timeout is reset each time a user views a page. Therefore if you set the timeout for 8 hours, a user would have to log in again if s/he hadn\'t visited the site for 8 hours.\r\n

\r\n\r\nAuthentication Method (default)
\r\nWhat should the default authentication method be for new accounts that are created? The two available options are WebGUI and LDAP. WebGUI authentication means that the users will authenticate against the username and password stored in the WebGUI database. LDAP authentication means that users will authenticate against an external LDAP server.\r\n

\r\nNote: Authentication settings can be customized on a per user basis.\r\n

\r\n\r\nUsername Binding
\r\nBind the WebGUI username to the LDAP Identity. This requires the user to have the same username in WebGUI as they specified during the Anonymous Registration process. It also means that they won\'t be able to change their username later. This only in effect if the user is authenticating against LDAP.\r\n

\r\n\r\nLDAP URL (default)
\r\nThe default url to your LDAP server. The LDAP URL takes the form of ldap://[server]:[port]/[base DN]. Example: ldap://ldap.mycompany.com:389/o=MyCompany.\r\n

\r\n\r\nLDAP Identity
\r\nThe LDAP Identity is the unique identifier in the LDAP server that the user will be identified against. Often this field is shortname, which takes the form of first initial + last name. Example: jdoe. Therefore if you specify the LDAP identity to be shortname then Jon Doe would enter jdoe during the registration process.\r\n

\r\n\r\nLDAP Identity Name
\r\nThe label used to describe the LDAP Identity to the user. For instance, some companies use an LDAP server for their proxy server users to authenticate against. In the documentation or training already provided to their users, the LDAP identity is known as their Web Username. So you could enter that label here for consitency.\r\n

\r\n\r\nLDAP Password Name
\r\nJust as the LDAP Identity Name is a label, so is the LDAP Password Name. Use this label as you would LDAP Identity Name.\r\n

\r\n\r\n', 1044139167); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=663; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (663,1,'WebGUI','Messaging Settings, Edit', 1044138790); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=133; +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (133,1,'WebGUI','Edit Messaging Settings', 1044138764); +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (869,1,'WebGUI','Welcome Message', 1044138730); +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (868,1,'WebGUI','Send welcome message?', 1044138691); +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (870,1,'WebGUI','Welcome', 1044139461); diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index 31db829ea..ef1fbef90 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -183,6 +183,7 @@ sub www_createAccountSave { } WebGUI::Session::start($u->userId); _logLogin($u->userId,"success"); + WebGUI::MessageLog::addEntry($u->userId,"",WebGUI::International::get(870),$session{setting}{welcomeMessage}); system(WebGUI::Macro::process($session{setting}{runOnRegistration})) if ($session{setting}{runOnRegistration} ne ""); WebGUI::MessageLog::addInternationalizedEntry('',$session{setting}{onNewUserAlertGroup},'',536) if ($session{setting}{alertOnNewUser}); } else { diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 0ba7a36f7..120e57eff 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -25,7 +25,7 @@ use WebGUI::URL; our @ISA = qw(Exporter); our @EXPORT = qw(&www_saveSettings &www_editUserSettings &www_editCompanyInformation - &www_editPrivilegeSettings &www_editMailSettings &www_editMiscSettings + &www_editPrivilegeSettings &www_editMessagingSettings &www_editMiscSettings &www_editContentSettings &www_manageSettings); #------------------------------------------------------------------- @@ -46,8 +46,6 @@ sub www_editUserSettings { $f->hidden("op","saveSettings"); $f->yesNo("anonymousRegistration",WebGUI::International::get(118),$session{setting}{anonymousRegistration}); $f->text("runOnRegistration",WebGUI::International::get(559),$session{setting}{runOnRegistration}); - $f->yesNo("alertOnNewUser",WebGUI::International::get(534),$session{setting}{alertOnNewUser}); - $f->group("onNewUserAlertGroup",WebGUI::International::get(535),[$session{setting}{onNewUserAlertGroup}]); $f->yesNo("useKarma",WebGUI::International::get(539),$session{setting}{useKarma}); $f->integer("karmaPerLogin",WebGUI::International::get(540),$session{setting}{karmaPerLogin}); $f->interval("sessionTimeout",WebGUI::International::get(142),WebGUI::DateTime::secondsToInterval($session{setting}{sessionTimeout})); @@ -109,16 +107,28 @@ sub www_editContentSettings { } #------------------------------------------------------------------- -sub www_editMailSettings { +sub www_editMessagingSettings { WebGUI::Privilege::adminOnly() unless (WebGUI::Privilege::isInGroup(3)); my ($output, $f); $output .= helpIcon(13); $output .= '

'.WebGUI::International::get(133).'

'; $f = WebGUI::HTMLForm->new; $f->hidden("op","saveSettings"); + $f->text("smtpServer",WebGUI::International::get(135),$session{setting}{smtpServer}); + $f->yesNo( + -name=>"sendWelcomeMessage", + -value=>$session{setting}{sendWelcomeMessage}, + -label=>WebGUI::International::get(868) + ); + $f->textarea( + -name=>"welcomeMessage", + -value=>$session{setting}{welcomeMessage}, + -label=>WebGUI::International::get(869) + ); $f->textarea("recoverPasswordEmail",WebGUI::International::get(134),$session{setting}{recoverPasswordEmail}); $f->textarea("mailFooter",WebGUI::International::get(824),$session{setting}{mailFooter}); - $f->text("smtpServer",WebGUI::International::get(135),$session{setting}{smtpServer}); + $f->yesNo("alertOnNewUser",WebGUI::International::get(534),$session{setting}{alertOnNewUser}); + $f->group("onNewUserAlertGroup",WebGUI::International::get(535),[$session{setting}{onNewUserAlertGroup}]); $f->submit; $output .= $f->print; return _submenu($output); @@ -164,7 +174,7 @@ sub www_manageSettings { $output .= '