Merge pull request #13 from dpradeep/VAT-434
[civicrm-core.git] / xml / templates / civicrm_msg_template.tpl
CommitLineData
6a488035 1-- +--------------------------------------------------------------------+
811982aa 2-- | CiviCRM version 4.5 |
6a488035 3-- +--------------------------------------------------------------------+
811982aa 4-- | Copyright CiviCRM LLC (c) 2004-2014 |
6a488035
TO
5-- +--------------------------------------------------------------------+
6-- | This file is a part of CiviCRM. |
7-- | |
8-- | CiviCRM is free software; you can copy, modify, and distribute it |
9-- | under the terms of the GNU Affero General Public License |
10-- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
11-- | |
12-- | CiviCRM is distributed in the hope that it will be useful, but |
13-- | WITHOUT ANY WARRANTY; without even the implied warranty of |
14-- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15-- | See the GNU Affero General Public License for more details. |
16-- | |
17-- | You should have received a copy of the GNU Affero General Public |
18-- | License and the CiviCRM Licensing Exception along |
19-- | with this program; if not, contact CiviCRM LLC |
20-- | at info[AT]civicrm[DOT]org. If you have questions about the |
21-- | GNU Affero General Public License or the licensing of CiviCRM, |
22-- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
23-- +--------------------------------------------------------------------+
d5864876
ARW
24--
25-- Generated from {$smarty.template}
26-- {$generated}
27--
6a488035
TO
28{* not sure how to define the below in Smarty, so doing it in PHP instead *}
29{php}
30 $ogNames = array(
31 'case' => ts('Message Template Workflow for Cases', array('escape' => 'sql')),
32 'contribution' => ts('Message Template Workflow for Contributions', array('escape' => 'sql')),
33 'event' => ts('Message Template Workflow for Events', array('escape' => 'sql')),
34 'friend' => ts('Message Template Workflow for Tell-a-Friend', array('escape' => 'sql')),
35 'membership' => ts('Message Template Workflow for Memberships', array('escape' => 'sql')),
36 'meta' => ts('Message Template Workflow for Meta Templates', array('escape' => 'sql')),
37 'pledge' => ts('Message Template Workflow for Pledges', array('escape' => 'sql')),
38 'uf' => ts('Message Template Workflow for Profiles', array('escape' => 'sql')),
39 'petition' => ts('Message Template Workflow for Petition', array('escape' => 'sql')),
40 );
41 $ovNames = array(
42 'case' => array(
43 'case_activity' => ts('Cases - Send Copy of an Activity', array('escape' => 'sql')),
44 ),
45 'contribution' => array(
46 'contribution_dupalert' => ts('Contributions - Duplicate Organization Alert', array('escape' => 'sql')),
47 'contribution_offline_receipt' => ts('Contributions - Receipt (off-line)', array('escape' => 'sql')),
48 'contribution_online_receipt' => ts('Contributions - Receipt (on-line)', array('escape' => 'sql')),
9849720e 49 'contribution_invoice_receipt' => ts('Contributions - Invoice', array('escape' => 'sql')),
6a488035
TO
50 'contribution_recurring_notify' => ts('Contributions - Recurring Start and End Notification', array('escape' => 'sql')),
51 'contribution_recurring_cancelled' => ts('Contributions - Recurring Cancellation Notification', array('escape' => 'sql')),
52 'contribution_recurring_billing' => ts('Contributions - Recurring Billing Updates', array('escape' => 'sql')),
7cdb890a 53 'contribution_recurring_edit' => ts('Contributions - Recurring Updates', array('escape' => 'sql')),
6a488035
TO
54 'pcp_notify' => ts('Personal Campaign Pages - Admin Notification', array('escape' => 'sql')),
55 'pcp_status_change' => ts('Personal Campaign Pages - Supporter Status Change Notification', array('escape' => 'sql')),
56 'pcp_supporter_notify' => ts('Personal Campaign Pages - Supporter Welcome', array('escape' => 'sql')),
7cdb890a 57 'payment_or_refund_notification' => ts('Additional Payment Receipt or Refund Notification', array('escape' => 'sql')),
6a488035
TO
58 ),
59 'event' => array(
60 'event_offline_receipt' => ts('Events - Registration Confirmation and Receipt (off-line)', array('escape' => 'sql')),
61 'event_online_receipt' => ts('Events - Registration Confirmation and Receipt (on-line)', array('escape' => 'sql')),
62 'event_registration_receipt' => ts('Events - Receipt only', array('escape' => 'sql')),
63 'participant_cancelled' => ts('Events - Registration Cancellation Notice', array('escape' => 'sql')),
64 'participant_confirm' => ts('Events - Registration Confirmation Invite', array('escape' => 'sql')),
65 'participant_expired' => ts('Events - Pending Registration Expiration Notice', array('escape' => 'sql')),
66 ),
67 'friend' => array(
68 'friend' => ts('Tell-a-Friend Email', array('escape' => 'sql')),
69 ),
70 'membership' => array(
71 'membership_offline_receipt' => ts('Memberships - Signup and Renewal Receipts (off-line)', array('escape' => 'sql')),
72 'membership_online_receipt' => ts('Memberships - Receipt (on-line)', array('escape' => 'sql')),
73 'membership_autorenew_cancelled' => ts('Memberships - Auto-renew Cancellation Notification', array('escape' => 'sql')),
74 'membership_autorenew_billing' => ts('Memberships - Auto-renew Billing Updates', array('escape' => 'sql')),
75 ),
76 'meta' => array(
77 'test_preview' => ts('Test-drive - Receipt Header', array('escape' => 'sql')),
78 ),
79 'pledge' => array(
80 'pledge_acknowledge' => ts('Pledges - Acknowledgement', array('escape' => 'sql')),
81 'pledge_reminder' => ts('Pledges - Payment Reminder', array('escape' => 'sql')),
82 ),
83 'uf' => array(
84 'uf_notify' => ts('Profiles - Admin Notification', array('escape' => 'sql')),
85 ),
86 'petition' => array(
87 'petition_sign' => ts('Petition - signature added', array('escape' => 'sql')),
88 'petition_confirmation_needed' => ts('Petition - need verification', array('escape' => 'sql')),
89 ),
90 );
91 $this->assign('ogNames', $ogNames);
92 $this->assign('ovNames', $ovNames);
93{/php}
94
95INSERT INTO civicrm_option_group
96 (name, {localize field='title'}title{/localize}, {localize field='description'}description{/localize}, is_reserved, is_active) VALUES
97{foreach from=$ogNames key=name item=description name=for_groups}
98 ('msg_tpl_workflow_{$name}', {localize}'{$description}'{/localize}, {localize}'{$description}'{/localize}, 1, 1) {if $smarty.foreach.for_groups.last};{else},{/if}
99{/foreach}
100
101{foreach from=$ogNames key=name item=description}
102 SELECT @tpl_ogid_{$name} := MAX(id) FROM civicrm_option_group WHERE name = 'msg_tpl_workflow_{$name}';
103{/foreach}
104
105INSERT INTO civicrm_option_value
106 (option_group_id, name, {localize field='label'}label{/localize}, value, weight) VALUES
107{foreach from=$ovNames key=gName item=ovs name=for_groups}
108{foreach from=$ovs key=vName item=label name=for_values}
109 (@tpl_ogid_{$gName}, '{$vName}', {localize}'{$label}'{/localize}, {$smarty.foreach.for_values.iteration}, {$smarty.foreach.for_values.iteration}) {if $smarty.foreach.for_groups.last and $smarty.foreach.for_values.last};{else},{/if}
110{/foreach}
111{/foreach}
112
113{foreach from=$ovNames key=gName item=ovs}
114{foreach from=$ovs key=vName item=label}
115 SELECT @tpl_ovid_{$vName} := MAX(id) FROM civicrm_option_value WHERE option_group_id = @tpl_ogid_{$gName} AND name = '{$vName}';
116{/foreach}
117{/foreach}
118
119INSERT INTO civicrm_msg_template
120 (msg_title, msg_subject, msg_text, msg_html, workflow_id, is_default, is_reserved) VALUES
121{foreach from=$ovNames key=gName item=ovs name=for_groups}
122{foreach from=$ovs key=vName item=title name=for_values}
123 {fetch assign=subject file="`$smarty.const.SMARTY_DIR`/../../xml/templates/message_templates/`$vName`_subject.tpl"}
124 {fetch assign=text file="`$smarty.const.SMARTY_DIR`/../../xml/templates/message_templates/`$vName`_text.tpl"}
125 {fetch assign=html file="`$smarty.const.SMARTY_DIR`/../../xml/templates/message_templates/`$vName`_html.tpl"}
126 ('{$title}', '{$subject|escape:"quotes"}', '{$text|escape:"quotes"}', '{$html|escape:"quotes"}', @tpl_ovid_{$vName}, 1, 0),
127 ('{$title}', '{$subject|escape:"quotes"}', '{$text|escape:"quotes"}', '{$html|escape:"quotes"}', @tpl_ovid_{$vName}, 0, 1) {if $smarty.foreach.for_groups.last and $smarty.foreach.for_values.last};{else},{/if}
128{/foreach}
129{/foreach}
130
131{* Sample CiviMail Newsletter message template *}
132INSERT INTO civicrm_msg_template
133 (msg_title, msg_subject, msg_text, msg_html, workflow_id, is_default, is_reserved)
134 VALUES
135 ('Sample CiviMail Newsletter Template', 'Sample CiviMail Newsletter', '', '<table width=612 cellpadding=0 cellspacing=0 bgcolor="#ffffff">
136 <tr>
a235e13c 137 <td colspan="2" bgcolor="#ffffff" valign="middle" >
138 <table border="0" cellpadding="0" cellspacing="0" >
139 <tr>
140 <td>
141 <a href="http://www.civicrm.org"><img src="http://civicrm.org/sites/civicrm.org/files/top-logo_2.png" border=0 alt="Replace this logo with the URL to your own"></a>
142 </td>
143 <td>&nbsp; &nbsp;</td>
144 <td>
145 <a href="http://www.civicrm.org" style="text-decoration: none;"><font size=5 face="Arial, Verdana, sans-serif" color="#8bc539">Your Newsletter Title</font></a>
146 </td>
147 </tr>
148 </table>
149 </td>
6a488035
TO
150 </tr>
151 <tr>
a235e13c 152 <td valign="top" width="70%">
153 <!-- left column -->
154 <table cellpadding="10" cellspacing="0" border="0">
155 <tr>
156 <td style="font-family: Arial, Verdana, sans-serif; font-size: 12px;" >
157 <font face="Arial, Verdana, sans-serif" size="2" >
158 Greetings {literal}{contact.display_name}{/literal},
159 <br /><br />
160 This is a sample template designed to help you get started creating and sending your own CiviMail messages. This template uses an HTML layout that is generally compatible with the wide variety of email clients that your recipients might be using (e.g. Gmail, Outlook, Yahoo, etc.).
161 <br /><br />You can select this "Sample CiviMail Newsletter Template" from the "Use Template" drop-down in Step 3 of creating a mailing, and customize it to your needs. Then check the "Save as New Template" box on the bottom the page to save your customized version for use in future mailings.
162 <br /><br />The logo you use must be uploaded to your server. Copy and paste the URL path to the logo into the &lt;img src= tag in the HTML at the top. Click "Source" or the Image button if you are using the text editor.
163 <br /><br />
164 Edit the color of the links and headers using the color button or by editing the HTML.
165 <br /><br />
166 Your newsletter message and donation appeal can go here. Click the link button to <a href="#">create links</a> - remember to use a fully qualified URL starting with http:// in all your links!
167 <br /><br />
168 To use CiviMail:
169 <ul>
baccef84 170 <li><a href="http://book.civicrm.org/user/advanced-configuration/email-system-configuration/">Configure your Email System</a>.</li>
1b85a633 171 <li>Make sure your web hosting provider allows outgoing bulk mail, and see if they have a restriction on quantity. If they don\'t allow bulk mail, consider <a href="https://civicrm.org/providers/hosting">finding a new host</a>.</li>
a235e13c 172 </ul>
173 Sincerely,
174 <br /><br />
175 Your Team
176 <br /><br />
177 </font>
178 </td>
179 </tr>
180 </table>
181 </td>
6a488035 182
a235e13c 183 <td valign="top" width="30%" bgcolor="#ffffff" style="border: 1px solid #056085;">
184 <!-- right column -->
185 <table cellpadding=10 cellspacing=0 border=0>
186 <tr>
187 <td bgcolor="#056085"><font face="Arial, Verdana, sans-serif" size="4" color="#ffffff">News and Events</font></td>
188 </tr>
189 <tr>
190 <td style="color: #000; font-family: Arial, Verdana, sans-serif; font-size: 12px;" >
191 <font face="Arial, Verdana, sans-serif" size="2" >
192 <font color="#056085"><strong>Featured Events</strong> </font><br />
193 Fundraising Dinner<br />
194 Training Meeting<br />
195 Board of Directors Annual Meeting<br />
6a488035 196
a235e13c 197 <br /><br />
198 <font color="#056085"><strong>Community Events</strong></font><br />
199 Bake Sale<br />
200 Charity Auction<br />
201 Art Exhibit<br />
6a488035 202
a235e13c 203 <br /><br />
204 <font color="#056085"><strong>Important Dates</strong></font><br />
205 Tuesday August 27<br />
206 Wednesday September 8<br />
207 Thursday September 29<br />
208 Saturday October 1<br />
209 Sunday October 20<br />
210 </font>
211 </td>
212 </tr>
213 </table>
214 </td>
6a488035
TO
215 </tr>
216
217 <tr>
a235e13c 218 <td colspan="2">
219 <table cellpadding="10" cellspacing="0" border="0">
220 <tr>
221 <td>
222 <font face="Arial, Verdana, sans-serif" size="2" >
223 <font color="#7dc857"><strong>Helpful Tips</strong></font>
224 <br /><br />
225 <font color="#3b5187">Tokens</font><br />
226 Click "Insert Tokens" to dynamically insert names, addresses, and other contact data of your recipients.
227 <br /><br />
228 <font color="#3b5187">Plain Text Version</font><br />
229 Some people refuse HTML emails altogether. We recommend sending a plain-text version of your important communications to accommodate them. Luckily, CiviCRM accommodates for this! Just click "Plain Text" and copy and paste in some text. Line breaks (carriage returns) and fully qualified URLs like http://www.example.com are all you get, no HTML here!
230 <br /><br />
231 <font color="#3b5187">Play by the Rules</font><br />
232 The address of the sender is required by the Can Spam Act law. This is an available token called domain.address. An unsubscribe or opt-out link is also required. There are several available tokens for this. <em>{literal}{action.optOutUrl}{/literal}</em> creates a link for recipients to click if they want to opt out of receiving emails from your organization. <em>{literal}{action.unsubscribeUrl}{/literal}</em> creates a link to unsubscribe from the specific mailing list used to send this message. Click on "Insert Tokens" to find these and look for tokens named "Domain" or "Unsubscribe". This sample template includes both required tokens at the bottom of the message. You can also configure a default Mailing Footer containing these tokens.
233 <br /><br />
234 <font color="#3b5187">Composing Offline</font><br />
235 If you prefer to compose an HTML email offline in your own text editor, you can upload this HTML content into CiviMail or simply click "Source" and then copy and paste the HTML in.
236 <br /><br />
237 <font color="#3b5187">Images</font><br />
238 Most email clients these days (Outlook, Gmail, etc) block image loading by default. This is to protect their users from annoying or harmful email. Not much we can do about this, so encourage recipients to add you to their contacts or "whitelist". Also use images sparingly, do not rely on images to convey vital information, and always use HTML "alt" tags which describe the image content.
239 </td>
240 </tr>
241 </table>
242 </td>
6a488035
TO
243 </tr>
244 <tr>
a235e13c 245 <td colspan="2" style="color: #000; font-family: Arial, Verdana, sans-serif; font-size: 10px;">
246 <font face="Arial, Verdana, sans-serif" size="2" >
247 <hr />
248 <a href="{literal}{action.unsubscribeUrl}{/literal}" title="click to unsubscribe">Click here</a> to unsubscribe from this mailing list.<br /><br />
249 Our mailing address is:<br />
250 {literal}{domain.address}{/literal}
251 </td>
6a488035
TO
252 </tr>
253 </table>', NULL, 1, 0);