定制 goldinteractive/craft-publisher 二次开发

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

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

goldinteractive/craft-publisher

最新稳定版本:5.0.3

Composer 安装命令:

composer require goldinteractive/craft-publisher

包简介

Publisher X enables you to publish saved Drafts on a future date without the need to handle the cache expiration logic. The cronjob handles the publication and the cache invalidation.

README 文档

README

Publisher X enables you to publish saved Drafts on a future date. The cronjob handles the publication, and cache invalidation is managed through Craft CMS's native element save events.

It also handles entries which are to expire or published in the future correctly and will trigger cache invalidation through Craft's standard element lifecycle events.

Screenshot

Permissions

To publish a draft, the user needs the "Save entries" permission on the section of the entry.

Installation

Install using composer require nst/craft-publisher and install in Craft.

Setup

Setup a Cron Job which runs every minute.

Call it via CLI or web:

Web:

* * * * * /usr/bin/curl --silent --compressed {siteUrl}/actions/publisher-x/api/publish

CLI:

* * * * * [PATH_TO_CRAFT_INSTALLATION]/craft publisher-x/publish

Usage with cache plugins

If you have a fullpage cache plugin like blitz installed, which refreshes it's cache over the queue, make sure you also set up cronjobs which run the queue and refresh the expired caches.

* * * * * [PATH_TO_CRAFT_INSTALLATION]/craft blitz/cache/refresh-expired
* * * * * [PATH_TO_CRAFT_INSTALLATION]/craft queue/run

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-22