boboldehampsink/increment
最新稳定版本:0.3.4
Composer 安装命令:
composer require boboldehampsink/increment
包简介
Increment Plugin for Craft CMS
README 文档
README
Plugin that automatically ups each increment field by one number.
Features:
- Able to output the value in the CP and in the Site (no other plugin has this feature)
- Ability to have the value prefixed with text or variables (like {id} or {{now.year}})
- Ability to reset increment yearly
- Ability to zero pad the value
- This plugin checks if the calculated next value is still unique on save
Important: The plugin's folder should be named "increment"
Credits: This plugin's idea is derived from the Sprout Incremental Plugin by Barrel Strength Design
Deprecated
With the release of Craft 3 on 4-4-2018, this plugin has been deprecated. You can still use this with Craft 2 but you are encouraged to use (and develop) a Craft 3 version. At this moment, I have no plans to do so.
Changelog
0.3.4
- Fixed yearly reset for non-entry elements
0.3.3
- Fixed setting of postDate on fresh entries
0.3.2
- Fixed bug where yearly reset looked at the wrong date (dateCreated in stead of postDate)
0.3.1
- Fixed bug where padding was not a number (thanks to @steverowling)
- Fixed bug where postDate was assumed for all Element Types (thanks to @steverowling)
0.3.0
- Refactor to only recalculate numbers on save when entry is a new record
- Added the ability to reset increment yearly
0.2.2
- Added the ability to control number recalculation on save
0.2.1
- Added the ability to use the then yet non-existing postDate in prefix like in Craft's Live Preview
0.2
- Added the ability to add a prefix to each value, like {id} or {{now.year}}
- Added zero padding options
- Prevent duplicate values when elements are created at the same time.
- Many small improvements and code cleanups
- Added MIT License
0.1
- Initial push to GitHub
boboldehampsink/increment 适用场景与选型建议
boboldehampsink/increment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.36k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2015 年 01 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 boboldehampsink/increment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 boboldehampsink/increment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-01-09