From 21c4fcb75f80a29eeb83530d701ddf67a072e08e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Sun, 10 Jun 2007 16:38:43 +0000 Subject: [PATCH] This patch adds user invitations, a way for existing users on a site to send an email to their friends and invite them to create an account on the site. The feature is enabled or disabled in the site Settings. (Operation/Settings.pm) It is implemented as a new operation, Invite (Operation/Invite.pm, Help/Invite.pm, i18n/English/Invite.pm), and the option is displayed as an option on the user's account screen. (Operation/Shared.pm). The form is templated, and lives in the Invite namespace. Once the invitation is submitted, if the user's email address is not already in WebGUI, an email is sent and a record is stored in the userInvitations table. When the friend gets the invitation, they are taken to the account creation screen, which conveniently has their email address already filled in. This required changes in the Auth modules (Auth.pm, Auth/*.pm), and ProfileField.pm. The latter was so that profile fields can have their values manually set. The former changes handle inserting the email address, bypassing the anonymous registration check, and updating the record in ther userInvitations table. I refactored some code out of the AdminConsole for finding the url back to the site and added it to Session/Url.pm. The method is called getBackToSiteUrl. --- docs/changelog/7.x.x.txt | 1 + .../PBtmpl00000userInvite1.tmpl | 47 +++++ docs/upgrades/upgrade_7.3.19-7.4.0.pl | 30 +++ lib/WebGUI/AdminConsole.pm | 16 +- lib/WebGUI/Auth.pm | 31 ++- lib/WebGUI/Auth/LDAP.pm | 3 +- lib/WebGUI/Auth/WebGUI.pm | 14 +- lib/WebGUI/Help/Invite.pm | 54 +++++ lib/WebGUI/Help/WebGUI.pm | 10 + lib/WebGUI/Operation.pm | 4 + lib/WebGUI/Operation/Invite.pm | 186 ++++++++++++++++++ lib/WebGUI/Operation/Settings.pm | 16 ++ lib/WebGUI/Operation/Shared.pm | 5 + lib/WebGUI/Operation/User.pm | 2 +- lib/WebGUI/ProfileField.pm | 4 + lib/WebGUI/Session/Url.pm | 30 +++ lib/WebGUI/i18n/English/Invite.pm | 128 ++++++++++++ lib/WebGUI/i18n/English/WebGUI.pm | 33 +++- 18 files changed, 586 insertions(+), 28 deletions(-) create mode 100644 docs/upgrades/templates-7.4.0/PBtmpl00000userInvite1.tmpl create mode 100644 lib/WebGUI/Help/Invite.pm create mode 100644 lib/WebGUI/Operation/Invite.pm create mode 100644 lib/WebGUI/i18n/English/Invite.pm diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 7016a639f..d28d5e376 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -10,6 +10,7 @@ - add: User profile data table is now a flat table, one column for each field. - add: Posts can now have Metadata (United Knowledge) + - add: Users can now invite others to create an account (United Knowledge) - add: Calendar events now allow attachments - add: Calendar events now allow setting view permissions - add: WebGUI::Paginator now capable of more efficient SQL paginations using diff --git a/docs/upgrades/templates-7.4.0/PBtmpl00000userInvite1.tmpl b/docs/upgrades/templates-7.4.0/PBtmpl00000userInvite1.tmpl new file mode 100644 index 000000000..3d718d195 --- /dev/null +++ b/docs/upgrades/templates-7.4.0/PBtmpl00000userInvite1.tmpl @@ -0,0 +1,47 @@ +#PBtmpl00000userInvite1 +#url: userInviteTemplate +#title:User Invite Template +#menuTitle:Default User Invite Template +#namespace:userInvite +#create +

+ + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+   + + +
+ diff --git a/docs/upgrades/upgrade_7.3.19-7.4.0.pl b/docs/upgrades/upgrade_7.3.19-7.4.0.pl index 3ac80a521..410023c9e 100644 --- a/docs/upgrades/upgrade_7.3.19-7.4.0.pl +++ b/docs/upgrades/upgrade_7.3.19-7.4.0.pl @@ -26,6 +26,7 @@ fixProfileDataWithoutFields($session); buildNewUserProfileTable($session); addAttachmentsToEvents($session); addMetaDataPostsToCS($session); +addUserInvitations($session); finish($session); # this line required @@ -118,6 +119,35 @@ sub addMetaDataPostsToCS { } +#---------------------------------------------------------------------------- + +sub addUserInvitations { + my $session = shift; + my $db = $session->db; + + print "\tAdding the ability for users's to invite others to the site... " unless $quiet; + ##Add settings + $session->setting->add('userInvitationsEnabled', 0); + $session->setting->add('userInvitationsEmailExists', 'This email address exists in our system. This means that your friend is already a member of the site. The invitation will not be sent.'); + + ##Create table for tracking invitations + $session->db->write(<session->asset) { - my $importNode = WebGUI::Asset->getImportNode($self->session); - my $importNodeLineage = $importNode->get("lineage"); - my $media = WebGUI::Asset->getMedia($self->session); - my $mediaLineage = $media->get("lineage"); - my $assetLineage = $self->session->asset->get("lineage"); - if ($assetLineage =~ /^$importNodeLineage/ || $assetLineage eq "000001" || $assetLineage =~ /^$mediaLineage/ || ($self->session->asset->get("state") ne "published" && $self->session->asset->get("state") ne "archived")) { - $var{"backtosite.url"} = WebGUI::Asset->getDefault($self->session)->getUrl; - } else { - $var{"backtosite.url"} = $self->session->asset->getContainer->getUrl; - } - } else { - $var{"backtosite.url"} = $self->session->url->page(); - } + + $var{"backtosite.url"} = $self->session->url->getBackToSiteURL(); $var{"application_loop"} = $self->getAdminFunction; return $self->session->style->process(WebGUI::Asset::Template->new($self->session,$self->session->setting->get("AdminConsoleTemplate"))->process(\%var),"PBtmpl0000000000000137"); } diff --git a/lib/WebGUI/Auth.pm b/lib/WebGUI/Auth.pm index 902458314..8f211a28d 100644 --- a/lib/WebGUI/Auth.pm +++ b/lib/WebGUI/Auth.pm @@ -178,9 +178,23 @@ sub createAccount { $vars->{'create.form.header'} .= WebGUI::Form::hidden($self->session,{"name"=>"method","value"=>$method}); #User Defined Options + my $userInvitation = $self->session->setting->get('userInvitationsEnabled'); + $self->session->errorHandler->warn('invite = '.$userInvitation); $vars->{'create.form.profile'} = []; foreach my $field (@{WebGUI::ProfileField->getRegistrationFields($self->session)}) { - my ($id, $formField, $label) = ($field->getId, $field->formField, $field->getLabel); + my $id = $field->getId; + my $label = $field->getLabel; + my $emailAddress = {}; + if ($field->get('fieldName') eq "email" && $userInvitation ) { + $self->session->errorHandler->warn('Email address field'); + my $code = $self->session->form->get('code') + || $self->session->form->get('uniqueUserInvitationCode'); + $self->session->errorHandler->warn('Code:'.$code); + ($emailAddress) = $self->session->db->quickArray('select email from userInvitations where inviteId=?',[$code]); + $self->session->errorHandler->warn('Email address :'.$emailAddress); + $vars->{'create.form.header'} .= WebGUI::Form::hidden($self->session, {name=>"uniqueUserInvitationCode", value=>$code}); + } + my $formField = $field->formField(undef, undef, undef, undef, $emailAddress); ##Manually set the field my $required = $field->isRequired; # Old-style field loop. @@ -279,7 +293,20 @@ sub createAccountSave { } else { $self->session->http->setStatus(201,"Account Registration Successful"); } - + + ##Finalize the record in the user invitation table. + my $inviteId = $self->session->form->get('uniqueUserInvitationCode'); + if ($inviteId) { + $self->session->db->setRow( + 'userInvitations', + 'inviteId', + { + inviteId => $inviteId, + newUserId => $u->userId, + dateCreated => WebGUI::DateTime->new($self->session, time)->toMysqlDate, + }, + ); + } return undef; } diff --git a/lib/WebGUI/Auth/LDAP.pm b/lib/WebGUI/Auth/LDAP.pm index 2a8dea1a4..7a3a656be 100644 --- a/lib/WebGUI/Auth/LDAP.pm +++ b/lib/WebGUI/Auth/LDAP.pm @@ -223,7 +223,8 @@ sub createAccount { my $vars; if ($self->session->user->userId ne "1") { return $self->displayAccount; - } elsif (!$self->session->setting->get("anonymousRegistration")) { + } + elsif (!$self->session->setting->get("anonymousRegistration") && !$self->session->setting->get('userInvitationsEnabled')) { return $self->displayLogin; } diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index 93b2f85b0..f22ea8345 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -135,11 +135,13 @@ sub createAccount { my $confirm = shift || $self->session->form->process("confirm"); my $vars = shift || {}; - if ($self->session->user->userId ne "1") { - return $self->displayAccount; - } elsif (!$self->session->setting->get("anonymousRegistration")) { - return $self->displayLogin; - } + $self->session->errorHandler->warn('WebGUI::Auth::createAccount called'); + if ($self->session->user->userId ne "1") { + return $self->displayAccount; + } + elsif (!$self->session->setting->get("anonymousRegistration") && !$self->session->setting->get('userInvitationsEnabled')) { + return $self->displayLogin; + } my $i18n = WebGUI::International->new($self->session); $vars->{'create.message'} = $message if ($message); $vars->{useCaptcha} = $self->session->setting->get("webguiUseCaptcha"); @@ -170,7 +172,7 @@ sub createAccountSave { return $self->displayAccount if ($self->session->user->userId ne "1"); #Make sure anonymous registration is enabled - unless ($self->session->setting->get("anonymousRegistration")) { + unless ($self->session->setting->get("anonymousRegistration") || $self->session->setting->get("userInvitationsEnabled")) { $self->session->errorHandler->security($i18n->get("no registration hack", "AuthWebGUI")); return $self->displayLogin; } diff --git a/lib/WebGUI/Help/Invite.pm b/lib/WebGUI/Help/Invite.pm new file mode 100644 index 000000000..1c869552e --- /dev/null +++ b/lib/WebGUI/Help/Invite.pm @@ -0,0 +1,54 @@ +package WebGUI::Help::Invite; + +our $HELP = { + + 'invite form template' => { + title => 'invite form template title', + body => 'invite form template body', + variables => [ + { + name => 'inviteFormError', + required => 1, + }, + { + name => 'formHeader', + required => 1, + }, + { + name => 'formFooter', + required => 1, + }, + { + name => 'title', + }, + { + name => 'emailAddressLabel', + }, + { + name => 'emailAddressForm', + }, + { + name => 'subjectLabel', + }, + { + name => 'subjectForm', + }, + { + name => 'messageLabel', + }, + { + name => 'messageForm', + }, + { + name => 'submitButton', + }, + ], + fields => [ + ], + related => [ + ] + }, + +}; + +1; ##All perl modules must return true diff --git a/lib/WebGUI/Help/WebGUI.pm b/lib/WebGUI/Help/WebGUI.pm index 036d965b0..79aa58aea 100644 --- a/lib/WebGUI/Help/WebGUI.pm +++ b/lib/WebGUI/Help/WebGUI.pm @@ -403,6 +403,16 @@ our $HELP = { description => 'Enable passive profiling description', namespace => 'WebGUI', }, + { + title => 'Enable user invitations', + description => 'Enable user invitations description', + namespace => 'WebGUI', + }, + { + title => 'user invitations email exists', + description => 'user invitations email exists description', + namespace => 'WebGUI', + }, { title => '164', description => '164 description', diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 1db00c46e..94d67482c 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -164,6 +164,10 @@ sub getOperations { 'viewInbox' => 'WebGUI::Operation::Inbox', 'viewInboxMessage' => 'WebGUI::Operation::Inbox', + 'inviteUser' => 'WebGUI::Operation::Invite', + 'inviteUserSave' => 'WebGUI::Operation::Invite', + 'acceptInvite' => 'WebGUI::Operation::Invite', + 'copyLDAPLink' => 'WebGUI::Operation::LDAPLink', 'deleteLDAPLink' => 'WebGUI::Operation::LDAPLink', 'editLDAPLink' => 'WebGUI::Operation::LDAPLink', diff --git a/lib/WebGUI/Operation/Invite.pm b/lib/WebGUI/Operation/Invite.pm new file mode 100644 index 000000000..e6c5c57a7 --- /dev/null +++ b/lib/WebGUI/Operation/Invite.pm @@ -0,0 +1,186 @@ +package WebGUI::Operation::Invite; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2006 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use strict; +use WebGUI::Session; +use WebGUI::User; +use WebGUI::Form; +use WebGUI::Mail::Send; +use WebGUI::Operation::Auth; + +=head1 NAME + +Package WebGUI::Operation::Invite + +=head1 DESCRIPTION + +Operation handler for handling user invitations. + +=cut + +#------------------------------------------------------------------- + +=head2 www_inviteUser ( ) + +Form for inviting a user. + +=cut + +sub www_inviteUser { + my $session = shift; + return $session->privilege->insufficient() unless ($session->user->isInGroup(2)); + my $formError = shift; + my $vars = {}; + my $i18n = WebGUI::International->new($session, 'Invite'); + $vars->{inviteFormError} = $i18n->get($formError); + $vars->{formHeader} = WebGUI::Form::formHeader($session).WebGUI::Form::hidden($session, {name => "op", value => "inviteUserSave"}); + $vars->{formFooter} = WebGUI::Form::formFooter($session, {}); + $vars->{title} = $i18n->get('invite a friend title'); + $vars->{emailAddressLabel} = $i18n->get('480', 'WebGUI'); + $vars->{emailAddressForm} = WebGUI::Form::email( + $session, + { + name => "invite_email", + value => $session->form->get('invite_email'), + }, + ); + $vars->{subjectLabel} = $i18n->get('229', 'WebGUI'); + $vars->{subjectForm} = WebGUI::Form::text( + $session, + { + name => "invite_subject", + value => $session->form->get('invite_subject'), + }, + ); + $vars->{messageLabel} = $i18n->get('351', 'WebGUI'); + $vars->{messageForm} = WebGUI::Form::textarea( + $session, + { + name => "invite_message", + value => $session->form->get('invite_message') || $i18n->get('default invite'), + }, + ); + $vars->{submitButton} = WebGUI::Form::submit( + $session, + {value => $i18n->get('submit', 'WebGUI')}, + ); + my $output = WebGUI::Asset::Template->new($session,"PBtmpl00000userInvite1")->process($vars); + return $session->style->userStyle($output); +} + +#------------------------------------------------------------------- + +=head2 www_inviteUserSave ( ) + +Post process the form, check for required fields, handle inviting users who are already +members (determined by email address) and send the email. + +=cut + +sub www_inviteUserSave { + my $session = shift; + return $session->privilege->insufficient() unless ($session->user->isInGroup(2)); + + #Mandatory field checks + my $hisEmailAddress = $session->form->get('invite_email'); + return www_inviteUser($session, 'missing email') unless $hisEmailAddress; + my $message = $session->form->get('invite_message'); + return www_inviteUser($session, 'missing message') unless $message; + my $subject = $session->form->get('invite_subject'); + return www_inviteUser($session, 'missing subject') unless $subject; + + my $i18n = WebGUI::International->new($session, 'Invite'); + + #User existance check. + my $existingUser = WebGUI::User->newByEmail($session, $hisEmailAddress); + use Data::Dumper; + if (defined $existingUser) { + my $output = sprintf qq!

%s

\n

%s

%s!, + $i18n->get('already a member'), + $session->setting->get('userInvitationsEmailExists'), + $session->url->getBackToSiteURL(), + $i18n->get('493', 'WebGUI'); + return $session->style->userStyle($output); + } + my $myEmailAddress = $session->user->profileField('email'); + my $invitation = WebGUI::Mail::Send->create( + $session, + { + to => $hisEmailAddress, + from => $myEmailAddress, + subject => $subject, + }, + ); + + ##No sneaky attack paths... + $message = WebGUI::HTML::filter($message); + + ##Append the invitation url. + my $inviteId = $session->id->generate(); + my $inviteUrl = $session->url->append($session->url->getSiteURL, 'op=acceptInvite;code='.$inviteId); + $message .= "\n$inviteUrl\n"; + + ##Create the invitation record. + $session->db->setRow( + 'userInvitations', + 'inviteId', + { + userId => $session->user->userId, + dateSent => WebGUI::DateTime->new($session, time)->toMysqlDate, + email => $hisEmailAddress, + }, + $inviteId, + ); + + $invitation->addText($message); + $invitation->send; + + my $output = sprintf qq!

%s

%s!, + $i18n->get('invitation sent'), + $session->url->getBackToSiteURL(), + $i18n->get('493', 'WebGUI'); + return $session->style->userStyle($output); + +} + +#------------------------------------------------------------------- + +=head2 www_acceptInvite ( ) + +Validate the invitation code. If valid, send the user over to the +create account page. Otherwise, scourge and flay them. + +=cut + +sub www_acceptInvite { + my $session = shift; + return $session->privilege->insufficient() if ($session->user->isInGroup(2)); + + my $i18n = WebGUI::International->new($session, 'Invite'); + + my $inviteId = $session->form->get('code'); + my ($validInviteId) = $session->db->quickArray('select userId from userInvitations where inviteId=?',[$inviteId]); + + if (!$validInviteId) { + my $output = sprintf qq!

%s

\n

%s

%s!, + $i18n->get('invalid invite code'), + $i18n->get('invalid invite code message'), + $session->url->getBackToSiteURL(), + $i18n->get('493', 'WebGUI'); + return $session->style->userStyle($output); + } + ##Everything looks good. Sign them up! + my $auth = WebGUI::Operation::Auth::getInstance($session); + return $session->style->userStyle($auth->createAccount()); +} + +1; diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 7095c76f1..ef569efa9 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -368,6 +368,22 @@ sub definition { defaultValue=>$session->setting->get("passiveProfilingEnabled"), extras=>'onchange="alert(\''.$i18n->get("Illegal Warning").'\')" ' }); + push(@fields, { + tab=>"user", + fieldType=>"yesNo", + name=>"userInvitationsEnabled", + label=>$i18n->get("Enable user invitations"), + hoverHelp=>$i18n->get("Enable user invitations description"), + defaultValue=>$session->setting->get("userInvitationsEnabled"), + }); + push(@fields, { + tab=>"user", + fieldType=>"textarea", + name=>"userInvitationsEmailExists", + label=>$i18n->get("user invitations email exists"), + hoverHelp=>$i18n->get("user invitations email exists description"), + defaultValue=>$session->setting->get("userInvitationsEmailExists"), + }); # auth settings my $options; foreach (@{$session->config->get("authMethods")}) { diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index e761c67a8..2f458abb7 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -68,6 +68,11 @@ is in group Admin (3). Returns the user to the List Database Links screen. push(@array, {'options.display' => ''.$i18n->get('redeem code', 'Subscription').''}); } + if ($session->setting->get('userInvitationsEnabled')) { + push @array, { + 'options.display' => sprintf('%s', $session->url->page('op=inviteUser'), $i18n->get('invite a friend')), + }; + } my %logout; $logout{'options.display'} = ''.$i18n->get(64).''; push(@array,\%logout); diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index 88e1e5670..3a7b88be7 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -39,7 +39,7 @@ Operation for creating, deleting, editing and many other user related functions. #------------------------------------------------------------------- -=head2 _submenu ( session, workarea [, title, help] ) +=head2 _submenu ( session, properties ) Internal utility routine for setting up the Admin Console for User functions. diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index 146859bcd..5096fde69 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -211,6 +211,7 @@ sub formField { my $withWrapper = shift; my $u = shift; my $skipDefault = shift; + my $assignedValue = shift; my $default; if ($skipDefault) { } @@ -231,6 +232,9 @@ sub formField { $default = WebGUI::Operation::Shared::secureEval($self->session,$properties->{dataDefault}); } $properties->{value} = $default; + if (defined $assignedValue) { + $properties->{value} = $assignedValue; + } if ($withWrapper == 1) { return WebGUI::Form::DynamicField->new($self->session,%{$properties})->displayFormWithWrapper; } elsif ($withWrapper == 2) { diff --git a/lib/WebGUI/Session/Url.pm b/lib/WebGUI/Session/Url.pm index a9a23920d..1ab69245f 100644 --- a/lib/WebGUI/Session/Url.pm +++ b/lib/WebGUI/Session/Url.pm @@ -182,6 +182,36 @@ sub gateway { return $url; } +#------------------------------------------------------------------- + +=head2 getBackToSiteURL ( ) + +Tries to return a URL to take the user back to the last page they were at before +using an operation or other function. + +=cut + +sub getBackToSiteURL { + my $self = shift; + my $url; + if (defined $self->session->asset) { + my $importNode = WebGUI::Asset->getImportNode($self->session); + my $importNodeLineage = $importNode->get("lineage"); + my $media = WebGUI::Asset->getMedia($self->session); + my $mediaLineage = $media->get("lineage"); + my $assetLineage = $self->session->asset->get("lineage"); + if ($assetLineage =~ /^$importNodeLineage/ || $assetLineage eq "000001" || $assetLineage =~ /^$mediaLineage/ || ($self->session->asset->get("state") ne "published" && $self->session->asset->get("state") ne "archived")) { + $url = WebGUI::Asset->getDefault($self->session)->getUrl; + } else { + $url = $self->session->asset->getContainer->getUrl; + } + } else { + $url = $self->session->url->page(); + } + return $url; +} + + #------------------------------------------------------------------- =head2 getRefererUrl ( ) diff --git a/lib/WebGUI/i18n/English/Invite.pm b/lib/WebGUI/i18n/English/Invite.pm new file mode 100644 index 000000000..e63a5a8d6 --- /dev/null +++ b/lib/WebGUI/i18n/English/Invite.pm @@ -0,0 +1,128 @@ +package WebGUI::i18n::English::Invite; + +our $I18N = { + + 'invite a friend title' => { + message => q|Invite A Friend|, + lastUpdated => 1181103900, + }, + + 'default invite' => { + message => q|I'm a member of a site that I thought you would find very useful, so I'm sending this invitation hoping you'll join me here. Click on the link below to register.|, + lastUpdated => 1181106351, + }, + + 'missing email' => { + message => q|The invitation cannot be sent because you did not enter an email address.|, + lastUpdated => 1181409056, + }, + + 'missing message' => { + message => q|Your invitiation must have a message.|, + lastUpdated => 1181409432, + }, + + 'missing subject' => { + message => q|Your invitation must have a subject.|, + lastUpdated => 1181409433, + }, + + 'already a member' => { + message => q|Already a member.|, + lastUpdated => 1181410226, + }, + + 'invitation sent' => { + message => q|Your invitation has been sent.|, + lastUpdated => 1181410226, + }, + + 'invalid invite code' => { + message => q|Invalid invitation code|, + lastUpdated => 1181428043, + }, + + 'invalid invite code message' => { + message => q|The invitation code in your URL is invalid.|, + lastUpdated => 1181410226, + }, + + 'already a member message' => { + message => q|The invitation code in your URL is invalid.|, + lastUpdated => 1181410226, + context => q|This message is displayed when someone who is already signed up tries to use an invite code.|, + }, + + 'invite form template title' => { + message => q|User Invitation Form Template|, + lastUpdated => 1181492752, + }, + + 'invite form template body' => { + message => q|This template is used to customize and display the form that users fill out to invite friends to create an account.|, + lastUpdated => 1181492842, + }, + + 'inviteFormError' => { + message => q|Any errors from submitting the form. Error messages are internationalized.|, + lastUpdated => 1181492842, + }, + + 'formHeader' => { + message => q|HTML code for starting the form.|, + lastUpdated => 1181492842, + }, + + 'formFooter' => { + message => q|HTML code for ending the form.|, + lastUpdated => 1181492842, + }, + + 'title' => { + message => q|An internationalized title for the form.|, + lastUpdated => 1181492842, + }, + + 'emailAddressLabel' => { + message => q|An internationalized label for the email address field.|, + lastUpdated => 1181492842, + }, + + 'emailAddressForm' => { + message => q|HTML code for the email address field.|, + lastUpdated => 1181492842, + }, + + 'subjectLabel' => { + message => q|An internationalized label for the subject field.|, + lastUpdated => 1181492842, + }, + + 'subjectForm' => { + message => q|HTML code for the subject field.|, + lastUpdated => 1181492842, + }, + + 'messageLabel' => { + message => q|An internationalized label for the message field.|, + lastUpdated => 1181492842, + }, + + 'messageForm' => { + message => q|HTML code for the message field.|, + lastUpdated => 1181492842, + }, + + 'submitButton' => { + message => q|HTML code for the submit button, with internationalized label.|, + lastUpdated => 1181492842, + }, + + 'topicName' => { + message => q|User Invitations.|, + lastUpdated => 1181493546, + }, + +}; + +1; diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm index a15444f7c..09cc1797a 100644 --- a/lib/WebGUI/i18n/English/WebGUI.pm +++ b/lib/WebGUI/i18n/English/WebGUI.pm @@ -3676,10 +3676,9 @@ and tracked by WebGUI.|, lastUpdated => 1163457062, }, - 'Enable passive profiling description' => { - message => q|Used in conjunction with Metadata, this keeps a record of every wobject viewed by -a user.|, - lastUpdated => 1167189802, + 'Enable user invitations description' => { + message => q|Enable users to send emails to their friends, inviting them to come and create an account on this site.|, + lastUpdated => 1181017746, }, '164 description' => { @@ -3788,6 +3787,17 @@ Select which of the configured LDAP connections to use to authenticate users. lastUpdated => 1089039511 }, + 'Enable passive profiling description' => { + message => q|Used in conjunction with Metadata, this keeps a record of every wobject viewed by +a user.|, + lastUpdated => 1167189802, + }, + + 'Enable user invitations' => { + message => q|Enable user invitations?|, + lastUpdated => 1181017730 + }, + 'Illegal Warning' => { message => q|Enabling this feature is illegal in some countries, like Australia. In addition, some countries require you to add a warning to your site if you use this feature. Consult your local authorities for local laws. Plain Black Corporation is not responsible for your illegal activities, regardless of ignorance or malice.|, lastUpdated => 1089039511 @@ -4077,6 +4087,21 @@ Get a copy of wget and use this: wget -p -r --html-extension -k http://the lastUpdated => 1161388472, }, + 'invite a friend' => { + message => q|Invite a friend|, + lastUpdated => 1181019679, + }, + + 'user invitations email exists' => { + message => q|Email exists message|, + lastUpdated => 1181277915 + }, + + 'user invitations email exists description' => { + message => q|This is the message displayed to users who try to invite someone whose email address already exists in the system.|, + lastUpdated => 1181277914, + }, + }; 1;