[Yapcom-commit] rev 213 - in yapcom/trunk: db lib/YAPC
osdc_israel_2006 osdc_israel_2006/email templates/email
svn at pti.co.il
svn at pti.co.il
Sat Nov 19 15:54:01 IST 2005
Author: gabor
Date: 2005-11-19 15:54:00 +0200 (Sat, 19 Nov 2005)
New Revision: 213
Removed:
yapcom/trunk/osdc_israel_2006/email/register_subject.tmpl
Modified:
yapcom/trunk/db/config.sample
yapcom/trunk/lib/YAPC/Config.pm
yapcom/trunk/lib/YAPC/Organizer.pm
yapcom/trunk/osdc_israel_2006/email/register.tmpl
yapcom/trunk/osdc_israel_2006/index.tmpl
yapcom/trunk/templates/email/password.tmpl
yapcom/trunk/templates/email/register.tmpl
yapcom/trunk/templates/email/register_subject.tmpl
Log:
pass siganture name, site_url and site_email to the templates
used for e-mail generation
Modified: yapcom/trunk/db/config.sample
===================================================================
--- yapcom/trunk/db/config.sample 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/db/config.sample 2005-11-19 13:54:00 UTC (rev 213)
@@ -13,3 +13,6 @@
PROPOSAL_LENGTHS = 5, 30, 60, 90, 180
PROPOSAL_LANGUAGES = English Hebrew
+SIGNATURE_NAME = Gabor Szabo
+SITE_URL = http://yapcom.pti.co.il/
+
Modified: yapcom/trunk/lib/YAPC/Config.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Config.pm 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/lib/YAPC/Config.pm 2005-11-19 13:54:00 UTC (rev 213)
@@ -13,7 +13,7 @@
}
our $dir = $config{SITE_DIR};
-our $email_address = $config{SITE_EMAIL};
+our $site_email = $config{SITE_EMAIL};
our $conference_name = $config{CONFERENCE_NAME};
our $enable_proposals = $config{ENABLE_PROPOSALS} || 0;
@@ -36,7 +36,8 @@
sub check_configuration {
my $ok = 1;
- foreach my $field (qw(SITE_DIR SITE_EMAIL CONFERENCE_NAME SITE_ADMINS PROPOSAL_LENGTHS PROPOSAL_LANGUAGES)) {
+ foreach my $field (qw(SITE_DIR SITE_EMAIL CONFERENCE_NAME SITE_ADMINS PROPOSAL_LENGTHS PROPOSAL_LANGUAGES
+ SIGNATURE_NAME SITE_URL)) {
if (not defined $config{$field} or $config{$field} !~ /\w/) {
warn "$field is missing\n";
$ok = 0;
@@ -46,11 +47,11 @@
return $ok;
}
+sub get {
+ my ($field) = @_;
+ return $config{$field};
+}
+
1;
-=head1 VERSION
-$Id:$
-
-=cut
-
Modified: yapcom/trunk/lib/YAPC/Organizer.pm
===================================================================
--- yapcom/trunk/lib/YAPC/Organizer.pm 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/lib/YAPC/Organizer.pm 2005-11-19 13:54:00 UTC (rev 213)
@@ -1,6 +1,6 @@
package YAPC::Organizer;
-our $VERSION = '0.12';
+our $VERSION = '0.12_01';
use strict;
use warnings;
@@ -261,12 +261,14 @@
associate => $q,
path => \@templates_dirs,
search_path_on_include => \@templates_dirs,
- );
- $mail->param("password" => $person->password);
+ );
+ $mail->param(password => $person->password);
+ $mail->param($_ => YAPC::Config::get($_)) foreach qw(CONFERENCE_NAME SITE_NAME SIGNATURE_NAME SITE_URL);
+
my %mail = (
To => $person->email,
- From => $YAPC::Config::email_address,
- Subject => "YAPC::Israel::2005 your password",
+ From => $YAPC::Config::site_email,
+ Subject => "$YAPC::Config::conference_name - your password",
Message => $mail->output,
);
sendmail(%mail) or warn $Mail::Sendmail::error unless $ENV{YAPCOM_NOMAIL};
@@ -286,6 +288,13 @@
path => \@templates_dirs,
search_path_on_include => \@templates_dirs,
);
+ $mail->param("authcode" => $person->authcode);
+ my $validation_url = "http://$ENV{HTTP_HOST}$ENV{REQUEST_URI}";
+ $validation_url =~ s/\w+.html$/validation.html/;
+ $validation_url .= "?email=" . $person->email . "&authcode=" . $person->authcode;
+ $mail->param("validation_url" => $validation_url);
+ $mail->param($_ => YAPC::Config::get($_)) foreach qw(CONFERENCE_NAME SITE_NAME SIGNATURE_NAME SITE_URL);
+
my $subject =
HTML::Template->new(
filename => "email/register_subject.tmpl",
@@ -294,15 +303,12 @@
path => \@templates_dirs,
search_path_on_include => \@templates_dirs,
);
+ $subject->param($_ => YAPC::Config::get($_)) foreach qw(CONFERENCE_NAME SITE_NAME SIGNATURE_NAME SITE_URL);
- $mail->param("authcode" => $person->authcode);
- my $validation_url = "http://$ENV{HTTP_HOST}$ENV{REQUEST_URI}";
- $validation_url =~ s/\w+.html$/validation.html/;
- $validation_url .= "?email=" . $person->email . "&authcode=" . $person->authcode;
- $mail->param("validation_url" => $validation_url);
+
my %mail = (
To => $person->email,
- From => $YAPC::Config::email_address,
+ From => $YAPC::Config::site_email,
Subject => $subject->output,
Message => $mail->output,
);
@@ -669,8 +675,8 @@
# sending e-mail to administrator about new proposal
my %mail = (
- To => $YAPC::Config::email_address,
- From => $YAPC::Config::email_address,
+ To => $YAPC::Config::site_email,
+ From => $YAPC::Config::site_email,
Subject => "[YAPC talk] " . $talk->title,
Message => $text,
);
@@ -688,9 +694,9 @@
$text .= sprintf "Company: %s\n", $person->company if defined $person->company;
my %spymail = (
- To => $YAPC::Config::email_address,
- From => $YAPC::Config::email_address,
- Subject => "new YAPC::Israel::2005 registration received",
+ To => $YAPC::Config::site_email,
+ From => $YAPC::Config::site_email,
+ Subject => "new OSDC::Israel::2006 registration received",
Message => $text,
);
sendmail(%spymail) or warn $Mail::Sendmail::error unless $ENV{YAPCOM_NOMAIL};
Modified: yapcom/trunk/osdc_israel_2006/email/register.tmpl
===================================================================
--- yapcom/trunk/osdc_israel_2006/email/register.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/osdc_israel_2006/email/register.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -1,7 +1,7 @@
Dear <TMPL_VAR NAME="fname"> <TMPL_VAR NAME="lname">,
-thank you for starting your registration at the Open Source Developers'
-Conference in Israel.
+thank you for starting your registration at the
+Open Source Developers' Conference in Israel.
Please type the validation code in
the form which opened after registering.
@@ -12,16 +12,16 @@
<TMPL_VAR NAME="validation_url">
-If you have any questions, don't hesitate to contact us at orga at osdc.org.il .
+If you have any questions, don't hesitate to contact us at <TMPL_VAR name="site_email"> .
regards
- Gabor Szabo
- http://www.osdc.org.il/
+ <TMPL_VAR name="signature_name">
+ <TMPL_VAR name="site_url">
ps.
If you did not register for the OSDC and received this
-email by mistake please forward it to orga at osdc.org.il
+email by mistake please forward it to <TMPL_VAR name="site_email"> .
noting the fact that you did not want to register to the
Conference.
Deleted: yapcom/trunk/osdc_israel_2006/email/register_subject.tmpl
===================================================================
--- yapcom/trunk/osdc_israel_2006/email/register_subject.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/osdc_israel_2006/email/register_subject.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -1 +0,0 @@
-OSDC::Israel::2006 registration information
Modified: yapcom/trunk/osdc_israel_2006/index.tmpl
===================================================================
--- yapcom/trunk/osdc_israel_2006/index.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/osdc_israel_2006/index.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -18,7 +18,7 @@
<table>
<tr><td>Date:</td><td>26-28 February 2006</td></tr>
<tr><td>Times:</td><td>09:00-17:00</td></tr>
- <tr><td>Location:</td><td><af="http://www.netanya.ac.il/">Netanya College</a></td></tr>
+ <tr><td>Location:</td><td><a href="http://www.netanya.ac.il/">Netanya College</a></td></tr>
<!--
<tr><td>Price:</td><td>between 90-300 NIS (see details below)<br /></td></tr>
-->
Modified: yapcom/trunk/templates/email/password.tmpl
===================================================================
--- yapcom/trunk/templates/email/password.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/templates/email/password.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -3,9 +3,9 @@
Your password is <TMPL_VAR NAME="password">
If you have any questions, don't hesitate to contact us at
-EMAIL
+<TMPL_VAR name="site_email">
regards
- NAME
- URL
+ <TMPL_VAR name="signature_name">
+ <TMPL_VAR name="site_url">
Modified: yapcom/trunk/templates/email/register.tmpl
===================================================================
--- yapcom/trunk/templates/email/register.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/templates/email/register.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -11,16 +11,16 @@
<TMPL_VAR NAME="validation_url">
-If you have any questions, don't hesitate to contact us at EMAIL.
+If you have any questions, don't hesitate to contact us at <TMPL_VAR name="site_email">.
regards
- NAME
- URL
+ <TMPL_VAR name="signature_name">
+ <TMPL_VAR name="site_url">
ps.
If you did not register for the CONFERENCE and received this
-email by mistake please forward it to EMAIL
+email by mistake please forward it to <TMPL_VAR name="site_email">
noting the fact that you did not want to register to the
Conference.
Modified: yapcom/trunk/templates/email/register_subject.tmpl
===================================================================
--- yapcom/trunk/templates/email/register_subject.tmpl 2005-11-19 12:49:26 UTC (rev 212)
+++ yapcom/trunk/templates/email/register_subject.tmpl 2005-11-19 13:54:00 UTC (rev 213)
@@ -1 +1 @@
-CONFERENCE registration information
+<TMPL_VAR name="conference_name"> registration information
More information about the Yapcom-commit
mailing list