Explorar o código

Ticket #441 - Email template header/footer in Polyglot.

AntonLV %!s(int64=10) %!d(string=hai) anos
pai
achega
3d5146e8c2
Modificáronse 39 ficheiros con 379 adicións e 320 borrados
  1. 4 16
      inc/classes/BxDolEmailTemplates.php
  2. 3 1
      install/sql/system.sql
  3. 3 8
      modules/boonex/antispam/install/langs/en.xml
  4. 2 2
      modules/boonex/contact/install/langs/en.xml
  5. 5 8
      modules/boonex/convos/install/langs/en.xml
  6. 46 39
      modules/boonex/english/data/langs/system/en.xml
  7. 14 21
      modules/boonex/events/install/langs/en.xml
  8. 2 2
      modules/boonex/facebook_connect/install/langs/en.xml
  9. 3 4
      modules/boonex/forum/install/langs/en.xml
  10. 3 4
      modules/boonex/google_connect/install/langs/en.xml
  11. 15 22
      modules/boonex/groups/install/langs/en.xml
  12. 6 6
      modules/boonex/invites/install/langs/en.xml
  13. 3 4
      modules/boonex/linkedin_connect/install/langs/en.xml
  14. 2 2
      modules/boonex/payment/install/langs/en.xml
  15. 3 8
      modules/boonex/russian/data/langs/bx_antispam/ru.xml
  16. 3 3
      modules/boonex/russian/data/langs/bx_contact/ru.xml
  17. 5 8
      modules/boonex/russian/data/langs/bx_convos/ru.xml
  18. 14 21
      modules/boonex/russian/data/langs/bx_events/ru.xml
  19. 3 3
      modules/boonex/russian/data/langs/bx_facebook/ru.xml
  20. 3 4
      modules/boonex/russian/data/langs/bx_forum/ru.xml
  21. 3 4
      modules/boonex/russian/data/langs/bx_googlecon/ru.xml
  22. 14 21
      modules/boonex/russian/data/langs/bx_groups/ru.xml
  23. 6 6
      modules/boonex/russian/data/langs/bx_invites/ru.xml
  24. 3 4
      modules/boonex/russian/data/langs/bx_linkedin/ru.xml
  25. 2 2
      modules/boonex/russian/data/langs/bx_payment/ru.xml
  26. 8 8
      modules/boonex/russian/data/langs/bx_sites/ru.xml
  27. 3 3
      modules/boonex/russian/data/langs/bx_tricon/ru.xml
  28. 3 4
      modules/boonex/russian/data/langs/bx_twitter/ru.xml
  29. 46 39
      modules/boonex/russian/data/langs/system/ru.xml
  30. 8 8
      modules/boonex/sites/install/langs/en.xml
  31. 3 4
      modules/boonex/trident_connect/install/langs/en.xml
  32. 3 4
      modules/boonex/twitter_connect/install/langs/en.xml
  33. 18 0
      studio/classes/BxDolStudioPolyglot.php
  34. 19 0
      studio/js/polyglot.js
  35. 3 0
      studio/template/pgt_etemplates_hf.html
  36. 2 1
      studio/template/polyglot.html
  37. 93 4
      studio/template/scripts/BxBaseStudioPolyglot.php
  38. 0 12
      template/_email_footer.html
  39. 0 10
      template/_email_header.html

+ 4 - 16
inc/classes/BxDolEmailTemplates.php

@@ -22,9 +22,7 @@ bx_import('BxDolPermalinks');
  *
  * User is sent email in language which is defined in their account, if account language is not set - then default site language is used.
  *
- * Email templates use template system, so it is possible to customize header/footer accross all templates, by default header/footer files are:
- * - templates/base/_email_header.html
- * - templates/base/_email_footer.html
+ * Email templates use template system, so it is possible to customize header/footer via Studio -> Polyglot -> Emails header/footer
  *
  * 1-click unsubscribe link is added automatically to every email (except a few system emails, which is not supposed to unsubscribe from, like forgot password email).
  * Please note: make sure that {unsubscribe} marker is not removed, or unsubscribe link will not be added.
@@ -73,9 +71,11 @@ class BxDolEmailTemplates extends BxDolFactory implements iBxDolSingleton
         $this->iFallbackLangId = $oLang->getLangId('en');
 
         $sAboutUs = _t('_sys_et_txt_about_us');
-        $aDefaultKeys = array(
+        $this->aDefaultKeys = array(
         	'site_url' => BX_DOL_URL_ROOT,
         	'site_name' => getParam('site_title'),
+            'email_header' => getParam('site_email_html_template_header'),
+            'email_footer' => getParam('site_email_html_template_footer'),
             'about_us' => BxDolTemplate::getInstance()->parseHtmlByName('bx_a.html', array(
                 'href' => BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=about'),
 				'title' => bx_html_attribute($sAboutUs),
@@ -84,18 +84,6 @@ class BxDolEmailTemplates extends BxDolFactory implements iBxDolSingleton
             ))
         );
 
-        $bUseEmailHtmlTemplate = getParam('site_email_html_template') == 'on';
-        $this->aDefaultKeys = array_merge($aDefaultKeys, array(
-            'bx_if:show_html_header' => array(
-                'condition' => $bUseEmailHtmlTemplate,
-            	'content' => $aDefaultKeys
-            ),
-            'bx_if:show_html_footer' => array(
-                'condition' => $bUseEmailHtmlTemplate,
-            	'content' => $aDefaultKeys
-            )
-        ));
-
         $this->_oEmailTemplatesQuery = BxDolEmailTemplatesQuery::getInstance();
     }
 

+ 3 - 1
install/sql/system.sql

@@ -251,6 +251,9 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `or
 SET @iCategoryId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+(@iCategoryId, 'site_email_html_template_header', '_adm_stg_cpt_option_site_email_html_template_header', '<html>\r\n    <head></head>\r\n    <body bgcolor="#eee" style="margin:0; padding:0;">\r\n        <div style="padding:20px; background-color:#eee;">\r\n            <table width="600" border="0" cellspacing="0" cellpadding="0" align="center">\r\n                <tr><td valign="top">\r\n                    <div style="color:#333; padding:20px; border:1px solid #999; background-color:#fff; font:14px Helvetica, Arial, sans-serif;">\r\n                        <div style="border-bottom:2px solid #eee; padding-bottom:10px; margin-bottom:20px; font-weight:bold; font-size:22px; color:#999;">{site_name}</div>', 'text', '', '', '', 1),
+(@iCategoryId, 'site_email_html_template_footer', '_adm_stg_cpt_option_site_email_html_template_footer', '\r\n                        <div style="margin-top:5px; color:#999; font:11px Helvetica, Arial, sans-serif;">{unsubscribe}</div>\r\n                    </div>\r\n                </td></tr>\r\n                <tr><td valign="top">\r\n                    <div style="margin-top:5px; text-align:center; color:#999; font:11px Helvetica, Arial, sans-serif;">{about_us}</div>\r\n                </td></tr>\r\n            </table>\r\n        </div>\r\n    </body>\r\n</html>', 'text', '', '', '', 2),
+
 (@iCategoryId, 'sys_site_logo', '', '0', 'digit', '', '', '', 20),
 (@iCategoryId, 'sys_site_logo_alt', '_adm_dsg_txt_alt_text', '0', 'text', '', '', '', 21),
 (@iCategoryId, 'sys_site_icon', '', '0', 'digit', '', '', '', 22),
@@ -374,7 +377,6 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'site_title', '_adm_stg_cpt_option_site_title', 'Community', 'digit', '', '', '', 1),
 (@iCategoryId, 'site_email', '_adm_stg_cpt_option_site_email', 'admin@example.com', 'digit', '', '', '', 2),
 (@iCategoryId, 'site_email_notify', '_adm_stg_cpt_option_site_email_notify', 'admin@example.com', 'digit', '', '', '', 3),
-(@iCategoryId, 'site_email_html_template', '_adm_stg_cpt_option_site_email_html_template', '', 'checkbox', '', '', '', 4),
 (@iCategoryId, 'site_tour_home', '_adm_stg_cpt_option_site_tour_home', 'on', 'checkbox', '', '', '', 6),
 (@iCategoryId, 'site_tour_studio', '_adm_stg_cpt_option_site_tour_studio', 'on', 'checkbox', '', '', '', 7),
 

+ 3 - 8
modules/boonex/antispam/install/langs/en.xml

@@ -129,9 +129,7 @@ This antispam method scan submitted content for the URLs and check them if any o
 
     <string name="_bx_antispam_spam_report_name"><![CDATA[Spam report message]]></string>
     <string name="_bx_antispam_spam_report_subject"><![CDATA[Automatic spam report]]></string>
-    <string name="_bx_antispam_spam_report_body"><![CDATA[
-<bx_include_auto:_email_header.html />
-
+    <string name="_bx_antispam_spam_report_body"><![CDATA[{email_header}
 <b>Profile:</b> <a href="{SpammerUrl}">{SpammerNickName}</a><br />
 
 <b>Page:</b> {Page}<br /><br />
@@ -150,8 +148,5 @@ This antispam method scan submitted content for the URLs and check them if any o
 <pre>
 {SpamContent}
 </pre>
-
-<bx_include_auto:_email_footer.html />]]></string>
-
-</resources>
-
+{email_footer}]]></string>
+</resources>

+ 2 - 2
modules/boonex/contact/install/langs/en.xml

@@ -36,11 +36,11 @@
 
 	<string name="_bx_contact_et_contact_form_message"><![CDATA[Contact form message.]]></string>
 	<string name="_bx_contact_et_contact_form_message_subject"><![CDATA[Contact form message.]]></string>
-	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[{email_header}
 <p><b>Dear Administrator</b>,</p>
 <p>You were contacted by <u>{SenderName}</u> with email <u>{SenderEmail}</u></p>
 <hr />
 <p><b>{MessageSubject}</b></p>
 <p>{MessageBody}</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 </resources>

+ 5 - 8
modules/boonex/convos/install/langs/en.xml

@@ -118,20 +118,17 @@
 
     <string name="_bx_cnv_email_new_message"><![CDATA[New message]]></string>
     <string name="_bx_cnv_email_new_message_subject"><![CDATA[New message from {SenderDisplayName}]]></string>
-    <string name="_bx_cnv_email_new_message_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_cnv_email_new_message_body"><![CDATA[{email_header}
 <p>New message from <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_cnv_email_new_reply"><![CDATA[New reply]]></string>
     <string name="_bx_cnv_email_new_reply_subject"><![CDATA[New reply from {SenderDisplayName}]]></string>
-    <string name="_bx_cnv_email_new_reply_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_cnv_email_new_reply_body"><![CDATA[{email_header}
 <p>New reply from <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-
-</resources>
+{email_footer}]]></string>
+</resources>

+ 46 - 39
modules/boonex/english/data/langs/system/en.xml

@@ -867,6 +867,7 @@
 	<string name="_adm_lmi_cpt_displays"><![CDATA[Displays]]></string>
 	<string name="_adm_lmi_cpt_downloaded"><![CDATA[Downloaded]]></string>
 	<string name="_adm_lmi_cpt_etemplates"><![CDATA[Email Templates]]></string>
+	<string name="_adm_lmi_cpt_etemplates_hf"><![CDATA[Emails header/footer]]></string>
 	<string name="_adm_lmi_cpt_featured"><![CDATA[Featured]]></string>
 	<string name="_adm_lmi_cpt_fields"><![CDATA[Fields]]></string>
 	<string name="_adm_lmi_cpt_files"><![CDATA[Files]]></string>
@@ -1071,6 +1072,11 @@
 	<string name="_adm_pgt_txt_nkp_key_name"><![CDATA[Key Name]]></string>
 	<string name="_adm_pgt_txt_nkp_module"><![CDATA[Module]]></string>
 	<string name="_adm_pgt_txt_text"><![CDATA[Text]]></string>
+	<string name="_adm_pgt_txt_et_hf_inf"><![CDATA[Note, that improper use of HTML may break the email message's layout. Also make sure that {unsubscribe} marker presents in at least one of the templates (header and/or footer).]]></string>
+	<string name="_adm_pgt_btn_et_hf_submit"><![CDATA[Submit]]></string>
+	<string name="_adm_pgt_scs_et_hf_save"><![CDATA[The changes were successfully saved.]]></string>
+	<string name="_adm_pgt_err_et_hf_save"><![CDATA[Cannot save changes.]]></string>
+	<string name="_adm_pgt_err_et_hf_save_unsubscribe"><![CDATA[Cannot save changes, because {unsubscribe} marker was removed from both templates, header and footer.]]></string>
 	<string name="_adm_prm_btn_actions_cancel"><![CDATA[Cancel]]></string>
 	<string name="_adm_prm_btn_actions_options"><![CDATA[Edit options]]></string>
 	<string name="_adm_prm_btn_actions_save"><![CDATA[Save]]></string>
@@ -1188,7 +1194,8 @@
 	<string name="_adm_stg_cpt_option_permalinks_pages"><![CDATA[Enable friendly permalinks for Pages]]></string>
 	<string name="_adm_stg_cpt_option_site_email"><![CDATA[Email to receive critical site notifications]]></string>
 	<string name="_adm_stg_cpt_option_site_email_notify"><![CDATA[Email to send site messages from]]></string>
-	<string name="_adm_stg_cpt_option_site_email_html_template"><![CDATA[Use HTML template in site email messages]]></string>
+	<string name="_adm_stg_cpt_option_site_email_html_template_header"><![CDATA[Email template header]]></string>
+	<string name="_adm_stg_cpt_option_site_email_html_template_footer"><![CDATA[Email template footer]]></string>
 	<string name="_adm_stg_cpt_option_site_title"><![CDATA[Site title]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_home"><![CDATA[Site home page tour]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_studio"><![CDATA[Studio home page tour]]></string>
@@ -1592,98 +1599,98 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_designbox_4"><![CDATA[Content + Title]]></string>
 	<string name="_sys_done"><![CDATA[Done]]></string>    
 	<string name="_sys_et_txt_about_us"><![CDATA[About us]]></string>
-	<string name="_sys_et_txt_body_admin_email"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_sys_et_txt_body_admin_email"><![CDATA[{email_header}
 <p>Hello,</p>
 <p>Administration of the <a href="{site_url}">{site_name}</a> is glad to inform you that</p>
 <p>=========================</p>
 <p style="color:#3B5C8E">{MessageText}</p>
 <p>=========================</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_comment_replied"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_comment_replied"><![CDATA[{email_header}
 <p>Hello,</p>
 <p>Your comment was replied. It reads:</p>
 <p>{reply_text}</p>
 <p>Please refer to comment page for more details: <a href="{comment_url}">My Comment</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_system_reported"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_system_reported"><![CDATA[{email_header}
 <p>Hello,</p>
 <p>New report with <b>{report_type}</b> type was received. It reads:</p>
 <p>{report_text}</p>
 <p>Please refer to content page for more details <a href="{report_url}">here</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_confirmation"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_confirmation"><![CDATA[{email_header}
 <p>Hello, {name}.</p>
 <p>Please verify your email address by clicking on the link below:</p>
 <p><a href="{conf_link}">Verify email address</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_delayed_module_uninstall"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_delayed_module_uninstall"><![CDATA[{email_header}
 <p>Module: <b>{Module}</b></p>
 <p>Uninstaltion result: {Result}</p>
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_forgot"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_forgot"><![CDATA[{email_header}
 <p>Hello!</p>
 <p>Please, follow the link below to reset your password:</p>
 <p><a href="{forgot_password_url}">{forgot_password_url}</a></p>
 <p>Thank you.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_mem_changed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_mem_changed"><![CDATA[{email_header}
 <p>Hello,</p>
 <p>Your membership level was changed to: <b>{membership_level}</b></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_mem_expiration"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_mem_expiration"><![CDATA[{email_header}
 <p>Hello,</p>
 <p>We are notifying you that your {site_name} {membership_name} will expire in {expire_days} days (-1 means already expired).</p>
 <p>To renew your membership login to your {site_name} account at <a href="{site_url}member.php">{site_url}member.php</a> and go to <a href="{site_url}modules/?r=membership/index/">My Membership</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_password_reset"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_password_reset"><![CDATA[{email_header}
 <p>Hello!</p>
 <p>Your new password is:</p>
 <p><b>{password}</b></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_active"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_active"><![CDATA[{email_header}
 <p>Hello, {profile_name}.</p>
 <p>Welcome to {site_name}! Here's a copy of your account details:</p>
 <p>Name: {account_name}</p>
 <p>Email Address: {account_email}</p>
 <p>Site URL: <a href="{site_url}">{site_url}</a></p>
 <p>Thank you!</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_pending"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_pending"><![CDATA[{email_header}
 <p>Hello, {profile_name}.</p>
 <p>Your profile is waiting for review, as soon as it is reviewed you will receive notification by email.</p>
 <p>Thank you!</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_suspended"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_suspended"><![CDATA[{email_header}
 <p>Hello {profile_name},</p>
 <p>Your profile was suspended.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_account"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_account"><![CDATA[{email_header}
 <p>{account_output}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_pruning"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_pruning"><![CDATA[{email_header}
 <p>{pruning_output}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_failed"><![CDATA[{email_header}
 <p>Upgrade failed due to the following error:</p>
 <p>{error_msg}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_modules_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_modules_failed"><![CDATA[{email_header}
 <p>The following errors appeared during modules upgrade:</p>
 <p>{conclusion}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_success"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_success"><![CDATA[{email_header}
 <p>Site was successfully upgraded to {new_version}.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_modules_success"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_modules_success"><![CDATA[{email_header}
 <p>The following modules were successfully upgraded.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_bg_operation_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_bg_operation_failed"><![CDATA[{email_header}
 <p>Background operation failed with the following message.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_sys_et_txt_body_modules_upgrade_success"><![CDATA[<b>{0}</b> module: up to {1} version.<br />]]></string>
 	<string name="_sys_et_txt_body_modules_upgrade_failed"><![CDATA[<b>{0}</b> module: {1}<br />]]></string>
 	<string name="_sys_et_txt_name_system_admin_email"><![CDATA[Message sending from the Admin Panel]]></string>

+ 14 - 21
modules/boonex/events/install/langs/en.xml

@@ -299,50 +299,43 @@
 
     <string name="_bx_events_email_join_request"><![CDATA[Event join request]]></string>
     <string name="_bx_events_email_join_request_subject"><![CDATA[Request to join your event]]></string>
-    <string name="_bx_events_email_join_request_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_request_body"><![CDATA[{email_header}
 <p>New request to join <a href="{EntryUrl}">{EntryTitle}</a> event from <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_join_reject"><![CDATA[Event join request was rejected]]></string>
     <string name="_bx_events_email_join_reject_subject"><![CDATA[Request to join an event was rejected]]></string>
-    <string name="_bx_events_email_join_reject_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_reject_body"><![CDATA[{email_header}
 <p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> event was rejected by event admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_join_confirm"><![CDATA[Event join request was confirmed]]></string>
     <string name="_bx_events_email_join_confirm_subject"><![CDATA[Your request to join an event was confirmed]]></string>
-    <string name="_bx_events_email_join_confirm_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_confirm_body"><![CDATA[{email_header}
 <p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> event was confirmed by the event admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_fan_remove"><![CDATA[Profile was removed from event participants]]></string>
     <string name="_bx_events_email_fan_remove_subject"><![CDATA[Your profile was removed from the event]]></string>
-    <string name="_bx_events_email_fan_remove_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_fan_remove_body"><![CDATA[{email_header}
 <p>Your profile was removed from <a href="{EntryUrl}">{EntryTitle}</a> event by the event admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_fan_become_admin"><![CDATA[Event admin status was granted]]></string>
     <string name="_bx_events_email_fan_become_admin_subject"><![CDATA[You are an event admin now]]></string>
-    <string name="_bx_events_email_fan_become_admin_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_fan_become_admin_body"><![CDATA[{email_header}
 <p>You are an admin of <a href="{EntryUrl}">{EntryTitle}</a> event now.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_admin_become_fan"><![CDATA[Event admin status was revoked]]></string>
     <string name="_bx_events_email_admin_become_fan_subject"><![CDATA[Your event admin status was revoked]]></string>
-    <string name="_bx_events_email_admin_become_fan_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_admin_become_fan_body"><![CDATA[{email_header}
 <p>Your admin status was revoked from <a href="{EntryUrl}">{EntryTitle}</a> event.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_invitation"><![CDATA[Invitation to event]]></string>
     <string name="_bx_events_email_invitation_subject"><![CDATA[Invitation to "{EntryTitle}" event]]></string>
-    <string name="_bx_events_email_invitation_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_invitation_body"><![CDATA[{email_header}
 <p><a href="{InviterUrl}">{InviterDisplayName}</a> invited you to <a href="{EntryUrl}">{EntryTitle} event</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 </resources>

+ 2 - 2
modules/boonex/facebook_connect/install/langs/en.xml

@@ -18,8 +18,8 @@
 
 	<string name="_bx_facebook_conect_et_password_generated"><![CDATA[Facebook connect temporary password]]></string>
 	<string name="_bx_facebook_conect_et_password_generated_subject"><![CDATA[Temporary password]]></string>
-	<string name="_bx_facebook_conect_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_facebook_conect_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>
 <p>Change it after logging-in.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 </resources>

+ 3 - 4
modules/boonex/forum/install/langs/en.xml

@@ -254,10 +254,9 @@
     
     <string name="_bx_forum_email_new_reply"><![CDATA[New reply]]></string>
     <string name="_bx_forum_email_new_reply_subject"><![CDATA[New reply from {SenderDisplayName}]]></string>
-    <string name="_bx_forum_email_new_reply_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_forum_email_new_reply_body"><![CDATA[{email_header}
 <p>New reply from <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 3 - 4
modules/boonex/google_connect/install/langs/en.xml

@@ -20,9 +20,8 @@
 
 	<string name="_bx_googlecon_et_password_generated"><![CDATA[Google connect temporary password]]></string>
 	<string name="_bx_googlecon_et_password_generated_subject"><![CDATA[Temporary password]]></string>
-	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>
 <p>Change it after logging-in.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 15 - 22
modules/boonex/groups/install/langs/en.xml

@@ -229,50 +229,43 @@
 
     <string name="_bx_groups_email_join_request"><![CDATA[Group join request]]></string>
     <string name="_bx_groups_email_join_request_subject"><![CDATA[Request to join your group]]></string>
-    <string name="_bx_groups_email_join_request_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_request_body"><![CDATA[{email_header}
 <p>New request to join <a href="{EntryUrl}">{EntryTitle}</a> group from <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_join_reject"><![CDATA[Group join request was rejected]]></string>
     <string name="_bx_groups_email_join_reject_subject"><![CDATA[Request to join a group was rejected]]></string>
-    <string name="_bx_groups_email_join_reject_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_reject_body"><![CDATA[{email_header}
 <p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> group was rejected by group admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_join_confirm"><![CDATA[Group join request was confirmed]]></string>
     <string name="_bx_groups_email_join_confirm_subject"><![CDATA[Your request to join a group was confirmed]]></string>
-    <string name="_bx_groups_email_join_confirm_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_confirm_body"><![CDATA[{email_header}
 <p>Your request to join <a href="{EntryUrl}">{EntryTitle}</a> group was confirmed by the group admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_fan_remove"><![CDATA[Profile was removed from group fans]]></string>
     <string name="_bx_groups_email_fan_remove_subject"><![CDATA[Your profile was removed from the group]]></string>
-    <string name="_bx_groups_email_fan_remove_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_fan_remove_body"><![CDATA[{email_header}
 <p>Your profile was removed from <a href="{EntryUrl}">{EntryTitle}</a> group by the group admin.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_fan_become_admin"><![CDATA[Group admin status was granted]]></string>
     <string name="_bx_groups_email_fan_become_admin_subject"><![CDATA[You are a group admin now]]></string>
-    <string name="_bx_groups_email_fan_become_admin_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_fan_become_admin_body"><![CDATA[{email_header}
 <p>You are an admin of <a href="{EntryUrl}">{EntryTitle}</a> group now.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_admin_become_fan"><![CDATA[Group admin status was revoked]]></string>
     <string name="_bx_groups_email_admin_become_fan_subject"><![CDATA[Your group admin status was revoked]]></string>
-    <string name="_bx_groups_email_admin_become_fan_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_admin_become_fan_body"><![CDATA[{email_header}
 <p>Your admin status was revoked from <a href="{EntryUrl}">{EntryTitle}</a> group.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_invitation"><![CDATA[Invitation to group]]></string>
     <string name="_bx_groups_email_invitation_subject"><![CDATA[Invitation to "{EntryTitle}" group]]></string>
-    <string name="_bx_groups_email_invitation_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_invitation_body"><![CDATA[{email_header}
 <p><a href="{InviterUrl}">{InviterDisplayName}</a> invited you to <a href="{EntryUrl}">{EntryTitle} group</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 6 - 6
modules/boonex/invites/install/langs/en.xml

@@ -81,30 +81,30 @@
 	<!-- Email Templates -->
 	<string name="_bx_invites_et_invite_form_message"><![CDATA[Invite form message.]]></string>
 	<string name="_bx_invites_et_invite_form_message_subject"><![CDATA[Invitation from {site_name}.]]></string>
-	<string name="_bx_invites_et_invite_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_invite_form_message_body"><![CDATA[{email_header}
 <p><b>Dear Friend</b>,</p>
 <p>{profile_name} invites you to join to <a href="{site_url}">{site_name}</a> community site.<br />Message from {profile_name}:</p>
 <hr />
 <p>{text}</p>
 <hr />
 <p>Click the following link to join: <a href="{join_url}">{join_url}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_invites_et_invite_by_request_message"><![CDATA[Invite by request message.]]></string>
 	<string name="_bx_invites_et_invite_by_request_message_subject"><![CDATA[Invitation from {site_name}.]]></string>
-	<string name="_bx_invites_et_invite_by_request_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_invite_by_request_message_body"><![CDATA[{email_header}
 <p><b>Dear Friend</b>,</p>
 <p>You are welcome to join <a href="{site_url}">{site_name}</a> community site.</p>
 <p>Click the following link to join: <a href="{join_url}">{join_url}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_invites_et_request_form_message"><![CDATA[Request Invitation form message.]]></string>
 	<string name="_bx_invites_et_request_form_message_subject"><![CDATA[Request invitation.]]></string>
-	<string name="_bx_invites_et_request_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_request_form_message_body"><![CDATA[{email_header}
 <p><b>Dear Administrator</b>,</p>
 <p>{sender_name} (<a href="mailto:{sender_email}">{sender_email}</a>; IP {sender_ip}) requested an invitation to join <b>{site_name}</b> site.</p>
 <p><a href="{manage_url}">Click here</a> to manage requests.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 
 	<!-- Common Texts -->

+ 3 - 4
modules/boonex/linkedin_connect/install/langs/en.xml

@@ -21,9 +21,8 @@
 
 	<string name="_bx_linkedin_et_password_generated"><![CDATA[LinkedIn connect temporary password]]></string>
 	<string name="_bx_linkedin_et_password_generated_subject"><![CDATA[Temporary password]]></string>
-	<string name="_bx_linkedin_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_linkedin_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>
 <p>Change it after logging-in.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 2 - 2
modules/boonex/payment/install/langs/en.xml

@@ -128,11 +128,11 @@
 	<!-- EMAIL TEMPLATES -->
 	<string name="_bx_payment_et_txt_name_paid_need_join"><![CDATA[Paid and need to join.]]></string>
 	<string name="_bx_payment_et_txt_subject_paid_need_join"><![CDATA[Payment was accepted.]]></string>
-	<string name="_bx_payment_et_txt_body_paid_need_join"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_payment_et_txt_body_paid_need_join"><![CDATA[{email_header}
 <p><b>Dear {RealName}</b>,</p>
 <p>Your payment was accepted. If you did not fill in the join form yet, then you may do it using the following link.</p>
 <p><a href="{JoinLink}">Join Now</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<!-- MESSAGES, WARNINGS and ERRORS -->
 	<string name="_bx_payment_msg_no_results"><![CDATA[Empty]]></string>

+ 3 - 8
modules/boonex/russian/data/langs/bx_antispam/ru.xml

@@ -129,9 +129,7 @@ URI DNSBL - это DNSBL, которые перечисляют доменные
 
     <string name="_bx_antispam_spam_report_name"><![CDATA[Сообщение отчёта о спаме]]></string>
     <string name="_bx_antispam_spam_report_subject"><![CDATA[Автоматический отчёт о спаме]]></string>
-    <string name="_bx_antispam_spam_report_body"><![CDATA[
-<bx_include_auto:_email_header.html />
-
+    <string name="_bx_antispam_spam_report_body"><![CDATA[{email_header}
 <b>Профиль:</b> <a href="{SpammerUrl}">{SpammerNickName}</a><br />
 
 <b>Страница:</b> {Page}<br /><br />
@@ -150,8 +148,5 @@ URI DNSBL - это DNSBL, которые перечисляют доменные
 <pre>
 {SpamContent}
 </pre>
-
-<bx_include_auto:_email_footer.html />]]></string>
-
-</resources>
-
+{email_footer}]]></string>
+</resources>

+ 3 - 3
modules/boonex/russian/data/langs/bx_contact/ru.xml

@@ -36,11 +36,11 @@
 
 	<string name="_bx_contact_et_contact_form_message"><![CDATA[Сообщение формы для контактов.]]></string>
 	<string name="_bx_contact_et_contact_form_message_subject"><![CDATA[Сообщение формы для контактов.]]></string>
-	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[{email_header}
 <p><b>Дорогой Administrator</b>,</p>
 <p>Вам написал пользователь <u>{SenderName}</u> с имейл-адресом <u>{SenderEmail}</u></p>
 <hr />
 <p><b>{MessageSubject}</b></p>
 <p>{MessageBody}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 5 - 8
modules/boonex/russian/data/langs/bx_convos/ru.xml

@@ -118,20 +118,17 @@
 
     <string name="_bx_cnv_email_new_message"><![CDATA[Новое сообщение]]></string>
     <string name="_bx_cnv_email_new_message_subject"><![CDATA[Новое сообщение от {SenderDisplayName}]]></string>
-    <string name="_bx_cnv_email_new_message_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_cnv_email_new_message_body"><![CDATA[{email_header}
 <p>Новое сообщение от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_cnv_email_new_reply"><![CDATA[Новый ответ]]></string>
     <string name="_bx_cnv_email_new_reply_subject"><![CDATA[Новый ответ от {SenderDisplayName}]]></string>
-    <string name="_bx_cnv_email_new_reply_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_cnv_email_new_reply_body"><![CDATA[{email_header}
 <p>Новый ответ от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-
-</resources>
+{email_footer}]]></string>
+</resources>

+ 14 - 21
modules/boonex/russian/data/langs/bx_events/ru.xml

@@ -297,50 +297,43 @@
 
     <string name="_bx_events_email_join_request"><![CDATA[Запрос на присоединение к событию]]></string>
     <string name="_bx_events_email_join_request_subject"><![CDATA[Запрос на присоединение к событию]]></string>
-    <string name="_bx_events_email_join_request_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_request_body"><![CDATA[{email_header}
 <p>Получен запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> от <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_join_reject"><![CDATA[Отклонение запроса на присоединение к событию]]></string>
     <string name="_bx_events_email_join_reject_subject"><![CDATA[Ваш запрос на присоединение к событию был отклонен]]></string>
-    <string name="_bx_events_email_join_reject_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_reject_body"><![CDATA[{email_header}
 <p>Ваш запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> был отклонен администратором события.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_join_confirm"><![CDATA[Одобрение запроса на присоединение к событию]]></string>
     <string name="_bx_events_email_join_confirm_subject"><![CDATA[Ваш запрос на присоединение к событию был одобрен]]></string>
-    <string name="_bx_events_email_join_confirm_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_join_confirm_body"><![CDATA[{email_header}
 <p>Ваш запрос на присоединение к событию <a href="{EntryUrl}">{EntryTitle}</a> был одобрен.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_fan_remove"><![CDATA[Удаление из события]]></string>
     <string name="_bx_events_email_fan_remove_subject"><![CDATA[Вы были удалены из события]]></string>
-    <string name="_bx_events_email_fan_remove_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_fan_remove_body"><![CDATA[{email_header}
 <p>Ваш профиль был удален из события <a href="{EntryUrl}">{EntryTitle}</a> администратором события.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_fan_become_admin"><![CDATA[Получение статуса администратора события]]></string>
     <string name="_bx_events_email_fan_become_admin_subject"><![CDATA[Вы стали администратором события]]></string>
-    <string name="_bx_events_email_fan_become_admin_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_fan_become_admin_body"><![CDATA[{email_header}
 <p>Вы получили статус администратора события <a href="{EntryUrl}">{EntryTitle}</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_admin_become_fan"><![CDATA[Лишение статуса администратора события]]></string>
     <string name="_bx_events_email_admin_become_fan_subject"><![CDATA[Вы были лишены статуса администратора события]]></string>
-    <string name="_bx_events_email_admin_become_fan_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_admin_become_fan_body"><![CDATA[{email_header}
 <p>Вы были лишены статуса администратора события <a href="{EntryUrl}">{EntryTitle}</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_events_email_invitation"><![CDATA[Приглашение на событие]]></string>
     <string name="_bx_events_email_invitation_subject"><![CDATA[Приглашение на событие "{EntryTitle}"]]></string>
-    <string name="_bx_events_email_invitation_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_events_email_invitation_body"><![CDATA[{email_header}
 <p><a href="{InviterUrl}">{InviterDisplayName}</a> пригласил Вас на событие <a href="{EntryUrl}">{EntryTitle}</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 </resources>

+ 3 - 3
modules/boonex/russian/data/langs/bx_facebook/ru.xml

@@ -18,8 +18,8 @@
 
 	<string name="_bx_facebook_conect_et_password_generated"><![CDATA[Facebook-соединение: временный пароль]]></string>
 	<string name="_bx_facebook_conect_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
-	<string name="_bx_facebook_conect_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_facebook_conect_et_password_generated_body"><![CDATA[{email_header}
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 3 - 4
modules/boonex/russian/data/langs/bx_forum/ru.xml

@@ -249,10 +249,9 @@
 
     <string name="_bx_forum_email_new_reply"><![CDATA[Новый ответ]]></string>
     <string name="_bx_forum_email_new_reply_subject"><![CDATA[Новый ответ от {SenderDisplayName}]]></string>
-    <string name="_bx_forum_email_new_reply_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_forum_email_new_reply_body"><![CDATA[{email_header}
 <p>Новый ответ от <a href="{SenderUrl}">{SenderDisplayName}</a>:</p>
 <hr />
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 3 - 4
modules/boonex/russian/data/langs/bx_googlecon/ru.xml

@@ -20,9 +20,8 @@
 
 	<string name="_bx_googlecon_et_password_generated"><![CDATA[Google соединение: временный пароль]]></string>
 	<string name="_bx_googlecon_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
-	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_googlecon_et_password_generated_body"><![CDATA[{email_header}
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 14 - 21
modules/boonex/russian/data/langs/bx_groups/ru.xml

@@ -228,50 +228,43 @@
 
     <string name="_bx_groups_email_join_request"><![CDATA[Запрос на присоединение к группе]]></string>
     <string name="_bx_groups_email_join_request_subject"><![CDATA[Запрос на присоединение к группе]]></string>
-    <string name="_bx_groups_email_join_request_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_request_body"><![CDATA[{email_header}
 <p>Получен запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> от <a href="{NewMemberUrl}">{NewMemberDisplayName}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_join_reject"><![CDATA[Отклонение запроса на присоединение к группе]]></string>
     <string name="_bx_groups_email_join_reject_subject"><![CDATA[Ваш запрос на присоединение к группе был отклонен]]></string>
-    <string name="_bx_groups_email_join_reject_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_reject_body"><![CDATA[{email_header}
 <p>Ваш запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> был отклонен администратором группы.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_join_confirm"><![CDATA[Одобрение запроса на присоединение к группе]]></string>
     <string name="_bx_groups_email_join_confirm_subject"><![CDATA[Ваш запрос на присоединение к группе был одобрен]]></string>
-    <string name="_bx_groups_email_join_confirm_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_join_confirm_body"><![CDATA[{email_header}
 <p>Ваш запрос на присоединение к группе <a href="{EntryUrl}">{EntryTitle}</a> был одобрен.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_fan_remove"><![CDATA[Удаление из группы]]></string>
     <string name="_bx_groups_email_fan_remove_subject"><![CDATA[Вы были удалены из группы]]></string>
-    <string name="_bx_groups_email_fan_remove_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_fan_remove_body"><![CDATA[{email_header}
 <p>Ваш профиль был удален из группы <a href="{EntryUrl}">{EntryTitle}</a> администратором группы.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_fan_become_admin"><![CDATA[Получение статуса администратора группы]]></string>
     <string name="_bx_groups_email_fan_become_admin_subject"><![CDATA[Вы стали администратором группы]]></string>
-    <string name="_bx_groups_email_fan_become_admin_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_fan_become_admin_body"><![CDATA[{email_header}
 <p>Вы получили статус администратора группы <a href="{EntryUrl}">{EntryTitle}</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_admin_become_fan"><![CDATA[Лишение статуса администратора группы]]></string>
     <string name="_bx_groups_email_admin_become_fan_subject"><![CDATA[Вы были лишены статуса администратора группы]]></string>
-    <string name="_bx_groups_email_admin_become_fan_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_admin_become_fan_body"><![CDATA[{email_header}
 <p>Вы были лишены статуса администратора группы <a href="{EntryUrl}">{EntryTitle}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
     <string name="_bx_groups_email_invitation"><![CDATA[Приглашение в группу]]></string>
     <string name="_bx_groups_email_invitation_subject"><![CDATA[Приглашение в группу "{EntryTitle}"]]></string>
-    <string name="_bx_groups_email_invitation_body"><![CDATA[
-<bx_include_auto:_email_header.html />
+    <string name="_bx_groups_email_invitation_body"><![CDATA[{email_header}
 <p><a href="{InviterUrl}">{InviterDisplayName}</a> пригласил Вас в группу <a href="{EntryUrl}">{EntryTitle}</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 </resources>

+ 6 - 6
modules/boonex/russian/data/langs/bx_invites/ru.xml

@@ -81,30 +81,30 @@
 	<!-- Email Templates -->
 	<string name="_bx_invites_et_invite_form_message"><![CDATA[Пригласительная форма - сообщение.]]></string>
 	<string name="_bx_invites_et_invite_form_message_subject"><![CDATA[Приглашение от {site_name}.]]></string>
-	<string name="_bx_invites_et_invite_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_invite_form_message_body"><![CDATA[{email_header}
 <p><b>Дорогой друг</b>,</p>
 <p>{profile_name} приглашает Вас зарегистрироваться в социальной сети <a href="{site_url}">{site_name}</a>.<br />Сообщение от {profile_name}:</p>
 <hr />
 <p>{text}</p>
 <hr />
 <p>Нажмите ссылку ниже, чтобы зарегистрироваться: <a href="{join_url}">{join_url}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_invites_et_invite_by_request_message"><![CDATA[Приглашение по запросу - сообщение.]]></string>
 	<string name="_bx_invites_et_invite_by_request_message_subject"><![CDATA[Приглашение от {site_name}.]]></string>
-	<string name="_bx_invites_et_invite_by_request_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_invite_by_request_message_body"><![CDATA[{email_header}
 <p><b>Дорогой друг</b>,</p>
 <p>Добро пожаловать на регистрацию в социальной сети <a href="{site_url}">{site_name}</a>.</p>
 <p>Нажмите ссылку ниже, чтобы зарегистрироваться: <a href="{join_url}">{join_url}</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_invites_et_request_form_message"><![CDATA[Форма запроса приглашения - сообщение.]]></string>
 	<string name="_bx_invites_et_request_form_message_subject"><![CDATA[Запросить приглашение.]]></string>
-	<string name="_bx_invites_et_request_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_invites_et_request_form_message_body"><![CDATA[{email_header}
 <p><b>Дорогой администратор</b>,</p>
 <p>{sender_name} (<a href="mailto:{sender_email}">{sender_email}</a>; IP {sender_ip}) запросил приглашение для регистрации на сайте <b>{site_name}</b>.</p>
 <p><a href="{manage_url}">Нажмите сюда</a> для управление запросами.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 
 	<!-- Common Texts -->

+ 3 - 4
modules/boonex/russian/data/langs/bx_linkedin/ru.xml

@@ -22,9 +22,8 @@
 
 	<string name="_bx_linkedin_et_password_generated"><![CDATA[LinkedIn соединение: временный пароль]]></string>
 	<string name="_bx_linkedin_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
-	<string name="_bx_linkedin_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_linkedin_et_password_generated_body"><![CDATA[{email_header}
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 2 - 2
modules/boonex/russian/data/langs/bx_payment/ru.xml

@@ -128,11 +128,11 @@
 	<!-- EMAIL TEMPLATES -->
 	<string name="_bx_payment_et_txt_name_paid_need_join"><![CDATA[Заплатил - присоединяйся.]]></string>
 	<string name="_bx_payment_et_txt_subject_paid_need_join"><![CDATA[Оплата была принята.]]></string>
-	<string name="_bx_payment_et_txt_body_paid_need_join"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_payment_et_txt_body_paid_need_join"><![CDATA[{email_header}
 <p><b>Дорогой {RealName}</b>,</p>
 <p>Ваша оплата была принята. Если вы ещё не заполняли регистрационную форму, то Вы можете сделать это используя следующую ссылку.</p>
 <p><a href="{JoinLink}">Присоединяйтесь</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<!-- MESSAGES, WARNINGS and ERRORS -->
 	<string name="_bx_payment_msg_no_results"><![CDATA[Пусто]]></string>

+ 8 - 8
modules/boonex/russian/data/langs/bx_sites/ru.xml

@@ -149,7 +149,7 @@
 
 	<string name="_bx_sites_et_site_created"><![CDATA[Сайт был создан.]]></string>
 	<string name="_bx_sites_et_site_created_subject"><![CDATA[Сайт был создан.]]></string>
-	<string name="_bx_sites_et_site_created_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_created_body"><![CDATA[{email_header}
 <p><b>Дорогой {RealName}</b>,</p>
 <p>сайт активирован.</p>
 <p>Ваш домен: {Domain}</p>
@@ -157,10 +157,10 @@
 <p>Статус подписки: {Status}</p>
 <p>Дата следующей оплаты: {NextPaymentDate}</p>
 <p>Теперь можно заполнить детализированную форму сайта <a href="{DetailsFormUrl}">здесь</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_site_created_and_paid"><![CDATA[Сайт был создан и оплачен.]]></string>
 	<string name="_bx_sites_et_site_created_and_paid_subject"><![CDATA[Сайт был создан и оплачен.]]></string>
-	<string name="_bx_sites_et_site_created_and_paid_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_created_and_paid_body"><![CDATA[{email_header}
 <p><b>Дорогой {RealName}</b>,</p>
 <p>Оплата в количестве ({Amount}) была от Вас получена, и сайт был активирован.</p>
 <p>Ваш домен: {Domain}</p>
@@ -168,19 +168,19 @@
 <p>Статус подписки: {Status}</p>
 <p>Дата следующей оплаты: {NextPaymentDate}</p>
 <p>Теперь можно заполнить детализированную форму сайта <a href="{DetailsFormUrl}">здесь</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_payment_received"><![CDATA[Оплата получена.]]></string>
 	<string name="_bx_sites_et_payment_received_subject"><![CDATA[Оплата получена.]]></string>
-	<string name="_bx_sites_et_payment_received_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_payment_received_body"><![CDATA[{email_header}
 <p><b>Дорогой {RealName}</b>,</p>
 <p>Оплата в количестве ({Amount}) была от Вас получена. Ваш сайт был продлён до {NextPaymentDate}.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_site_canceled"><![CDATA[Сайт был отменён.]]></string>
 	<string name="_bx_sites_et_site_canceled_subject"><![CDATA[Сайт was отменён.]]></string>
-	<string name="_bx_sites_et_site_canceled_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_canceled_body"><![CDATA[{email_header}
 <p><b>Дорогой {RealName}</b>,</p>
 <p>Подписка для домена {Domain} была отменена.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_sites_paypal_product_description"><![CDATA[{0} периодический платёж {1} {2} с одним тестовым периодом {3} {4}]]></string>
 	<string name="_bx_sites_paypal_product_description_free_trial"><![CDATA[{0} периодический платёж {1} {2} с бесплатным тестовым периодом]]></string>

+ 3 - 3
modules/boonex/russian/data/langs/bx_tricon/ru.xml

@@ -21,8 +21,8 @@
 
 	<string name="_bx_tricon_et_password_generated"><![CDATA[UNA-соединение: временный пароль]]></string>
 	<string name="_bx_tricon_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
-	<string name="_bx_tricon_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_tricon_et_password_generated_body"><![CDATA[{email_header}
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-</resources>
+{email_footer}]]></string>
+</resources>

+ 3 - 4
modules/boonex/russian/data/langs/bx_twitter/ru.xml

@@ -30,9 +30,8 @@
 
 	<string name="_bx_twitter_et_password_generated"><![CDATA[Twitter соединение: временный пароль]]></string>
 	<string name="_bx_twitter_et_password_generated_subject"><![CDATA[Временный пароль]]></string>
-	<string name="_bx_twitter_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_twitter_et_password_generated_body"><![CDATA[{email_header}
 <p>Временный пароль - <b>{password}</b></p>
 <p>Его нужно изменить, после первого захода на сайт.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 46 - 39
modules/boonex/russian/data/langs/system/ru.xml

@@ -865,6 +865,7 @@
 	<string name="_adm_lmi_cpt_displays"><![CDATA[Дисплеи]]></string>
 	<string name="_adm_lmi_cpt_downloaded"><![CDATA[Скачано]]></string>
 	<string name="_adm_lmi_cpt_etemplates"><![CDATA[Имейл-шаблоны]]></string>
+	<string name="_adm_lmi_cpt_etemplates_hf"><![CDATA[Заголовок/основание имейлов]]></string>
 	<string name="_adm_lmi_cpt_featured"><![CDATA[Избранные]]></string>
 	<string name="_adm_lmi_cpt_fields"><![CDATA[Поля]]></string>
 	<string name="_adm_lmi_cpt_files"><![CDATA[Файлы]]></string>
@@ -1069,6 +1070,11 @@
 	<string name="_adm_pgt_txt_nkp_key_name"><![CDATA[Имя Ключа]]></string>
 	<string name="_adm_pgt_txt_nkp_module"><![CDATA[Модуль]]></string>
 	<string name="_adm_pgt_txt_text"><![CDATA[Текст]]></string>
+    <string name="_adm_pgt_txt_et_hf_inf"><![CDATA[Внимание. Неправильное применение HTML может повредить дизайн имейл сообщения. Также убедитесь в том, что маркер {unsubscribe} присутствует хотя бы в одном из темплейтов (заголовок и/или основание).]]></string>
+    <string name="_adm_pgt_btn_et_hf_submit"><![CDATA[Выполнить]]></string>
+    <string name="_adm_pgt_scs_et_hf_save"><![CDATA[Изменения сохранены.]]></string>
+    <string name="_adm_pgt_err_et_hf_save"><![CDATA[Невозможно сохранить изменения.]]></string>
+    <string name="_adm_pgt_err_et_hf_save_unsubscribe"><![CDATA[Невозможно сохранить изменения, тк маркер {unsubscribe} был удален из темплейтов заголовка и основания одновременно.]]></string>
 	<string name="_adm_prm_btn_actions_cancel"><![CDATA[Отменить]]></string>
 	<string name="_adm_prm_btn_actions_options"><![CDATA[Редактировать опции]]></string>
 	<string name="_adm_prm_btn_actions_save"><![CDATA[Сохранить]]></string>
@@ -1186,7 +1192,8 @@
 	<string name="_adm_stg_cpt_option_permalinks_pages"><![CDATA[Задействовать дружественные ссылки для Страниц]]></string>
 	<string name="_adm_stg_cpt_option_site_email"><![CDATA[Имейл для получения критических уведомлений от сайта]]></string>
 	<string name="_adm_stg_cpt_option_site_email_notify"><![CDATA[Имейл, с которого будут посылаться сообщения от сайта]]></string>
-	<string name="_adm_stg_cpt_option_site_email_html_template"><![CDATA[Использовать HTML шаблон в имейл сообщениях сайта]]></string>
+	<string name="_adm_stg_cpt_option_site_email_html_template_header"><![CDATA[Заголовок имейл HTML шаблона]]></string>
+    <string name="_adm_stg_cpt_option_site_email_html_template_footer"><![CDATA[Основание имейл HTML шаблона]]></string>
 	<string name="_adm_stg_cpt_option_site_title"><![CDATA[Название сайта]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_home"><![CDATA[Экскурсия по главной странице сайта]]></string>
 	<string name="_adm_stg_cpt_option_site_tour_studio"><![CDATA[Экскурсия по главной странице Студии]]></string>
@@ -1590,98 +1597,98 @@
 	<string name="_sys_designbox_4"><![CDATA[Содержимое + заголовок]]></string>
 	<string name="_sys_done"><![CDATA[Готово]]></string>
 	<string name="_sys_et_txt_about_us"><![CDATA[О нас]]></string>
-	<string name="_sys_et_txt_body_admin_email"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_sys_et_txt_body_admin_email"><![CDATA[{email_header}
 <p>Привет,</p>
 <p>Администрация сайта <a href="{site_url}">{site_name}</a> рада проинформировать Вас о том, что</p>
 <p>=========================</p>
 <p style="color:#3B5C8E">{MessageText}</p>
 <p>=========================</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_comment_replied"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_comment_replied"><![CDATA[{email_header}
 <p>Привет,</p>
 <p>На Ваш комментарий ответили. Ответ:</p>
 <p>{reply_text}</p>
 <p>Пожалуйста, перейдите на страницу комментария для дополнительной информации: <a href="{comment_url}">Мой Комментарий</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_system_reported"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_system_reported"><![CDATA[{email_header}
 <p>Привет,</p>
 <p>Была получена новая жалоба с типом <b>{report_type}</b>. Сообщение:</p>
 <p>{report_text}</p>
 <p>Для получения дополнительной информации, пожалуйста, перейдите на <a href="{report_url}">страницу контента</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_confirmation"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_confirmation"><![CDATA[{email_header}
 <p>Привет, {name}.</p>
 <p>Пожалуйста, подтвердите ваш имейл, перейдя по ссылке:</p>
 <p><a href="{conf_link}">Подтвердить имейл</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_delayed_module_uninstall"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_delayed_module_uninstall"><![CDATA[{email_header}
 <p>Модуль: <b>{Module}</b></p>
 <p>Результат демонтажа: {Result}</p>
 <p>{Message}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_forgot"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_forgot"><![CDATA[{email_header}
 <p>Привет!</p>
 <p>Пожалуйста, перейдите по ссылке, чтобы сбросить свой пароль:</p>
 <p><a href="{forgot_password_url}">{forgot_password_url}</a></p>
 <p>Спасибо.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_mem_changed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_mem_changed"><![CDATA[{email_header}
 <p>Привет,</p>
 <p>Уровень Вашего членства изменён на: <b>{membership_level}</b></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_mem_expiration"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_mem_expiration"><![CDATA[{email_header}
 <p>Привет,</p>
 <p>Мы уведомляем Вас о том, что Ваше членство {membership_name} на сайте {site_name} истекает через {expire_days} дней (-1 означает: уже истекло).</p>
 <p>Чтобы обновить своё членство, зайдите в свой аккаунт {site_name} по ссылке <a href="{site_url}member.php">{site_url}member.php</a> и перейдите в <a href="{site_url}modules/?r=membership/index/">Моё Членство</a></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_password_reset"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_password_reset"><![CDATA[{email_header}
 <p>Привет!</p>
 <p>Ваш новый пароль:</p>
 <p><b>{password}</b></p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_active"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_active"><![CDATA[{email_header}
 <p>Привет, {profile_name}.</p>
 <p>Добро пожаловать на сайт {site_name}! Вот копия данных вашего аккаунта:</p>
 <p>Имя: {account_name}</p>
 <p>Имейл: {account_email}</p>
 <p>URL сайта: <a href="{site_url}">{site_url}</a></p>
 <p>Спасибо!</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_pending"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_pending"><![CDATA[{email_header}
 <p>Привет {profile_name},</p>
 <p>Ваш профиль ожидает одобрения. Как только он будет одобрен, Вы получите уведомление по эл. почте.</p>
 <p>Спасибо!</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_profile_change_status_suspended"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_profile_change_status_suspended"><![CDATA[{email_header}
 <p>Привет {profile_name},</p>
 <p>Ваш профиль был заблокирован.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_account"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_account"><![CDATA[{email_header}
 <p>{account_output}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_pruning"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_pruning"><![CDATA[{email_header}
 <p>{pruning_output}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_failed"><![CDATA[{email_header}
 <p>Обновление не удалось в связи со следующей ошибкой:</p>
 <p>{error_msg}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_modules_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_modules_failed"><![CDATA[{email_header}
 <p>В процессе обновления модулей произошли следующие ошибки:</p>
 <p>{conclusion}</p>
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_success"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_success"><![CDATA[{email_header}
 <p>Сайт был удачно обновлён до {new_version}.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_upgrade_modules_success"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_upgrade_modules_success"><![CDATA[{email_header}
 <p>Следующие модули были удачно обновлены.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
-	<string name="_sys_et_txt_body_bg_operation_failed"><![CDATA[<bx_include_auto:_email_header.html />
+{email_footer}]]></string>
+	<string name="_sys_et_txt_body_bg_operation_failed"><![CDATA[{email_header}
 <p>Фоновый процесс завершился ошибкой со следующим сообщением.</p>
 {conclusion}
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_sys_et_txt_body_modules_upgrade_success"><![CDATA[<b>{0}</b> модуль: up to {1} версия.<br />]]></string>
 	<string name="_sys_et_txt_body_modules_upgrade_failed"><![CDATA[<b>{0}</b> молуль: {1}<br />]]></string>
 	<string name="_sys_et_txt_name_system_admin_email"><![CDATA[Посылка сообщения из Панели Администратора]]></string>

+ 8 - 8
modules/boonex/sites/install/langs/en.xml

@@ -149,7 +149,7 @@
 
 	<string name="_bx_sites_et_site_created"><![CDATA[Site was created.]]></string>
 	<string name="_bx_sites_et_site_created_subject"><![CDATA[Site was created.]]></string>
-	<string name="_bx_sites_et_site_created_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_created_body"><![CDATA[{email_header}
 <p><b>Dear {RealName}</b>,</p>
 <p>Site was activated.</p>
 <p>Your domain: {Domain}</p>
@@ -157,10 +157,10 @@
 <p>Subscription status: {Status}</p>
 <p>Next payment date: {NextPaymentDate}</p>
 <p>Now you may fill in a site details form <a href="{DetailsFormUrl}">here</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_site_created_and_paid"><![CDATA[Site was created and paid.]]></string>
 	<string name="_bx_sites_et_site_created_and_paid_subject"><![CDATA[Site was created and paid.]]></string>
-	<string name="_bx_sites_et_site_created_and_paid_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_created_and_paid_body"><![CDATA[{email_header}
 <p><b>Dear {RealName}</b>,</p>
 <p>A payment ({Amount}) was received from you and site was activated.</p>
 <p>Your domain: {Domain}</p>
@@ -168,19 +168,19 @@
 <p>Subscription status: {Status}</p>
 <p>Next payment date: {NextPaymentDate}</p>
 <p>Now you may fill in a site details form <a href="{DetailsFormUrl}">here</a>.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_payment_received"><![CDATA[Payment received.]]></string>
 	<string name="_bx_sites_et_payment_received_subject"><![CDATA[Payment Received.]]></string>
-	<string name="_bx_sites_et_payment_received_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_payment_received_body"><![CDATA[{email_header}
 <p><b>Dear {RealName}</b>,</p>
 <p>We received a payment ({Amount}) from you. Your site was prolonged up to {NextPaymentDate}.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 	<string name="_bx_sites_et_site_canceled"><![CDATA[Site was canceled.]]></string>
 	<string name="_bx_sites_et_site_canceled_subject"><![CDATA[Site was canceled.]]></string>
-	<string name="_bx_sites_et_site_canceled_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_sites_et_site_canceled_body"><![CDATA[{email_header}
 <p><b>Dear {RealName}</b>,</p>
 <p>Subscription for {Domain} site was canceled.</p>
-<bx_include_auto:_email_footer.html />]]></string>
+{email_footer}]]></string>
 
 	<string name="_bx_sites_paypal_product_description"><![CDATA[{0} recurring payment {1} {2} with single trial period {3} {4}]]></string>
 	<string name="_bx_sites_paypal_product_description_free_trial"><![CDATA[{0} recurring payment {1} {2} with FREE trial period]]></string>

+ 3 - 4
modules/boonex/trident_connect/install/langs/en.xml

@@ -21,9 +21,8 @@ Then enter generated on the master site the Key & Server pair in this module set
 
 	<string name="_bx_tricon_et_password_generated"><![CDATA[UNA connect temporary password]]></string>
 	<string name="_bx_tricon_et_password_generated_subject"><![CDATA[Temporary password]]></string>
-	<string name="_bx_tricon_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_tricon_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>
 <p>Change it after logging-in.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 3 - 4
modules/boonex/twitter_connect/install/langs/en.xml

@@ -30,9 +30,8 @@
 
 	<string name="_bx_twitter_et_password_generated"><![CDATA[Twitter connect temporary password]]></string>
 	<string name="_bx_twitter_et_password_generated_subject"><![CDATA[Temporary password]]></string>
-	<string name="_bx_twitter_et_password_generated_body"><![CDATA[<bx_include_auto:_email_header.html />
+	<string name="_bx_twitter_et_password_generated_body"><![CDATA[{email_header}
 <p>Temporary password - <b>{password}</b></p>
 <p>Change it after logging-in.</p>
-<bx_include_auto:_email_footer.html />]]></string>
-    
-</resources>
+{email_footer}]]></string>
+</resources>

+ 18 - 0
studio/classes/BxDolStudioPolyglot.php

@@ -10,6 +10,7 @@
 define('BX_DOL_STUDIO_PGT_TYPE_SETTINGS', 'settings');
 define('BX_DOL_STUDIO_PGT_TYPE_KEYS', 'keys');
 define('BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES', 'etemplates');
+define('BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES_HF', 'etemplates_hf');
 
 define('BX_DOL_STUDIO_PGT_TYPE_DEFAULT', BX_DOL_STUDIO_PGT_TYPE_SETTINGS);
 
@@ -82,6 +83,23 @@ class BxDolStudioPolyglot extends BxTemplStudioPage
 		echo json_encode($aResult);
 		exit;
     }
+
+	public function submitEtemplatesHf(&$oForm)
+    {
+        $sUnsubscribe = "{unsubscribe}";
+        $sHeader = $oForm->getCleanValue('et_hf_header');
+        $sFooter = $oForm->getCleanValue('et_hf_footer');
+        if(strpos($sHeader, $sUnsubscribe) === false && strpos($sFooter, $sUnsubscribe) === false)
+            return $this->getJsResult('_adm_pgt_err_et_hf_save_unsubscribe'); 
+
+        $bResult = false;
+        $bResult |= $this->oDb->setParam('site_email_html_template_header', $sHeader);
+        $bResult |= $this->oDb->setParam('site_email_html_template_footer', $sFooter);
+        if(!$bResult)
+            return $this->getJsResult('_adm_pgt_err_et_hf_save');
+
+        return $this->getJsResult('_adm_pgt_scs_et_hf_save', true, true, BX_DOL_URL_STUDIO . 'polyglot.php?page=' . BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES_HF); 
+    }
 }
 
 /** @} */

+ 19 - 0
studio/js/polyglot.js

@@ -10,9 +10,28 @@ function BxDolStudioPolyglot(oOptions) {
     this.sObjName = oOptions.sObjName == undefined ? 'oBxDolStudioPolyglot' : oOptions.sObjName;
     this.sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
     this.iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this.sCodeMirror = oOptions.sCodeMirror == undefined ? '' : oOptions.sCodeMirror;
     this.sPage = oOptions.sPage == undefined ? 'general' : oOptions.sPage;
+
+    var $this = this;
+    $(document).ready (function () {
+    	if($this.sCodeMirror != '')
+    		$this.initCodeMirror($this.sCodeMirror);
+    });
 }
 
+BxDolStudioPolyglot.prototype.initCodeMirror = function(sSelector) {
+	var oSelector = $(sSelector);
+	for(var i = 0; i < oSelector.length; i++) {
+	    var e = CodeMirror.fromTextArea(oSelector.get(i), {
+	        lineNumbers: true,
+	        mode: "htmlmixed",
+	        htmlMode: true,
+	        matchBrackets: true
+	    });
+	}
+};
+
 /**
  * Is needed if AJAX is used to change (reload) pages. 
  */

+ 3 - 0
studio/template/pgt_etemplates_hf.html

@@ -0,0 +1,3 @@
+__warning__
+<iframe name="__iframe_id__" class="bx-std-hidden"></iframe>
+__form__

+ 2 - 1
studio/template/polyglot.html

@@ -1 +1,2 @@
-__content__
+__content__
+__js_content__

+ 93 - 4
studio/template/scripts/BxBaseStudioPolyglot.php

@@ -23,7 +23,8 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
 		$this->aMenuItems = array(
 	        BX_DOL_STUDIO_PGT_TYPE_SETTINGS => array('icon' => 'cogs'),
 	        BX_DOL_STUDIO_PGT_TYPE_KEYS => array('icon' => 'key'),
-	        BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES => array('icon' => 'envelope-o')
+	        BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES => array('icon' => 'envelope-o'),
+	        BX_DOL_STUDIO_PGT_TYPE_ETEMPLATES_HF => array('icon' => 'sticky-note-o')
 	    );
 
 		$this->aGridObjects = array(
@@ -74,7 +75,7 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
 
     function getPageCode($bHidden = false)
     {
-        $sMethod = 'get' . ucfirst($this->sPage);
+        $sMethod = 'get' . bx_gen_method_name($this->sPage);
         if(!method_exists($this, $sMethod))
             return '';
 
@@ -86,7 +87,8 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         $oPage = new BxTemplStudioSettings(BX_DOL_STUDIO_STG_TYPE_DEFAULT, BX_DOL_STUDIO_STG_CATEGORY_LANGUAGES);
 
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', array(
-            'content' => $oPage->getPageCode()
+            'content' => $oPage->getPageCode(),
+        	'js_content' => ''
         ));
     }
 
@@ -100,6 +102,92 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         return $this->getGrid($this->aGridObjects['etemplates']);
     }
 
+    protected function getEtemplatesHf()
+    {
+        $oTemplate = BxDolStudioTemplate::getInstance();
+
+        $sFormId = 'adm-dsg-et-hf-form';
+        $sIFrameId = 'adm-dsg-et-hf-iframe';
+
+		$aForm = array(
+			'form_attrs' => array(
+				'id' => $sFormId,
+				'name' => $sFormId,
+				'action' => BX_DOL_URL_STUDIO . 'polyglot.php',
+				'method' => 'post',
+				'enctype' => 'multipart/form-data',
+				'target' => $sIFrameId
+			),
+			'params' => array(
+				'db' => array(
+					'table' => '',
+					'key' => '',
+					'uri' => '',
+					'uri_title' => '',
+					'submit_name' => 'save'
+				),
+			),
+			'inputs' => array(
+				'page' => array(
+					'type' => 'hidden',
+					'name' => 'page',
+					'value' => $this->sPage
+				),
+				'et_hf_header' => array(
+                    'type' => 'textarea',
+                    'code' => true,
+                    'name' => 'et_hf_header',
+					'caption' => _t('_adm_stg_cpt_option_site_email_html_template_header'),
+					'info' => _t('_adm_pgt_txt_et_hf_inf'),
+					'value' => getParam('site_email_html_template_header'),
+					'db' => array (
+                        'pass' => 'Xss',
+                    ),
+				),
+				'et_hf_footer' => array(
+                    'type' => 'textarea',
+                    'code' => true,
+                    'name' => 'et_hf_footer',
+					'caption' => _t('_adm_stg_cpt_option_site_email_html_template_footer'),
+					'info' => _t('_adm_pgt_txt_et_hf_inf'),
+					'value' => getParam('site_email_html_template_footer'),
+					'db' => array (
+                        'pass' => 'Xss',
+                    ),
+				),
+				'save' => array(
+					'type' => 'submit',
+					'name' => 'save',
+					'value' => _t('_adm_pgt_btn_et_hf_submit'),
+				)
+			)
+		);
+
+		$oForm = new BxTemplStudioFormView($aForm, $oTemplate);
+		$oForm->initChecker();
+
+		if($oForm->isSubmittedAndValid()) {
+			echo $this->submitEtemplatesHf($oForm);
+			exit;
+		}
+
+        $oTemplate->addJs(array('codemirror/codemirror.min.js'));
+        $oTemplate->addCss(BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'codemirror/|codemirror.css');
+
+		return $oTemplate->parseHtmlByName('polyglot.html', array(
+			'content' => $this->getBlockCode(array(
+				'items' => $oTemplate->parseHtmlByName('pgt_etemplates_hf.html', array(
+					'warning' => '',
+					'iframe_id' => $sIFrameId, 
+					'form' => $oForm->getCode()
+				)),
+			)),
+			'js_content' => $this->getPageJsCode(array(
+				'sCodeMirror' => 'textarea[name=et_hf_header],textarea[name=et_hf_footer]'
+			))
+		));
+    }
+
     protected function getGrid($sObjectName)
     {
         $oGrid = BxDolGrid::getObjectInstance($sObjectName);
@@ -109,7 +197,8 @@ class BxBaseStudioPolyglot extends BxDolStudioPolyglot
         return BxDolStudioTemplate::getInstance()->parseHtmlByName('polyglot.html', array(
             'content' => $this->getBlockCode(array(
 				'items' => $oGrid->getCode()
-			))
+			)),
+            'js_content' => ''
         ));
     }
 }

+ 0 - 12
template/_email_footer.html

@@ -1,12 +0,0 @@
-						<p style="margin-top:5px; color:#999; font:11px Helvetica, Arial, sans-serif;">{unsubscribe}</p>
-<bx_if:show_html_footer>
-		            </div>
-		        </td></tr>
-				<tr><td valign="top">
-		            <div style="margin-top:5px; text-align:center; color:#999; font:11px Helvetica, Arial, sans-serif;">{about_us}</div>
-		        </td></tr>
-		    </table>
-		</div>
-	</body>
-</html>
-</bx_if:show_html_footer>

+ 0 - 10
template/_email_header.html

@@ -1,10 +0,0 @@
-<bx_if:show_html_header>
-<html>
-	<head></head>
-	<body bgcolor="#eee" style="margin:0; padding:0;">
-		<div style="padding:20px; background-color:#eee;">
-		    <table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
-		        <tr><td valign="top">
-		            <div style="color:#333; padding:20px; border:1px solid #999; background-color:#fff; font:14px Helvetica, Arial, sans-serif;">
-		                <div style="border-bottom:2px solid #eee; padding-bottom:10px; margin-bottom:20px; font-weight:bold; font-size:22px; color:#999;">{site_name}</div>
-</bx_if:show_html_header>