资源说明:Constant Contact Plugin for ExpressionEngine
{site_name}
","
","
"),"",$rss); ?> {exp:playa:children limit="1" disable="categories|category_fields|custom_fields|member_data|pagination" parse="inward"}{if no_children}{redirect="404"}{/if}{!--
--}{/exp:playa:children}
[/EmailTextContent]
{/exp:channel:entries}
[StyleSheet]
.body {
background-color: #d7d2cb;
font-family: myriad-pro, 'Myriad Pro', 'Myriad Web Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
color:black;
font-size: 16px;
line-height: 1.25em;
}
.header {
font-family: myriad-pro, 'Myriad Pro', 'Myriad Web Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
width: 650px;
padding: 0 10px;
margin: 0 auto;
text-align: left;
border: none;
}
.left {
text-align: left;
padding: 5px 0;
width: 650px;
}
.padded {
text-align: left;
padding: 10px 0;
width: 650px;
}
.date{
font-size: 0.9em;
text-align: left;
padding: 5px 10px 5px 0;
color:#666;
}
.img {
text-align:center;
width:100%;
}
[/StyleSheet]
[/campaign]
{/exp:lk_cc:campaign}
```
# This is not compatible with API v2 from Constant Contact. I will not be updating the plugin to version 2 as we are no longer using Expression Engine on our site. If you would like to update it, I'm willing to merge a pull request or hand off development entirely. Alternatively, if you would like to sponsor an update to version 2, please contact me. LK Constant Contact (Outdated, see above) ===== Constant Contact Plugin for ExpressionEngine This addon interfaces with the constant contact API to allow website visitors to sign up for your newsletters by entering their email address and selecting the lists that they wish to sign up for. It does not interface with current users in your EE memberbase. If your multiple sites all use the same Constant Contact account this will work with multi-site manager. If you would like to add features to this addon, feel free to fork the git-repository and/or work with me on it. I unfortunately have a full time job and won't be able to add features unless they are required for one of my projects, but I will do my best to provide support to those using the addon and help anyone who wants to add more features to it. If you are looking for a robust way to send out campaigns, check out https://www.devdemon.com/campaigns/. Note: It currently does not have a way to add subscribers, just to email the existing ones. Extension Settings ===================================================== * Constant Contact Username: Your username * Constant Contact Password: Your password * Constant Contact API Key: * Get your API Key Here: http://community.constantcontact.com/t5/Documentation/API-Keys/ba-p/25015 * Login, Click Request a New API Key * Fill in the form: * Multiple Accounts? Select Yes if you will use this key on multiple websites otherwise select no. * Application Description - Website email signup form * You may leave the rest of the form blank. * Once you recieve a key, copy the key into the API Key setting. * Save your settings. * Click settings again. If everything is working, your lists should now be listed in the List IDs multiselect. * The number before the list name is the ID which will be used in the tags. Plugin Basic Usage ===================================================== Subscribe Tag Usage ---------------------- * Default_list is the lists that should be checked by default, if omitted no lists will be checked by default * Show_list is the lists to be shown, if omitted all lists will be shown. The lists will be shown in the order the ids are listed. * (You can find your list IDs in the extension settings.) * Default_list and Show_list both support list ids separated by pipes. They do not support the use of "not". * Email and at least one list selection will be required, the name fields are optional. Error message strings are defined in the language file. * First and last name fields can be omitted if desired. This script does not currently support any other Constant Contact fields. * XID Hash is for EE 2.7+ so it will allow the submission ```html {exp:lk_cc:subscribe default_list="3" show_list="2|5|6|3|4" parse="inward"} {if "{success2}" == "false"}{if:else}
Thanks for subscribing! Please check your email to confirm your subscription.
{/if} {/exp:lk_cc:subscribe} ``` Small form with just email: -------------------------------------------- This form should submit to the page with the plugin tag code and can be used to embed an email subscribe form into all your website pages without calling the plugin until it is needed. * Set the "confirm" hidden field so that "success" will not be set allowing the user to confirm, subscribe to additional lists etc. * If you set default lists, when the user clicks submit they will be added to your default email lists so even if they don't submit the confirmation form, they have still be subscribed. * Submitting the confirmation will allow them edit their information. * XID hash is for EE 2.7+ so that it will allow the submission ```html ``` Creating a Campaign: -------------------------------------------- This will create a new campaign in constant contact. * htmlspecialchars() will be run on the email content and email text content * Lists is pipe separated list ids (List Ids are in the extension settings) * It will not work if EE's fancy quotes are in the title * Please make sure the template that creates campaigns is only accessible by admins to prevent users or search bots from accidentally creating campaigns. * The campaign syntax is very strict, please use my code as a model. It basically mirrors the CC XML api just using brackets for the tags. * Your email XML must be perfect or CC will reject it. I recommend building the XML without using the exp:lk_cc:campaign tags and just copy pasting into the CC Custom Campaign builder until your code works and the preview looks right. Then, put the exp:lk_cc:campaign tags around it which will create the campaign. This will prevent you from getting a bunch of test campaigns created. See the advanced users guide for more details: http://www.constantcontact.com/aka/docs/pdf/CC_Advanced_Editor_User_Guide.pdf * This does not schedule the campaign to be sent. You must log into constant contact and do that yourself. (You should also preview the campaign before you schedule it just to be sure everything looks right.) * In order for this tag to work properly and fetch after all other processing has happened, this tag schedules a late fetch of the data which means you should have nothing in this template except the exp:lk_cc:campaign information. The plugin will output the full XML that it sends to Constant Contact and the result of scheduling the campaign at the bottom of the page for use in debugging. * Using a CSS template type will make the output more readable for debugging, but switching to html and putting around the [campaign] [/campaign] will hide the information for users IMPORTANT: Just to say it one more time, the pages that this is on are intended for use only by the admin. Everytime this page is hit, the plugin will attempt to create a new constant contact campaign. This plugin has no ability to detect new posts and only create a campaign for each new post. Finally, the constant contact API is very picky about the XML it receives, and the plugin does very little to verify your XML so be sure you get it right using my example code below should help with that. Example Code: ``` {exp:lk_cc:campaign} [campaign] {exp:channel:entries channel="features" limit="1" disable="categories|member_data|pagination|category_fields"}{if no_results}404 Error{/if} [debug]off[/debug] {!-- If set to on, the debug information will be displayed as exactly what was sent to constant contact as XML and your type --} [name] {current_time format="%Y-%m-%d %H:%i:%s"}[/name]{!-- no duplicate names are allowed so post fix the current time --} [Subject]New Post: [/Subject] [FromName]Your Website[/FromName] [ViewAsWebpage]NO[/ViewAsWebpage] [ViewAsWebpageLinkText]Click here[/ViewAsWebpageLinkText] [ViewAsWebpageText]Having trouble viewing this email?[/ViewAsWebpageText] [PermissionReminder]NO[/PermissionReminder] [PermissionReminderText]NO[/PermissionReminderText] [GreetingName]FirstName[/GreetingName] [GreetingSalutation]Dear[/GreetingSalutation] [GreetingString]Greetings![/GreetingString] [OrganizationName]Company[/OrganizationName] [OrganizationAddress1]Address[/OrganizationAddress1] [OrganizationAddress2][/OrganizationAddress2] [OrganizationAddress3][/OrganizationAddress3] [OrganizationCity]City[/OrganizationCity] [OrganizationState]Virginia[/OrganizationState] [OrganizationInternationalState][/OrganizationInternationalState] [OrganizationCountry]United States[/OrganizationCountry] [OrganizationPostalCode]99999[/OrganizationPostalCode] [IncludeForwardEmail]YES[/IncludeForwardEmail] [ForwardEmailLinkText]Forward email[/ForwardEmailLinkText] [IncludeSubscribeLink]YES[/IncludeSubscribeLink] [SubscribeLinkText]Subscribe me![/SubscribeLinkText] [EmailContentFormat]XHTML[/EmailContentFormat] [FromEmail] [EmailAddress]email@domain.com[/EmailAddress] {!-- MUST be a VERIFIED email address on your Constant Contact account --} [/FromEmail] [ReplyToEmail] [EmailAddress]email@domain.com[/EmailAddress] {!-- MUST be a VERIFIED email address on your Constant Contact account --} [/ReplyToEmail] [Lists]3[/Lists] [EmailContent]{!--duplicate body class to ensure background color --}
[/EmailContent]
[EmailTextContent]
| |||
{exp:playa:children limit="1" disable="categories|category_fields|custom_fields|member_data|pagination" parse="inward"}{if no_children}{redirect="404"}{/if} {exp:channel_images:images entry_id="{parent:entry_id}" field="feature_169" limit="1"} {/exp:channel_images:images}{/exp:playa:children} | |||
| |||
{exp:playa:children limit="1" disable="categories|category_fields|custom_fields|member_data|pagination" parse="inward"}{if no_children}{redirect="404"}{/if}
| |||
{exp:playa:children limit="1" disable="categories|category_fields|custom_fields|member_data|pagination" parse="inward"}{if no_children}{redirect="404"}{/if}
|
","
"),"",$rss); ?> {exp:playa:children limit="1" disable="categories|category_fields|custom_fields|member_data|pagination" parse="inward"}{if no_children}{redirect="404"}{/if}
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。