From 13c8d8e700144676141f6de18e634e8e355e0600 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Wed, 20 Oct 2004 13:57:56 +0000 Subject: [PATCH] tiny improvements + footer --- htdocs/css/nl.css | 9 +++++++++ include/newsletter.inc.php | 29 ++++++++++++++++++++++++++++- templates/newsletter/show.tpl | 4 ++-- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/htdocs/css/nl.css b/htdocs/css/nl.css index fec21fc..4245782 100644 --- a/htdocs/css/nl.css +++ b/htdocs/css/nl.css @@ -94,3 +94,12 @@ div.nl div.app { font-size: 95%; } +div.nl div.foot { + border-top: 1px #808080 dashed; + font-size: 95%; + padding: 1ex; + color: #808080; + background: inherit; + text-align: center; +} + diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 3f7c8dd..784771c 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: newsletter.inc.php,v 1.17 2004-10-20 12:59:32 x2000habouzit Exp $ + $Id: newsletter.inc.php,v 1.18 2004-10-20 13:57:56 x2000habouzit Exp $ ***************************************************************************/ @@ -112,6 +112,27 @@ class NewsLetter { } } + function footer($html) { + if($html) { + return '
Cette lettre est envoyée à tous les Polytechniciens sur Internet par l\'intermédiaire de Polytechnique.org.
' + . '
' + . '[archives | ' + . 'écrire dans la NL | ' + . 'ne plus recevoir | ' + . 'recevoir en texte brut]' + . '
'; + } else { + return "\n\n--------------------------------------------------------------------\n" + . "Cette lettre est envoyée à tous les Polytechniciens sur Internet par\n" + . "l'intermédiaire de Polytechnique.org.\n" + . "\n" + . "archives : [http://www.polytechnique.org/newsletter/]\n" + . "écrire : [http://www.polytechnique.org/newsletter/submit.php]\n" + . "ne plus recevoir: [http://www.polytechnique.org/listes/?nl_unsub=1]\n" + . "recevoir en HTML: [http://www.polytechnique.org/listes/?nl_sub=html]\n"; + } + } + function toText() { $res = "====================================================================\n"; $res .= ' '.$this->title()."\n"; @@ -136,6 +157,9 @@ class NewsLetter { $res .= "\n\n"; } } + + $res .= $this->footer(false); + return $res; } @@ -159,6 +183,8 @@ class NewsLetter { } } + $res .= $this->footer(true); + if($body) { $res = << @@ -178,6 +204,7 @@ class NewsLetter { div.art { padding: 2ex; margin: 0ex 1ex 2ex 1ex; width: 58ex; border-top: 1px #cccccc solid; } div.app { padding: 2ex 3ex 0ex 3ex; width: 100%; margin: 0ex; text-align: left; font-size: 95%; } + div.foot { border-top: 1px #808080 dashed; font-size: 95%; padding: 1ex; color: #808080; background: inherit; text-align: center; } diff --git a/templates/newsletter/show.tpl b/templates/newsletter/show.tpl index 103ac7c..f994cb4 100644 --- a/templates/newsletter/show.tpl +++ b/templates/newsletter/show.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: show.tpl,v 1.3 2004-10-16 22:44:40 x2000habouzit Exp $ + $Id: show.tpl,v 1.4 2004-10-20 13:57:56 x2000habouzit Exp $ ***************************************************************************} {dynamic} @@ -37,7 +37,7 @@ {/perms}

-
+
-- 2.1.4