if ($oArticles->count() == 0) { // Ups, template has been deleted: Restore from current newsletter message article $notis = $notification->returnNotification("warning", i18n("The html newsletter template article has been deleted, it has been restored using the html message article of this newsletter", $plugin_name)) . "<br>"; $iIDArt = conCopyArticle($oNewsletter->get("idart"), $oClientLang->getProperty("newsletter", "html_template_idcat"), sprintf(i18n("%s (Template restored)", $plugin_name), $oNewsletter->get("name"))); $oNewsletter->set("template_idart", $iIDArt); $oNewsletter->store(); } } } } $oForm = new UI_Table_Form("frmNewsletterMsg"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "news_save"); $oForm->setVar("idnewsletter", $idnewsletter); $oForm->setWidth("100%"); $oForm->addHeader(sprintf(i18n("Edit newsletter message (%s)", $plugin_name), $oNewsletter->get("name"))); $oForm->add(i18n("Subject", $plugin_name), $oNewsletter->get("subject")); $sTagInfoText = '<a href="javascript:fncShowHide(\'idTagInfoText\');"><strong>' . i18n("Tag information", $plugin_name) . '</strong></a>' . '<div id="idTagInfoText" style="display: none"><br /><b>' . i18n("Special message tags (will be replaced when sending)", $plugin_name) . ':</b><br>' . 'MAIL_NAME: ' . i18n("Name of the recipient", $plugin_name) . '<br />' . 'MAIL_DATE: ' . i18n("Date, when the mail has been sent", $plugin_name) . '<br />' . 'MAIL_TIME: ' . i18n("Time, when the mail has been sent", $plugin_name) . '<br />' . 'MAIL_NUMBER: ' . i18n("Number of recipients", $plugin_name) . '<br />' . 'MAIL_UNSUBSCRIBE: ' . i18n("Link to unsubscribe", $plugin_name) . '<br />' . 'MAIL_STOP: ' . i18n("Link to pause the subscription", $plugin_name) . '<br />' . 'MAIL_GOON: ' . i18n("Link to resume the subscription", $plugin_name); $sTagInfoHTML = '<a href="javascript:fncShowHide(\'idTagInfoHTML\');"><strong>' . i18n("Tag information", $plugin_name) . '</strong></a>' . '<div id="idTagInfoHTML" style="display: none"><br /><b>' . i18n("Special message tags (will be replaced when sending, {..} = optional)", $plugin_name) . ":</b><br />" . '[mail name="name" type="text"]{text}MAIL_NAME{text}[/mail]: ' . i18n("Name of the recipient", $plugin_name) . "<br />" . '[mail name="date" type="text"]{text}MAIL_DATE{text}[/mail]: ' . i18n("Date, when the mail has been sent", $plugin_name) . "<br />" . '[mail name="time" type="text"]{text}MAIL_TIME{text}[/mail]: ' . i18n("Time, when the mail has been sent", $plugin_name) . "<br />" . '[mail name="number" type="text"]{text}MAIL_NUMBER{text}[/mail]: ' . i18n("Number of recipients", $plugin_name) . "<br />" . '[mail name="unsubscribe" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_UNSUBSCRIBE{text}[/mail]: ' . i18n("Link to unsubscribe", $plugin_name) . "<br />" . '[mail name="stop" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_STOP{text}[/mail]: ' . i18n("Link to pause the subscription", $plugin_name) . "<br />" . '[mail name="goon" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_GOON{text}[/mail]: ' . i18n("Link to resume the subscription", $plugin_name); // Mention plugin interface if (getSystemProperty("newsletter", "newsletter-recipients-plugin") == "true") { $sTagInfoText .= "<br /><br /><strong>" . i18n("Additional message tags from recipients plugins:", $plugin_name) . "</strong><br />"; $sTagInfoHTML .= "<br /><br /><strong>" . i18n("Additional message tags from recipients plugins:", $plugin_name) . "</strong><br />"; if (is_array($cfg['plugins']['recipients'])) { foreach ($cfg['plugins']['recipients'] as $plugin) { plugin_include("recipients", $plugin . "/" . $plugin . ".php"); if (function_exists("recipients_" . $plugin . "_wantedVariables")) { $aPluginVars = call_user_func("recipients_" . $plugin . "_wantedVariables"); foreach ($aPluginVars as $sPluginVar) { $sTagInfoText .= 'MAIL_' . strtoupper($sPluginVar) . '<br />';