From 6400e601f953fad458731f17e759d0f13628a695 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Thu, 5 Nov 2009 00:48:17 +0100 Subject: [PATCH] Displays marketing text to the marketer. --- modules/marketing.php | 17 +++++++++++++++++ templates/marketing/public.tpl | 26 +++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/modules/marketing.php b/modules/marketing.php index 5b4af06..a0123ef 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -311,6 +311,23 @@ class MarketingModule extends PLModule $market->add(); } } + } else { + global $globals; + require_once 'marketing.inc.php'; + + $sender = User::getSilent(S::v('uid')); + $market = new AnnuaireMarketing(null, null); + $text = $market->getText(array( + 'sexe' => $user->isFemale(), + 'forlife_email' => $user->login() . '@' . $globals->mail->domain, + 'forlife_email2' => $user->login() . '@' . $globals->mail->domain2 + )); + $perso_signature = '"' . $sender->fullName() . '" <' . $sender->bestEmail() . '>'; + $text = preg_replace("{-- (.|\n)*}", + "-- \n" . $perso_signature . '', $text); + $page->assign('text', nl2br($text)); + $page->assign('xorg_signature', str_replace("\n", '
', $market->getSignature())); + $page->assign('perso_signature', $perso_signature); } } diff --git a/templates/marketing/public.tpl b/templates/marketing/public.tpl index 5b48c3d..a810568 100644 --- a/templates/marketing/public.tpl +++ b/templates/marketing/public.tpl @@ -87,15 +87,35 @@ peut sans aucun doute l'aider à se décider ! Nous lui écrirons : -
- +
+ -
+

+
+
+ + + + + + + +
Texte de l'email
+ {$text|smarty:nodefaults} +
{/if} -- 2.1.4