jonom/silverstripe-text-target-length 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jonom/silverstripe-text-target-length

Composer 安装命令:

composer require jonom/silverstripe-text-target-length

包简介

Set character length recommendations on SilverStripe text form fields

README 文档

README

Character limits in action

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

Packagist listing

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

Jono Menz

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 jonom/silverstripe-text-target-length 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 31
  • Watchers: 4
  • Forks: 16
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-03-10