some configurations
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Fri, 3 Dec 2004 12:24:02 +0000 (12:24 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:26:26 +0000 (23:26 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-29

include/conf.d/newsletter.globals.inc.php [new file with mode: 0644]
include/newsletter.inc.php
install.d/banana/README
install.d/newsletter/README
install.d/newsletter/files

diff --git a/include/conf.d/newsletter.globals.inc.php b/include/conf.d/newsletter.globals.inc.php
new file mode 100644 (file)
index 0000000..63ed7d7
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/***************************************************************************
+ *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  http://opensource.polytechnique.org/                                   *
+ *                                                                         *
+ *  This program is free software; you can redistribute it and/or modify   *
+ *  it under the terms of the GNU General Public License as published by   *
+ *  the Free Software Foundation; either version 2 of the License, or      *
+ *  (at your option) any later version.                                    *
+ *                                                                         *
+ *  This program is distributed in the hope that it will be useful,        *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
+ *  GNU General Public License for more details.                           *
+ *                                                                         *
+ *  You should have received a copy of the GNU General Public License      *
+ *  along with this program; if not, write to the Free Software            *
+ *  Foundation, Inc.,                                                      *
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
+ ***************************************************************************/
+
+// {{{ class SkinConfig
+
+class NLConfig
+{
+    var $from         = "\"Lettre Mensuelle\" <null@example.org>";
+    var $replyto      = "null@example.org";
+}
+
+// }}}
+
+$this->newsletter = new NLConfig;
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
+?>
index 96d0e79..a18cfe1 100644 (file)
@@ -253,12 +253,14 @@ EOF;
     }
     
     function sendTo($prenom,$nom,$login,$sex,$html) {
+        global $globals;
        require_once('diogenes.hermes.inc.php');
+
        $mailer = new HermesMailer();
-       $mailer->setFrom("\"Lettre Mensuelle Polytechnique.org\" <info_newsletter@polytechnique.org>");
+       $mailer->setFrom($globals->newsletter->from);
        $mailer->setSubject($this->title());
        $mailer->addTo("\"$prenom $nom\" <$login@polytechnique.org>");
-       $mailer->addHeader('Reply-To','info+nlp@polytechnique.org');
+       $mailer->addHeader('Reply-To',$globals->newsletter->replyto);
        $mailer->setTxtBody($this->toText($prenom,$nom,$sex));
        if($html) {
            $mailer->setHTMLBody($this->toHtml($prenom,$nom,$sex,true));
index bb5c453..ae47f89 100644 (file)
@@ -35,5 +35,6 @@ DEPENDS
 -------
 
   platal
-
+  + uncompface  (usually in compface)
+  + convert     (usually in imagemagick)
 
index a2b85eb..4a0ee42 100644 (file)
@@ -7,6 +7,7 @@ htdocs/css/nl.css
 htdocs/newsletter/index.php
 htdocs/newsletter/show.php
 htdocs/newsletter/submit.php
+include/conf.d/newsletter.globals.inc.php
 include/conf.d/newsletter.menu.inc.php
 include/newsletter.inc.php
 templates/admin/newsletter_edit.tpl