public static function es_template_default() { $result = es_cls_compose::es_template_count(0); if ($result == 0) { $form['es_templ_heading'] = 'New post published ###POSTTITLE###'; $es_b = "Hello ###NAME###,\r\n\r\n"; $es_b = $es_b . "We have published new blog in our website. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTDESC###\r\n"; $es_b = $es_b . "You may view the latest post at "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "You received this e-mail because you asked to be notified when new updates are posted.\r\n\r\n"; $es_b = $es_b . "Thanks & Regards\r\n"; $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $form['es_templ_heading'] = 'Post notification ###POSTTITLE###'; $es_b = "Hello ###EMAIL###,\r\n\r\n"; $es_b = $es_b . "We have published new blog in our website. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTIMAGE###\r\n"; $es_b = $es_b . "###POSTFULL###\r\n"; $es_b = $es_b . "You may view the latest post at "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "You received this e-mail because you asked to be notified when new updates are posted.\r\n\r\n"; $es_b = $es_b . "Thanks & Regards\r\n"; $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $Sample = '<strong style="color: #990000"> Email Subscribers</strong><p>Email Subscribers plugin has options to send newsletters to subscribers. It has a separate page with HTML editor to create a HTML newsletter.'; $Sample .= ' Also have options to send notification email to subscribers when new posts are published to your blog. Separate page available to include and exclude categories to send notifications.'; $Sample .= ' Using plugin Import and Export options admins can easily import registered users and commenters to subscriptions list.</p>'; $Sample .= ' <strong style="color: #990000">Plugin Features</strong><ol>'; $Sample .= ' <li>Send notification email to subscribers when new posts are published.</li>'; $Sample .= ' <li>Subscription box.</li><li>Double opt-in and single opt-in facility for subscriber.</li>'; $Sample .= ' <li>Email notification to admin when user signs up (Optional).</li>'; $Sample .= ' <li>Automatic welcome mail to subscriber (Optional).</li>'; $Sample .= ' <li>Unsubscribe link in the mail.</li>'; $Sample .= ' <li>Import/Export subscriber emails.</li>'; $Sample .= ' <li>HTML editor to compose newsletter.</li>'; $Sample .= ' </ol>'; $Sample .= ' <p>Plugin live demo and video tutorial available on the official website. Check official website for more information.</p>'; $Sample .= ' <strong>Thanks & Regards</strong><br>Admin'; $form['es_templ_heading'] = 'Hello World Newsletter'; $form['es_templ_body'] = $Sample; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Static Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); } return true; }
<?php if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } ?> <div class="wrap"> <?php $did = isset($_GET['did']) ? $_GET['did'] : '0'; es_cls_security::es_check_number($did); // First check if ID exist with requested ID $result = es_cls_compose::es_template_count($did); if ($result != '1') { ?> <div class="error fade"><p><strong><?php _e('Oops, selected details doesnt exist.', 'email-subscribers'); ?> </strong></p></div><?php } else { $es_errors = array(); $es_success = ''; $es_error_found = FALSE; $data = array(); $data = es_cls_compose::es_template_select($did); // Preset the form fields $form = array('es_templ_id' => $data['es_templ_id'], 'es_templ_heading' => stripslashes($data['es_templ_heading']), 'es_templ_body' => stripslashes($data['es_templ_body']), 'es_templ_status' => $data['es_templ_status'], 'es_email_type' => $data['es_email_type']); } // Form submitted, check the data if (isset($_POST['es_form_submit']) && $_POST['es_form_submit'] == 'yes') { // Just security thingy that wordpress offers us
public static function es_template_default() { $result = es_cls_compose::es_template_count(0); if ($result == 0) { // XTEC ************ MODIFICAT - Support localization // 2015.10.09 @dgras $form['es_templ_heading'] = "S'ha publicat un article nou: ###POSTTITLE###"; $es_b = "Hola ###NAME###,\r\n\r\n"; $es_b = $es_b . "Hem publicat un article nou al nostre lloc web. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTDESC###\r\n"; $es_b = $es_b . "Podeu veure l'últim article a "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "Heu rebut aquest correu perquè vau demanar que se us notifiqués la publicació d'articles nous\r\n\r\n"; $es_b = $es_b . "Gràcies i salutacions\r\n"; // @Comment: The code below would be the right way to do but it does not work /* $form['es_templ_heading'] = __('New post published ###POSTTITLE###', 'email-subscribers'); $es_b = __("Hello ###NAME###", 'email-subscribers').",\r\n\r\n"; $es_b = $es_b . __("We have published new blog in our website. ###POSTTITLE###", 'email-subscribers')."\r\n"; $es_b = $es_b . "###POSTDESC###\r\n"; $es_b = $es_b . __("You may view the latest post at ", 'email-subscribers'); $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . __("You received this e-mail because you asked to be notified when new updates are posted.", 'email-subscribers')."\r\n\r\n"; $es_b = $es_b . __("Thanks & Regards", 'email-subscribers')."\r\n"; */ $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $form['es_templ_heading'] = "Notificació d'article nou ###POSTTITLE###"; $es_b = "Hola ###EMAIL###,\r\n\r\n"; $es_b = $es_b . "Hem publicat un article nou al nostre lloc web. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTIMAGE###\r\n"; $es_b = $es_b . "###POSTFULL###\r\n"; $es_b = $es_b . "Podeu veure l'últim article a "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "Heu rebut aquest correu perquè vau demanar que se us notifiqués la publicació d'articles nous\r\n\r\n"; $es_b = $es_b . "Gràcies i salutacions\r\n"; // @Comment: The code below would be the right way to do but it does not work /* $form['es_templ_heading'] = __('Post notification ###POSTTITLE###', 'email-subscribers'); $es_b = __("Hello ###EMAIL###", 'email-subscribers').",\r\n\r\n"; $es_b = $es_b . __("We have published new blog in our website. ###POSTTITLE###", 'email-subscribers')."\r\n"; $es_b = $es_b . "###POSTIMAGE###\r\n"; $es_b = $es_b . "###POSTFULL###\r\n"; $es_b = $es_b . __("You may view the latest post at ", 'email-subscribers'); $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . __("You received this e-mail because you asked to be notified when new updates are posted.", 'email-subscribers')."\r\n\r\n"; $es_b = $es_b . __("Thanks & Regards", 'email-subscribers')."\r\n"; */ $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $Sample = '<strong style="color: #990000"> Subscriptors de correu</strong>'; $Sample .= "<p>\r\n\t\t\t\t\t\t\tL\\'extensió subscripcions de correu de correu té diferents opcions per enviar butlletins als subscriptors.\r\n\t\t\t\t\t\t\tTé una pàgina separada amb un editor HTML per crear\tun butlletí amb aquest format.\r\n\t\t\t\t\t\t\tL\\'extensió disposa d\\'opcions per enviar correus de notificació als subscriptors quan es publiquen articles nous al lloc web. També té una pàgina per poder afegir i eliminar les categories a les que s\\'enviaran les notificacions.\r\n\t\t\t\t\t\t\tUtilitzant les opcions de l\\'extensió d\\'importació i exportació els administradors podran importar fàcilment els usuaris registrats.\r\n\t\t\t\t\t\t</p>"; $Sample .= ' <strong style="color: #990000">Característiques de l\'extensió</strong><ol>'; $Sample .= " <li>Correu de notificació als subscriptors quan es publiquin articles nous.</li>"; $Sample .= " <li>Giny de subscripció</li><li>Correu de subscripció amb confirmació per correu i subscripció simple per facilitar la subscripció.</li>"; $Sample .= " <li>Notificació per correu electrònic a l\\'administrador quan els usuaris es subscriguin (Opcional)</li>"; $Sample .= " <li>Correu de benvinguda automàtic als subscriptors (Opcional).</li>"; $Sample .= " <li>Enllaç per donar-se de baixa del correu.</li>"; $Sample .= " <li>Importació / Exportació dels correus dels subscriptors.</li>"; $Sample .= " <li>Editor d\\'HTML per redactar el butlletí.</li>"; $Sample .= " </ol>"; $Sample .= " <strong>Gràcies i salutacions</strong><br>Admin"; $form['es_templ_heading'] = 'Butlletí Hola Món'; // @Comment: The code below would be the right way to do but it does not work /* $Sample = '<strong style="color: #990000"> '. __("Email subscribers",'email-subscribers') .'</strong><p>'.__("Email subscribers plugin has options to send newsletters to subscribers. It has a separate page with HTML editor to create a HTML newsletter.",'email-subscribers'); $Sample .= __('Also have options to send notification email to subscribers when new posts are published to your blog. Separate page available to include and exclude categories to send notifications.','email-subscribers'); $Sample .= __("Using plugin Import and Export options admins can easily import registered users and commenters to subscriptions list.",'email-subscribers').'</p>'; $Sample .= ' <strong style="color: #990000">'.__("Plugin Features",'email-subscribers').'</strong><ol>'; $Sample .= ' <li>'.__("Send notification email to subscribers when new posts are published.",'email-subscribers').'</li>'; $Sample .= ' <li>'.__("Subscription box",'email-subscribers').'</li><li>'.__("Double opt-in and single opt-in facility for subscriber.",'email-subscribers') .'</li>'; $Sample .= ' <li>'.__("Email notification to admin when user signs up (Optional).",'email-subscribers').'</li>'; $Sample .= ' <li>'.__("Automatic welcome mail to subscriber (Optional).",'email-subscribers').'</li>'; $Sample .= ' <li>'.__("Unsubscribe link in the mail.",'email-subscribers') .'</li>'; $Sample .= ' <li>'.__("Import/Export subscriber emails.",'email-subscribers') .'</li>'; $Sample .= ' <li>'.__("HTML editor to compose newsletter.",'email-subscribers') .'</li>'; $Sample .= ' </ol>'; $Sample .= ' <p>'.__("Plugin live demo and video tutorial available on the official website. Check official website for more information.",'email-subscribers') .'</p>'; $Sample .= ' <strong>'.__("Thanks & Regards",'email-subscribers') .'</strong><br>Admin'; $form['es_templ_heading'] = __('Hello World Newsletter','email-subscribers'); */ $form['es_templ_body'] = $Sample; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Static Template'; //************ ORIGINAL /* $form['es_templ_heading'] = 'New post published ###POSTTITLE###'; $es_b = "Hello ###NAME###,\r\n\r\n"; $es_b = $es_b . "We have published new blog in our website. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTDESC###\r\n"; $es_b = $es_b . "You may view the latest post at "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "You received this e-mail because you asked to be notified when new updates are posted.\r\n\r\n"; $es_b = $es_b . "Thanks & Regards\r\n"; $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $form['es_templ_heading'] = 'Post notification ###POSTTITLE###'; $es_b = "Hello ###EMAIL###,\r\n\r\n"; $es_b = $es_b . "We have published new blog in our website. ###POSTTITLE###\r\n"; $es_b = $es_b . "###POSTIMAGE###\r\n"; $es_b = $es_b . "###POSTFULL###\r\n"; $es_b = $es_b . "You may view the latest post at "; $es_b = $es_b . "###POSTLINK###\r\n"; $es_b = $es_b . "You received this e-mail because you asked to be notified when new updates are posted.\r\n\r\n"; $es_b = $es_b . "Thanks & Regards\r\n"; $es_b = $es_b . "Admin"; $form['es_templ_body'] = $es_b; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Dynamic Template'; $action = es_cls_compose::es_template_ins($form, $action = "insert"); $Sample = '<strong style="color: #990000"> Email subscribersr</strong><p>Email subscribers plugin has options to send newsletters to subscribers. It has a separate page with HTML editor to create a HTML newsletter.'; $Sample .= ' Also have options to send notification email to subscribers when new posts are published to your blog. Separate page available to include and exclude categories to send notifications.'; $Sample .= ' Using plugin Import and Export options admins can easily import registered users and commenters to subscriptions list.</p>'; $Sample .= ' <strong style="color: #990000">Plugin Features</strong><ol>'; $Sample .= ' <li>Send notification email to subscribers when new posts are published.</li>'; $Sample .= ' <li>Subscription box.</li><li>Double opt-in and single opt-in facility for subscriber.</li>'; $Sample .= ' <li>Email notification to admin when user signs up (Optional).</li>'; $Sample .= ' <li>Automatic welcome mail to subscriber (Optional).</li>'; $Sample .= ' <li>Unsubscribe link in the mail.</li>'; $Sample .= ' <li>Import/Export subscriber emails.</li>'; $Sample .= ' <li>HTML editor to compose newsletter.</li>'; $Sample .= ' </ol>'; $Sample .= ' <p>Plugin live demo and video tutorial available on the official website. Check official website for more information.</p>'; $Sample .= ' <strong>Thanks & Regards</strong><br>Admin'; $form['es_templ_heading'] = 'Hello World Newsletter'; $form['es_templ_body'] = $Sample; $form['es_templ_status'] = 'Published'; $form['es_email_type'] = 'Static Template'; */ //************ FI $action = es_cls_compose::es_template_ins($form, $action = "insert"); } return true; }