定制 webcoast/character-counter 二次开发

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

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

webcoast/character-counter

Composer 安装命令:

composer require webcoast/character-counter

包简介

Show a character counter below text fields in TYPO3 CMS

README 文档

README

What does it do?

This extension allows you to display a character counter in the form of 23 / 60 below input fields, text areas and RTE fields. This is most useful for SEO related fields, so that editors get a hint, if their title or description matches the requirement.

This does not limit the number of characters, that can be entered. This counter is for informational purpose only.

Installation & configuration

The extension is available from packagist.org

composer require webcoast/character-counter

or from TYPO3 extension repository.

Usage

To enable the character counter for a certain field, use the TCA helper method in your TCA/Overrides files.

Pages: seo_title

In Configuration/TCA/Overrides/pages.php add:

\WEBcoast\CharacterCounter\Helper\Tca::enableCharacterCounter('pages', 'seo_title', 60, 40);

The last argument warning is optional and defaults to 80% of the third argument max.

You can also adjust your TCA manually by adding the follow to the field's config section:

\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['pages']['columns']['seo_title']['config'], [
    'fieldWizard' => [
        'characterCount' => [
                'renderType' => 'characterCountWizard'
            ]
        ],
        'characterCount' => [
            'warning' => 120, // Optional: Defaults to 80% of `max`
            'max' => 160
        ]
    ]
);

Contributing

Feel free to fork and provide a PR or open an issue.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固