Changes from plugins/enviar_email/enviar_email_articulo.html at r7 to trunk/spip/esqueleto-redcta/plugins/enviar_email/enviar_email_articulo.html at r30
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/spip/esqueleto-redcta/plugins/enviar_email/enviar_email_articulo.html
r7 r30 2 2 <BOUCLE_enviar_articulo(ARTICLES){id_article}> 3 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4 <html dir="#LANG_DIR" lang="#LANG" >4 <html dir="#LANG_DIR" lang="#LANG" style="background-color:#ffffff"> 5 5 6 6 <head> 7 7 8 <title>[Enviar artículo: (#TITRE|textebrut)]</title> 8 9 <!-- Para los buscadores --> 10 <meta http-equiv="Content-Type" content="text/html; charset=#CHARSET" /> 11 <meta name="robot" content="follow, index, all"> 12 <meta name="revisit-after" content="1 days"> 13 <meta name="generator" content="SPIP" /> 14 [<meta name="description" content="(#INTRODUCTION|couper{150}|attribut_html)" />] 15 <meta name="keywords" content=""> 16 9 [<meta name="description" content="(#INTRODUCTION|couper{150}|textebrut)" />] 10 <INCLURE{fond=inc-head}> 17 11 18 12 <style type="text/css"> … … 25 19 26 20 .formulario { 27 background-color: white;21 background-color:#ffffff; 28 22 border: 0px solid silver; 29 font-family: Verdana, Arial, Helvetica, sans-serif; 30 font-size:75%; 23 font-size:90%; 31 24 margin-top:.9em; 32 25 } … … 34 27 .campos { 35 28 width: 95%; 29 font-size:90%; 36 30 padding-left: 2px; 37 31 padding-right: 2px; 38 padding-top: 1px;39 padding-bottom: 1px;40 font- size: 110%;41 color:# 333333;32 padding-top:2px; 33 padding-bottom:2px; 34 font-family: Verdana, Arial, Helvetica, sans-serif; 35 color:#666666; 42 36 margin-bottom:.3em; 43 border:1px solid #B2BFCF;37 border:1px solid silver; 44 38 } 45 39 46 . spip_bouton {40 .boton { 47 41 padding: 0px; 48 border: 1px solid gray; 49 background-color: whitesmoke; 50 font-family: verdana,helvetica,arial,sans-serif; 42 border: 1px solid silver; 51 43 color: #666666; 52 font-size: 100%;53 44 } 54 45 --> … … 57 48 </head> 58 49 59 <body style="border:0px; padding:0px; text-align:center"> 60 #NOM_SITE 61 <?php 50 <body style="border:0px; padding:0px; font-size:90%;text-align:center;background-color:#ffffff;color: #727860;"> 51 52 <?php 53 62 54 if (!$HTTP_POST_VARS){ 63 55 … … 65 57 ?> 66 58 67 <div style="width:9 5%; margin:auto;">59 <div style="width:90%; margin:auto;padding-top:.6em"> 68 60 <form action="<?php $phpself; ?>" method="POST" enctype="multipart/form-data" class="formulario"> 69 <h2 style="text-align:center; margin-bottom:.2em"><span style="text-decoration:underline">#NOM_SITE_SPIP</span><div style="font-weight:normal; font-size:80%; margin-top:.6em;">Enviar [la referencia de "<span style="font-weight:bold; font-style: italic">(#TITRE)</span>" ]por correo electrónico</div></h2> 61 62 <h2 style="text-align:center;"><span style="text-decoration:underline;color:#f28000">#NOM_SITE_SPIP</span><div style="font-weight:normal; font-size:80%; margin-top:.9em;margin-bottom:.9em">Enviar [referencia de <span style="font-weight:bold;font-style:italic">'(#TITRE)'</span> ]por correo electrónico</div></h2> 63 70 64 <fieldset style="text-align:left; margin-bottom:.6em"> 71 65 <b>Enviar a la dirección:</b><div style="font-size:95%;color:#999999">(separa con comas si escribes más de una)</div><input name="destino" class="campos" value="" size="40"></fieldset> … … 73 67 <legend style="font-weight:bold">Datos opcionales</legend> 74 68 Asunto <span style="font-size:95%;color:#999999">(título que quieres darle al mensaje)</span><br /><input name="asunto" class="campos" size="40" value=""><br/> 75 69 Tu nombre<br /><input name="nombre" class="campos" size="40" value=""><br/> 76 70 Tu dirección de correo electrónico<br /><input name="email" class="campos" size="40" value=""><br /> 77 71 Puedes añadir un texto en el mensaje<br /><textarea name="coment" class="campos" style="font-size:100%; font-family:verdana, arial, helvetica, sans-serif;" cols="40" rows="3"></textarea> 78 72 <div style="text-align:center"> 79 <input type="submit" name="enviar" class=" spip_bouton" style="margin-top:.3em" value="Enviar"> <input type="button" class="spip_bouton" style="margin-top:.3em" value="Cancelar" onclick="window.close();">73 <input type="submit" name="enviar" class="boton" style="margin-top:.3em" value="Enviar"> <input type="button" class="boton" style="margin-top:.3em" value="Cancelar" onclick="window.close();"> 80 74 </div> 81 75 <input type="hidden" name="message" value="1"> … … 88 82 89 83 // REVISA QUE HAYA UN EMAIL PARA ENVIAR EL MENSAJE 90 if (!$destino) { echo "<p style='color:red; font-size:90%'>Lo sentimos :-( , pero sin dirección de correo electrónico válidano podemos enviar el mensaje</p>";84 if (!$destino) { echo "<p style='color:red; font-size:90%'>Lo sentimos :-( pero sin dirección de correo electrónico válida<br />no podemos enviar el mensaje</p>"; 91 85 92 86 ?> … … 94 88 <div style="width:90%; margin:auto;"> 95 89 <form action="<?php $phpself; ?>" method="POST" enctype="multipart/form-data" class="formulario"> 96 <h2 style="text-align:center; margin-bottom:. 2em"><span style="text-decoration:underline">#NOM_SITE_SPIP</span><div style="font-weight:normal; font-size:80%; margin-top:.6em;">Enviar [la referencia de "<span style="font-weight:bold; font-style: italic">(#TITRE)</span>"]por correo electrónico</div></h2>90 <h2 style="text-align:center; margin-bottom:.1em"><span style="text-decoration:underline">#NOM_SITE_SPIP</span><div style="font-weight:normal; font-size:80%; margin-top:1.2em">Enviar [referencia de <span style="font-weight:bold; font-style: italic">'(#TITRE)'</span> ]por correo electrónico</div></h2> 97 91 <fieldset style="text-align:left; margin-bottom:.6em"> 98 92 <b>Enviar a la dirección:</b><div style="font-size:95%;color:#999999">(separa con comas si escribes más de una)</div><input name="destino" class="campos" value="" size="40"></fieldset> … … 100 94 <legend style="font-weight:bold">Datos opcionales</legend> 101 95 Asunto <span style="font-size:95%;color:#999999">(título que quieres darle al mensaje)</span><br /><input name="asunto" class="campos" size="40" value=""><br/> 102 96 Tu nombre<br /><input name="nombre" class="campos" size="40" value=""><br/> 103 97 Tu dirección de correo electrónico<br /><input name="email" class="campos" size="40" value=""><br /> 104 98 Puedes añadir un texto en el mensaje<br /><textarea name="coment" class="campos" style="font-size:100%; font-family:verdana, arial, helvetica, sans-serif;" cols="40" rows="3"></textarea> 105 99 <div style="text-align:center"> 106 <input type="submit" name="enviar" class=" spip_bouton" style="margin-top:.3em" value="Enviar"> <input type="button" class="spip_bouton" style="margin-top:.3em" value="Cancelar" onclick="window.close();">100 <input type="submit" name="enviar" class="boton" style="margin-top:.3em" value="Enviar"> <input type="button" class="boton" style="margin-top:.3em" value="Cancelar" onclick="window.close();"> 107 101 </div> 108 102 … … 112 106 </form> 113 107 </div> 114 <?php 115 }else { 116 117 // ENVÍO DEL MENSAJE CON PHPMAILER 108 109 <?php 110 } 111 112 // ENVIO DEL MENSAJE CON PHPMAILER 118 113 119 114 include_spip("phpmailer/class.phpmailer"); … … 123 118 124 119 $mail->IsSMTP(); 125 $mail->Mailer = "mail"; 126 $mail->Host = "localhost"; // Servidor de SMTP 120 $mail->Mailer = "smtp"; 121 122 123 /* 124 // SI EL SERVIDOR DE SMTP REQUIERE AUTENTICACION RELLENA ESTOS DATOS CON LOS TUYOS Y ACTIVALO 125 126 //Asignamos a Host el nombre de nuestro servidor smtp 127 $mail->Host = "smtp.hotpop.com"; 128 129 //Le indicamos que el servidor smtp requiere autenticación 130 $mail->SMTPAuth = true; 131 132 //Le decimos cual es nuestro nombre de usuario y password 133 $mail->Username = "micuenta@HotPOP.com"; 134 $mail->Password = "mipassword"; 135 */ 136 137 $mail->Host = "localhost"; // Servidor de SMTP 127 138 128 139 $mail->SetLanguage("es", "phpmailer/language/"); … … 130 141 $mail->Timeout="20"; 131 142 132 $mail->WordWrap = "75"; // set word wrap to 50 characters 133 //$mail->AddAttachment("/var/tmp/file.tar.gz"); // añadir archivos 134 $mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // añadir archivos con nombre 135 136 // VARIABLES 137 138 $un_salto="\r\n"; 139 $dos_saltos="\r\n\r\n"; 143 // $mail->WordWrap = "50"; // set word wrap to 50 characters 144 // $mail->AddAttachment("/var/tmp/file.tar.gz"); // añadir archivos 145 // $mail->AddAttachment("#DOSSIER_SQUELETTE/imagenes/logo_64.jpg", "logo_64.jpg"); // añadir archivos con nombre 140 146 141 147 // PARTE COMÚN 142 148 143 //Estoy recibiendo los campos, compongo el cuerpo 149 //Asignamos asunto y cuerpo del mensaje 150 151 //Estoy recibiendo los campos, compongo el cuerpo 152 153 if (!$HTTP_POST_VARS["nombre"]) { $remite= "No ha escrito su nombre"; } else { $remite= $HTTP_POST_VARS["nombre"]; } 154 $mail->FromName = $remite; // el nombre que queremos que vea 155 $mail->From = $HTTP_POST_VARS["email"]; // el email del nombre que se ve 144 156 145 if (!$HTTP_POST_VARS["nombre"]) { $remite= "Olvidó escribir su nombre"; } else { $remite= $HTTP_POST_VARS["nombre"]; } 146 $mail->FromName = $remite; // de nombre 147 $mail->From = $HTTP_POST_VARS["nombre"]; // de email 148 149 if (!$HTTP_POST_VARS["email"]) { $replica = "[(#EMAIL_WEBMASTER)]"; } else { $replica = $HTTP_POST_VARS["email"]; } 157 if (!$HTTP_POST_VARS["email"]) { $replica = '[(#EMAIL_WEBMASTER)]'; } else { $replica = $HTTP_POST_VARS["email"]; } 150 158 $mail->AddReplyTo($replica); // reply 151 159 … … 155 163 }; 156 164 157 if (!$HTTP_POST_VARS["asunto"]) { $asunto= "[(#TITRE|texte_script)]"; } else { $asunto=$HTTP_POST_VARS["asunto"]; }165 if (!$HTTP_POST_VARS["asunto"]) { $asunto='[(#TITRE|texte_script)]'; } else { $asunto=$HTTP_POST_VARS["asunto"]; } 158 166 $mail->Subject = $asunto; // Asunto 159 167 160 // COMIENZO PARTE TEXTO PLANO161 162 //Referencia al artículo para el texto plano163 ?>164 165 <B_autores>166 <BOUCLE_autores(AUTEURS){id_article}{", "}>167 <?php $autores='#NOM'; ?>168 </BOUCLE_autores>169 <?php $autores="|de ".$autores; ?>170 </B_autores>171 172 <?php173 $articulo= "::: [(#TITRE|attribut_html)] :::".$un_salto;174 $articulo.= "[(#SURTITRE|attribut_html)|][(#SOUSTITRE|attribut_html)|][(#DATE|affdate)]".$autores.$dos_saltos;175 $articulo.= "[(#INTRODUCTION|attribut_html|textebrut|couper{360})]".$dos_saltos;176 177 if (!$HTTP_POST_VARS["coment"]) { $comentario="Hola. Quizás este artículo de #NOM_SITE_SPIP (#URL_SITE_SPIP) te pueda interesar."; } else { $comentario=$HTTP_POST_VARS["coment"]; }178 $texto_plano .= $dos_saltos.$comentario.$dos_saltos."-------------------------------".$dos_saltos;179 $texto_plano .= $articulo;180 ?>181 <B_documents_plano>182 <?php183 $texto_plano .="Si visitas el artículo podrás descargarte los siguientes documentos:".$un_salto;184 ?>185 <BOUCLE_documents_plano(DOCUMENTS) {id_article} {mode=document} {doublons}>186 <?php187 $texto_plano .="[- #TITRE, (#TYPE_DOCUMENT - (#TAILLE|taille_en_octets))]".$dos_saltos;188 ?>189 </BOUCLE_documents_plano>190 </B_documents_plano>191 192 <?php193 $texto_plano.= "* leerlo completo: #URL_SITE_SPIP/#URL_ARTICLE".$un_salto;194 $texto_plano .= $un_salto."-------------------------------".$un_salto."Mensaje enviado por: ".$remite." <".$replica.">".$un_salto;195 $texto_plano .= "Fuente: #NOM_SITE_SPIP (#URL_SITE_SPIP)";196 $texto_plano .= $un_salto."-------------------------------".$un_salto;197 198 $mail->AltBody = $texto_plano; //Cuerpo en TEXTO PLANO199 200 // FIN PARTE TEXTO PLANO201 202 168 // COMIENZO PARTE HTML 203 169 204 $ texto_html .="<div style='margin:1.2em;background: #fff;font-family:\'Trebuchet MS\', Tahoma, Arial, Verdana,sans-serif;font-size: 0.9em;text-align: left;'>";205 if (!$HTTP_POST_VARS["coment"]) { $comentario="Hola. Quizás este artículo de <a href='#URL_SITE_SPIP' style='text-decoration: none'>#NOM_SITE_SPIP</a> te pueda interesar."; } else { $comentario=$HTTP_POST_VARS["coment"]; } 206 $ texto_html .="<p>".$comentario."</p>";207 $texto_html .="<div style='border: 1px solid #ccc;padding: .5em;'>"; 208 $texto_html .="[<div style='font-size:1.1em;'><a href='#URL_SITE_SPIP/#URL_ARTICLE' style='text-decoration: none'>(#TITRE|supprimer_numero)</a></div>]";209 ?> 210 211 <B_autores_html> 212 <BOUCLE_autores_html(AUTEURS){id_article}{", "}> 213 <?php $autores='[<a href="#URL_SITE_SPIP/#URL_AUTEUR" style="text-decoration:none">(#NOM)</a>]'; ?> 214 </BOUCLE_autores_html> 215 <?php $autores=" / de ".$autores; ?> 216 </B_autores_html> 217 218 <?php 219 $texto_html .="<div style='color:#666666; font-size:90%;padding-bottom:.3em'>[(#SURTITRE|attribut_html) / ][(#SOUSTITRE|attribut_html) / ][(#DATE|affdate)]".$autores."</div>";220 $texto_html .="<div style='font-size:96%'>[(#CHAPO|attribut_html)]</div>";221 $texto_html .="<div style='font-size:96%'>[(#TEXTE|attribut_html)]</div>";222 $texto_html .=" <div style='color:#999999; font-size:90%;'>[<a href='#URL_SITE_SPIP/#URL_ARTICLE' style='text-decoration: none'>... leer más ›››</a>]</div>"; 223 ?> 224 <B_documents> 225 <?php 226 $texto_html .="<div style='margin-top:.6em;padding:.3em; padding-bottom:0px;border-top:1px solid #cccccc;color:#666666; font-size:85%;'>Si visitas el artículo podrás descargarte los siguientes documentos:<br />";227 ?> 228 <BOUCLE_documents(DOCUMENTS) {id_article} {mode=document} {doublons}> 229 <?php 230 $texto_html .="[• #TITRE, (#TYPE_DOCUMENT - (#TAILLE|taille_en_octets))]"; 231 ?> 232 </BOUCLE_documents> 233 <?php 234 $texto_ html .="</div>";235 ?> 236 </B_documents> 237 <?php 238 $texto_ html .="</div>";239 $texto_ html .= "<div style='margin-top:.2em;margin-bottom:.9em;color:#666666; font-size:80%;text-align:right'>Mensaje enviado por: ".$remite." <".$replica.">";240 $texto_ html .= " /// Fuente: <a href='#URL_SITE_SPIP' style='text-decoration: none'>#NOM_SITE_SPIP</a><br /></div>";241 $texto_html .="</div>"; 242 243 $mail->Body = $texto_html; //Cuerpo en HTML 244 245 // FIN PARTE HTML170 $sitio='[(#NOM_SITE_SPIP)]'; 171 $url_sitio='[(#URL_SITE_SPIP)]'; 172 $url_art='[(#URL_ARTICLE)]'; 173 174 $texto_html ="<div style='margin:1.2em;font-family:tahoma,verdana,arial,helvetica,sans-serif;background-color:#ffffff;color:#727860;border:1px solid #f28000'>"; 175 176 $texto_html.="<p style='padding:0px;margin:0px;text-align:left;font-size:120%;font-weight:bold;background-color:#f28000'><a href='$url_sitio' style='display:block;text-decoration:none;color:#edef9f;padding:.3em'><img src='logo_64.jpg' border='0' /> ".$sitio."</a></p>"; 177 178 $texto_html.="<div style='padding:.9em;padding-top:0px'>"; 179 180 if (!$HTTP_POST_VARS["coment"]) { $comentario="Hola. Quizás esta información te pueda interesar."; } else { $comentario=$HTTP_POST_VARS["coment"]; } 181 $texto_html.="<p style='text-align:left'>".$comentario."</p>"; 182 183 $texto_html.="<div style='border: 1px solid silver;background-color:whitesmoke'>"; 184 $texto_html.="<div style='font-size:120%;padding:.3em;text-align:center;border-bottom:1px dotted silver'>".'[(#TITRE)]'."</div>"; 185 $texto_html.="<div style='padding:.9em;padding-bottom:.3em;font-size:95%;'>".'[(#TEXTE|couper{1200})]'."</div>"; 186 $texto_html.="<div style='font-size:90%;text-align:right;padding-bottom:.6em;padding-right:.9em'><a href='$url_sitio/$url_art'>leer más ›››</a></div>"; 187 $texto_html.="</div>"; 188 189 if (!$HTTP_POST_VARS["email"]) { $email_aut=""; } else { $email_aut=" (".$HTTP_POST_VARS["email"].")"; } 190 $texto_html.="<div style='font-size:80%;color:#999999;text-align:left'>Envíado por: ".$remite.$email_aut."</div>"; 191 192 $texto_html.="</div></div>"; 193 194 $mail->Body = $texto_html; 195 196 // COMIENZO PARTE TEXTO PLANO 197 198 if (!$HTTP_POST_VARS["coment"]) { $comentario="Hola. Quizás esta información te pueda interesar."; } else { $comentario=$HTTP_POST_VARS["coment"]; } 199 $texto_plano=$comentario."\n\n"; 200 $texto_plano.="-------------------------- \n"; 201 $texto_plano.='[(#NOM_SITE_SPIP)]'."\n".'[(#URL_SITE_SPIP)]'."\n\n"; 202 $texto_plano.='[(#TITRE)]'."\n\n"; 203 $texto_plano.='[(#TEXTE|couper{1200})]'."\n\n"; 204 $texto_plano.="leer más: ".$url_sitio."/".$url_art."\n\n"; 205 $texto_plano.="-------------------------- \n"; 206 $texto_plano.="Envíado por: ".$remite.$email_aut; 207 208 209 $mail->AltBody = $texto_plano; 210 211 // SE ENVÍA EL MENSAJE 246 212 247 213 // Envío (5 intentos) … … 263 229 if($enviado) 264 230 { 265 echo "<div style='margin-left:15px;margin-right:15px'><center><font color='#333366'><br /><br /><h2 style='text-align:center; font-weight:bold; margin-bottom:.3em'><span style='text-decoration:underline'>#NOM_SITE_SPIP</span></h2><br /><h1 style='text-align:center; font-size:90%'>La referencia de<i><b><div style='padding-top:.6em;padding-bottom:.6em'>\"[(#TITRE|texte_script)]\"</div></b></i>ya se ha enviado a ". $HTTP_POST_VARS["destino"] ."</h1></font></center></div>"; 231 echo "<div style='margin-left:15px;margin-right:15px'><center><br /><br /><h2 style='text-align:center; font-weight:bold; margin-bottom:.6em'><span style='text-decoration:underline;color:#f28000'>".'[(#NOM_SITE_SPIP)]'."</span></h2><br /><h1 style='text-align:center;font-size:95%'>La referencia de<i><b><div style='padding-top:.9em;padding-bottom:.9em;font-size:115%'>\"".'[(#TITRE|texte_script)]'."\"</div></b></i><div style='padding-bottom:.6em'>ya se ha enviado a:</div>"; 232 foreach($separar as $email_destino) { echo $email_destino."<br />"; } 233 echo "</h1 />"; 266 234 } 267 235 else{ 268 echo "<div style='margin-left:15px;margin-right:15px'><center><font color='red'><br /><br /><h2 style='text-align:center; font-weight:bold; margin-bottom:.3em'><span style='text-decoration:underline'>#NOM_SITE_SPIP</span></h2><br /><h1 style='text-align:center; font-size:90%'>Lo sentimos<br />Ha habido un problema y no se ha podido enviar el correo :-(</h1></font></center></div>"; 269 } 270 271 // Borro las direcciones de destino establecidas anteriormente 272 $mail->ClearAddresses(); 236 echo "<div style='margin-left:15px;margin-right:15px'><center><font color='red'><br /><br /><h2 style='text-align:center; font-weight:bold; margin-bottom:.3em'><span style='text-decoration:underline;color:#f28000'>".'[(#NOM_SITE_SPIP)]'."</span></h2><br /><h1 style='text-align:center;font-size:90%'>Lo sentimos<br />Ha habido un problema y no se ha podido enviar el correo :-(</h1></font></center></div>"; 237 } 273 238 274 239 ?> 275 240 276 <div style="text-align:center ; font-size:90%">241 <div style="text-align:center"> 277 242 <br /> 278 <input type="button" class=" spip_bouton" value="Cerrar" onclick="window.close();">279 </div> 280 281 <?php 282 } 243 <input type="button" class="boton" value="Cerrar" onclick="window.close();"> 244 </div> 245 246 <?php 247 283 248 } 284 249 ?>
Note: See TracChangeset
for help on using the changeset viewer.