定制 heimrichhannot/contao-filecredits 二次开发

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

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

heimrichhannot/contao-filecredits

最新稳定版本:3.5.1

Composer 安装命令:

composer require heimrichhannot/contao-filecredits

包简介

Contao module that adds credit support for images.

README 文档

README

Caution

ABANDONED

This module has reached its end of life and will undergo no further development.

Refer to the recommended replacement, which is also available for Contao 5 as of v2.

heimrichhannot/contao-filecredits-bundle

Filecredits

Contao module that adds credit support for images and files.

Installation

composer require heimrichhannot/contao-filecredits

Disable command scheduler (poor-mans-cron)

For performance reasons, we insist on disabling the "Command-Scheduler" (enable tl_settings.disableCron) and run the cron jobs by a dedicated cronjob within your servers crontab.

  • Contao 4: * * * * * wget -O /dev/null -q https://[DOMAIN-NAME]/_contao/cron --no-check-certificate
  • Contao 3: * * * * * wget -O /dev/null -q https://[DOMAIN-NAME]/system/cron/cron.php --no-check-certificate

Use custom cron job (contao 4)

0 3 * * * /path/to/contao/vendor/heimrichhannot/contao-filecredits/bin/indexer # every day at 03:00 

Use custom cron job (contao 3)

0 3 * * * /path/to/contao/composer/vendor/heimrichhannot/contao-filecredits/bin/indexer # every day at 03:00 

Filecredits 3.x

Filecredits 3 yields an huge performance due to credit index within cron job only. Filecredits makes usage of executeResize Hook, which is triggered every time an image is resized. If you use responsive images this Hook will be triggered not only once, but for every src-set provided. Filecredit 2.x invoked the hook within every client request, which braked down your website performance, based on number of images per page. Filecredit 3 now triggers a daily poor mans cron, or you can declare your own cron job within crontab, see Installation.

Filecredits 2.x

Filecredits 2.x is a complete redevelopment. If you attached your custom modules to filecredits 1.x, we would not recommend to upgrade.

Features

  • Copyrights can be added directly at the file within the contao file manager
  • Page occurrences for images will be added automatically, on rebuild search index, or when the page with the image will be loaded
  • A backend module is available to add custom filecredits with multiple page occurrences.
  • A copyright field can be added to any DCA as a shortcut to add copyrights directly to a file without having to go to the file manager

Technical instructions

Adding a copyright field to a non-tl_files-DCA

If you want to get a shortcut copyright field next to e.g. some image field you can do this by calling the following code e.g. in your DCA:

\HeimrichHannot\FileCredit\FileCredit::addCopyrightFieldToDca(<the DCA's table name>, <the name of the copyright field to be created>, <the name of the linked file field which copyright is being synced>);

// example:
\HeimrichHannot\FileCredit\FileCredit::addCopyrightFieldToDca('tl_news', 'detailsCopyright', 'detailsSingleSRC');

Hooks

Name Arguments Expected return value Description
{{copyright::*::,}} 1: file uuid (string) or file path, 2: credits delimiter (default: ,) string Return the file credits for a given uuid or path as delimited string.

heimrichhannot/contao-filecredits 适用场景与选型建议

heimrichhannot/contao-filecredits 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.67k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2014 年 12 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「images」 「files」 「contao」 「credits」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 heimrichhannot/contao-filecredits 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 heimrichhannot/contao-filecredits 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 8
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2014-12-10