jonom/silverstripe-text-target-length
Composer 安装命令:
composer require jonom/silverstripe-text-target-length
包简介
Set character length recommendations on SilverStripe text form fields
README 文档
README
If you see a field marked 'Description' you know roughly what type of content to put in there. But how do you know how much of it to write? A single sentence might do, but maybe a paragraph or more is required? A great content plan should recommend an ideal length for every type of content, so content authors and designers alike can make informed decisions.
This module extends the TextField, TextareaField and HTMLEditorField classes in Silverstripe to allow you to set a recommended content length, and set soft upper and lower limits on character count.
Requirements
Silverstripe 4|5|6 (3.1+ in previous releases)
Installation
composer require jonom/silverstripe-text-target-length
How to use
With the module installed you can call call setTargetLength() on TextField, TextareaField and HTMLEditorField form fields.
// Ideal length: 100 characters // Minimum: 75 (automatically set at 75% of ideal) // Maximum: 125 (automatically set at 125% of ideal) $field->setTargetLength(100); // Ideal length: 100 characters // Minimum: 25 // Maximum: 150 $field->setTargetLength(100, 25, 150); // Prefer to think in word count? // 6 characters per word works okay for English $field->setTargetLength(50*6);
Customise hint text
This module supports translation through yml, so if you want to change the hint text that is displayed when users are typing, just create your own language file to override the one included in the module.
Front-end use
If you want to use this module outside of the CMS, you will need to load a copy of jQuery and jQuery Entwine in to the page. Example:
Requirements::javascript('silverstripe/admin:thirdparty/jquery/jquery.js'); Requirements::javascript('silverstripe/admin:thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
Maintainer contact
Sponsorship
If you want to boost morale of the maintainer you're welcome to make a small monthly donation through GitHub, or a one time donation through PayPal. ❤️ Thank you!
Please also feel free to get in touch if you want to hire the maintainer to develop a new feature, or discuss another opportunity.
jonom/silverstripe-text-target-length 适用场景与选型建议
jonom/silverstripe-text-target-length 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 139.42k 次下载、GitHub Stars 达 31, 最近一次更新时间为 2016 年 03 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「silverstripe」 「textfield」 「target」 「textareafield」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jonom/silverstripe-text-target-length 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jonom/silverstripe-text-target-length 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jonom/silverstripe-text-target-length 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Use Google Cloud Logger into your Yii projects
Logentries log target for Yii2 framework
Simple Yii2 Sentry target for logging (http://getsentry.com)
A collection of Yii2 log targets that format the log message as a JSON string.
Yii2 enhanced database log target
统计信息
- 总下载量: 139.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 32
- 点击次数: 32
- 依赖项目数: 8
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-03-10
