From: x2000habouzit
$body
";
+ if ($app) $art .= "
$app
";
+
+ return $art;
+ }
+
+ function check() {
+ $text = enriched_to_text($this->_body);
+ $arr = explode("\n",wordwrap($text,68));
+ $c = 0;
+ foreach($arr as $line) if(trim($line)) $c++;
+ return $c<9;
+ }
}
class NLConstraint {
diff --git a/scripts/migration/0.9.1/newsleter.sql b/scripts/migration/0.9.1/newsleter.sql
index 9cdddcb..0b140fd 100644
--- a/scripts/migration/0.9.1/newsleter.sql
+++ b/scripts/migration/0.9.1/newsleter.sql
@@ -1,7 +1,6 @@
-- -----------------------------------------------------------------------------
-- update old table
--
-alter table newsletter change id id int not null;
alter table newsletter change `date` `date` date not null;
alter table newsletter add column bits enum('old','sent','new') default 'new' not null;
update newsletter set bits='old';
@@ -32,19 +31,10 @@ create table newsletter_art (
aid smallint unsigned not null,
cid smallint unsigned not null,
pos tinyint unsigned not null,
- texte mediumtext not null,
+ title mediumtext not null,
+ body mediumtext not null,
+ append mediumtext not null,
PRIMARY KEY (id,aid)
);
--
-- -----------------------------------------------------------------------------
--- newsletter appends
---
-create table newsletter_contact (
- id int unsigned not null,
- aid smallint unsigned not null,
- titre varchar(128) not null,
- content varchar(128) not null,
- type enum('url','mail','text','none'),
- PRIMARY KEY (id,aid)
-);
--- -----------------------------------------------------------------------------
diff --git a/templates/docs/contacts.tpl b/templates/docs/contacts.tpl
index 3689077..b5c1626 100644
--- a/templates/docs/contacts.tpl
+++ b/templates/docs/contacts.tpl
@@ -17,7 +17,7 @@
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: contacts.tpl,v 1.9 2004-08-31 20:19:30 x2000habouzit Exp $
+ $Id: contacts.tpl,v 1.10 2004-10-16 17:49:39 x2000habouzit Exp $
***************************************************************************}
@@ -169,13 +169,17 @@ la newsletter : le texte du message doit faire au plus 8 lignes de 68 ca
sus).
-Une fois que ton article est prêt et qu'il ne dépasse pas la taille indiquée, il te suffit -de nous le soumettre par email (éviter les pièces jointes) à cette adresse : +Un formulaire en ligne te permet de nous soumettre un article, et se chargera de vérifier +ces contraintes pour toi : soumission d'article. +
++Sinon, une fois que ton article est prêt et qu'il ne dépasse pas la taille indiquée, +tu peux aussi nous le soumettre par email (éviter les pièces jointes) à cette adresse : {mailto address='info_nlp@polytechnique.org' encode='hex'}.
Les anciennes newsletters de Polytechnique.org sont -archivées si tu veux t'en inspirer. +archivées si tu veux t'en inspirer.
{elseif $smarty.request.topic eq 6} diff --git a/templates/newsletter/index.tpl b/templates/newsletter/index.tpl index 806fdb7..93430e4 100644 --- a/templates/newsletter/index.tpl +++ b/templates/newsletter/index.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: index.tpl,v 1.1 2004-10-15 12:57:11 x2000habouzit Exp $ + $Id: index.tpl,v 1.2 2004-10-16 17:49:39 x2000habouzit Exp $ ***************************************************************************} @@ -30,7 +30,7 @@ cette lettre, il te suffit de te rendre sur la page dePour demander l'ajout d'une annonce dans la prochaine lettre mensuelle, -écris-nous ! +utilise le formulaire dédié !.
{dynamic} diff --git a/templates/newsletter/submit.tpl b/templates/newsletter/submit.tpl new file mode 100644 index 0000000..7c3f171 --- /dev/null +++ b/templates/newsletter/submit.tpl @@ -0,0 +1,128 @@ +{*************************************************************************** + * 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 * + *************************************************************************** + $Id: submit.tpl,v 1.1 2004-10-16 17:49:39 x2000habouzit Exp $ + ***************************************************************************} + + ++ton article a bien été pris en compte. +
+ ++Nous te recontacterons éventuellement (certainement vers la fin du mois) si nous avons des +renseignements à te demander à son sujet ! +
+ +{else} + + +{if $art} + +{if !$art->check()} +
+article trop long !
+il faut te limiter à 8 lignes de 68 caractères.
+