定制 toteph42/filesync 二次开发

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

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

toteph42/filesync

最新稳定版本:1.5

Composer 安装命令:

composer require toteph42/filesync

包简介

Extended file synchronisation bundle with user e-mail notification for Contao Open Source CMS

README 文档

README

This small extension replaces to Contao internal contao:filesync command by toteph42:filesync. On top of the file synchronization, e-Mail notifications were send to users if any file has changed or is new.

Installation

Via composer

composer require toteph42/filesync

Via contao-manager

Search for totep42/filesync bundle and add it to your extensions.

After installing the contao-member-extension-bundle, you need to run a contao install.

Usage

  1. Define Member groups exactly as the folder names were defined (e.g. member group Group1).
  2. Assign this group to a member.
  3. Create a directory below files directory named like your group (e.g. files/Group1).
  4. Then copy any files to the directory and call vendor/contao-console toteph42:filesync.

Disable notification

  1. Uncheck checkbox Notify user about changes in file system in member definition (default=true).

Member configuration

If you want members to give the possibility to select whether they want notification or not in frontend:

  1. Create a frontend module Personal data.
  2. Select field Notify user about changes in file system as Editable fields.
  3. Create an Article and include the module you just created.

Creating message to send

Now you need to create a Forms with the name of the group (e.g. member group Group1).

  1. Click on checkbox Send form data via e-mail in section Send form data.
  2. Enter the sender address in field Recipient address (e.g.from@exaple.com).
  3. Add your Subject.
  4. Select Data format E-mail.
  5. Save and close
  6. Add a content field with Field type Explanation.
  7. Enter your e-Mail in Text field. Use the placehoder [[files]] where you want the list of files to be inserted.
  8. Save and close

Testing

To test, please go to your web directory and use the command

vendor/bin/contao-console toteph42:filesync

or for a specific php version e.g.

/opt/php8.3.24/bin/php vendor/bin/contao-console toteph42:filesync

Production

To start sending notification e-Mails, you need to edit your crontab using crontab -e and enter:

# Synchronize files
30 * * * *    /opt/php8.3.13/bin/php [Path to your Contao installation]/vendor/bin/contao-console toteph42:filesync

Please enjoy!

If you enjoy my software, I would be happy to receive a donation.

Donate with PayPal

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2025-01-01