定制 raow/mautic-rss-to-email-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

raow/mautic-rss-to-email-bundle

Composer 安装命令:

composer require raow/mautic-rss-to-email-bundle

包简介

README 文档

README

Description

The Mautic RssToEmailBundle is a Mautic plugin that allows you to generate e-mails from a RSS-feed.

Purpose

Send out an e-mail with for example to latest posts of your blog.

Compatibility

This plugin has been tested with Mautic versions 2.x, 3.x and 4.x.

Features

  • Set the number of posts you want to display
  • Create a custom template for the items in the feed
  • Use images from the feed
  • Format dates
  • Reverse view

Installation

  1. Download the plugin from github
  2. Move / Upload folder to the plugins directory. Name the folder MauticRssToEmailBundle
  3. In the Mautic GUI, go to the gear and then to Plugins.
  4. Click on the "Install/Upgrade Plugins" button
  5. You should now see the "Rss To Email" in your list of plugins.

Usage

Use the "code mode" slot of the froala/grapejs e-mail editor. In the content of the slot set to following content:

{feed url="<<FEEDURL>>"}
    {feeditems}
        <h3>{feeditem:title}</h3>
        <p><small>{feeditem:date format="d-m-Y H:i"}</small></p>
        <p>{feeditem:description}</p>
        <p><img src="{feeditem:image}"></p>
    {/feeditems}
{/feed}

This should give a basic setup to start with.

The following tags can be used in the {feed} block:

  • {feedinfo:title}
    Returns: title of the feed

  • {feedinfo:url} Returns: url of the feed

  • {feedinfo:description} Returns: description of the feed

The following tags can be used in the {feeditems} block:

Optional param:

  • Batch mode

    By default batch-mode will be enabled. This means that the feed-tags will only be replaced once per batch. When you disable batch-mode, the feed will be parsed for every single e-mail. So if you have a list of 1000 addresses, the feed will be requested 1000 times. Because of the high number of requests in a short timeframe it could cause the server where the feed is on to go down. So handle with care!

    {feed batch="0"} - Will DISABLE batch-mode on the feed.

  • Count
    {feeditems count="3"} - Returns only the first N items from the feed

  • Offset
    {feeditems count="3" offset="2"} - Skips the first N items from the feed

  • Reverse
    {feeditems reverse="1"} - Returns resuls in reversed view

  • Shuffle
    {feeditems count="3" shuffle="1"} - Returns results in shuffled (random) view, can be used in combination with the count parameter

Merge tags:

  • {feeditem:title}
    Returns: title of the post

  • {feeditem:link}
    Returns: link to the post

  • {feeditem:content}
    Returns: summarized content (desciption), when description is not available it will return the full content

  • {feeditem:content_full}
    Returns: full content of the post

  • {feeditem:content_text}
    Returns: summarized content (desciption), when description is not available it will return the full content. Tags are stripped.

  • {feeditem:content_full_text}
    Returns: full content of the post stripped of tags

  • {feeditem:description}
    Returns: summarized content (desciption) of the post

  • {feeditem:date}
    Optional param: format {feeditem:date format="d-m-Y H:i"}
    Returns: summarized content (desciption) of the post

  • {feeditem:author}
    Returns: author name of the post

  • {feeditem:categories}
    Returns: comma seperated list of the categories

  • {feeditem:image}
    Returns: url of the image. Will check the enclosere and media tags of the xml.

  • {feeditem:custom:KEY}
    Returns: value of custom field in RSS feed.

    To use this functionality you have to:

    1. Add this to the xmlns definitions in your RSS-feed: xmlns:mautic="https://www.mautic.org/rss/mautic/"

      For example:

      <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
       xmlns:content="http://purl.org/rss/1.0/modules/content/"
       xmlns:wfw="http://wellformedweb.org/CommentAPI/"
       xmlns:dc="http://purl.org/dc/elements/1.1/"
       xmlns:atom="http://www.w3.org/2005/Atom"
       xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
       xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
       xmlns:mautic="https://www.mautic.org/rss/mautic/">
      
      <channel>
      ...
      
    2. Add the custom field to your RSS-feed with the following syntax:
      <mautic:location>New York</mautic:location>

    3. Inside your mail template use the following tag:
      {feeditem:custom:location}

Icon

Icons made by Freepik from www.flaticon.com

raow/mautic-rss-to-email-bundle 适用场景与选型建议

raow/mautic-rss-to-email-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.81k 次下载、GitHub Stars 达 102, 最近一次更新时间为 2018 年 02 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 raow/mautic-rss-to-email-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 raow/mautic-rss-to-email-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 raow/mautic-rss-to-email-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 102
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 102
  • Watchers: 11
  • Forks: 24
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-02-12