onedrop/campaignmonitor

将 CampaignMonitor 集成到您的 Neos 网站或 Flow 应用程序的流包

安装: 168

依赖项: 0

建议者: 0

安全性: 0

星级: 0

关注者: 3

分支: 0

开放问题: 0

类型:neos-package

1.0.0 2017-05-05 13:54 UTC

This package is auto-updated.

Last update: 2024-09-25 07:24:22 UTC


README

CampaignMonitor® 集成到您的 Neos 网站或 Flow 应用的包。

本包深受 Neos Mailchimp 包 启发。

特性

本包包含两个主要特性

  1. Flow Form Framework 提供的 CampaignMonitor® 订阅完成器
  2. 一个简单的 Neos 模块,允许 Neos 管理员管理 CampaignMonitor® 列表和收件人

使用方法

安装此包:composer require onedrop/campaignmonitor

安装成功后,请确保在您的 Site 包的 Settings.yaml 中配置 CampaignMonitor® API 密钥和客户端 ID

Onedrop:
  CampaignMonitor:
    apiKey: '<VALID_CAMPAIGNMONITOR_API_KEY>'
    clientID: '<VALID_CAMPAIGNMONITOR_CLIENT_ID>'

注意:API 密钥可以从 Account > API Keys 获取

完成。现在您可以登录 Neos 后端(作为管理员),在新的模块 administration/campaignmonitor 中管理您的时事通讯列表和收件人(如果模块没有出现在菜单中,请确保刷新浏览器缓存)。

Neos 模块

该模块非常简单,易于理解。目前它可以

  1. 显示所有列表
  2. 显示单个列表的详细信息,包括创建日期、发送者信息、收件人数量
  3. 显示所选列表的所有成员
  4. 从列表中删除成员
  5. 将新成员订阅到列表

表单完成器

本包还提供了一个简单的表单完成器,允许使用 Flow Form Framework 创建简单的时事通讯订阅表单。它还添加了相应的 FormBuilder 配置,以便完成器可以直接在视觉编辑器中使用。

或者,您可以将以下片段保存到 Data/Forms/newsletter.yaml 以创建简单的时事通讯订阅表单

type: 'Neos.Form:Form'
identifier: campaignmonitor
label: Campaignmonitor
renderables:
    -
        type: 'Neos.Form:Page'
        identifier: page1
        label: 'Page 1'
        renderables:
            -
                type: 'Neos.Form:SingleLineText'
                identifier: 'firstName'
                label: 'First name'
                validators:
                    -
                        identifier: 'Neos.Flow:NotEmpty'
                properties:
                    placeholder: 'Your first name'
                defaultValue: ''
            -
                type: 'Neos.Form:SingleLineText'
                identifier: 'lastName'
                label: 'Last name'
                validators:
                    -
                        identifier: 'Neos.Flow:NotEmpty'
                properties:
                    placeholder: 'Your last name'
                defaultValue: ''
            -
                type: 'Neos.Form:SingleLineText'
                identifier: 'email'
                label: 'E-Mail'
                validators:
                    -
                        identifier: 'Neos.Flow:NotEmpty'
                    -
                        identifier: 'Neos.Flow:EmailAddress'
                    -
                        identifier: 'Onedrop.CampaignMonitor:UniqueSubscription'
                        options:
                          listId: '<CAMPAIGNMONITOR-LIST-ID>'
                properties:
                    placeholder: 'Your email address'
                defaultValue: ''
finishers:
    -
        identifier: 'Onedrop.CampaignMonitor:CampaignMonitorSubscriptionFinisher'
        options:
            listId: '<CAMPAIGNMONITOR-LIST-ID>'
            name: '{firstName} {lastName}'
            additionalFields:
              'salutation': '{salutation}'
    -
        identifier: 'Neos.Form:Confirmation'
        options:
            message: 'Thank you, your subscription was successful. Please check your email.'
renderingOptions:
    submitButtonLabel: ''

注意:将两个 "<CAMPAIGNMONITOR-LIST-ID>" 替换为可以从 Lists & Subscribers > <YOUR-LIST> > change name/type > API Subscriber List ID 获取的有效列表标识符。列表 ID 通常包含字母和数字,例如 "cbd1eb6f213f838b5a74e57ec8a19cef"。

当然,可以在不使用 Neos 的情况下使用表单完成器(即在普通 Flow 应用程序中进行的时事通讯订阅)。

许可证

根据 GPLv3+ 许可,请参阅 LICENSE