承接 ayacoo/tiktok 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ayacoo/tiktok

Composer 安装命令:

composer require ayacoo/tiktok

包简介

TikTok - Provides a TikTok online media helper

README 文档

README

1 Features

  • Tiktok videos can be created as a file in the TYPO3 file list
  • Tiktok videos can be used and output with the text with media element
  • Update metadata via command

2 Usage

2.1 Installation

Installation using Composer

The recommended way to install the extension is using Composer.

Run the following command within your Composer based TYPO3 project:

composer require ayacoo/tiktok

2.2 TypoScript settings

Privacy

With plugin.tx_tiktok.settings.privacy = 1 you can ensure that the IFrame is built with data-src instead of src. If you need more options to influence the HTML, you can use a PSR-14 event.

2.3 Hints

Emojis

For better compatibility, emojis are removed from the title or description.

Output

For the output, the HTML is used directly from Tiktok.

SQL changes

In order not to have to access the oEmbed interface permanently, four fields are added to the sys_file_metadata table

3 Developer Corner

3.1 ModifyTiktokOutputEvent

If you want to modify the output of the Tiktok HTML, you can use the ModifyTiktokOutputEvent.

EventListener registration

In your extension, extend Configuration/Services.yaml once:

Vendor\ExtName\EventListener\TiktokOutputEventListener:
    tags:
        -   name: event.listener
            identifier: 'tiktok/output'
            event: Ayacoo\Tiktok\Event\ModifyTiktokOutputEvent
<?php

namespace Vendor\ExtName\EventListener;

use Ayacoo\Tiktok\Event\ModifyTiktokOutputEvent;

class TiktokOutputEventListener
{
    public function __invoke(ModifyTiktokOutputEvent $event): void
    {
        $output = $event->getOutput();
        $output = str_replace('src', 'data-src', $output);
        $event->setOutput($output);
    }
}

3.2 Backend Preview

In the backend, the preview is used by TextMediaRenderer. For online media, this only displays the provider's icon, in this case tiktok. If you want to display the thumbnail, for example, you need your own renderer that overwrites Textmedia. An example renderer is available in the project. Caution: This overwrites all text media elements, so only use this renderer as a basis.

You register a renderer in the TCA Configuration/TCA/Overrides/tt_content.php with $GLOBALS['TCA']['tt_content']['types']['textmedia']['previewRenderer'] = \Ayacoo\Tiktok\Rendering\TiktokPreviewRenderer::class;

Documentation: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/ContentElements/CustomBackendPreview.html

3.3 Content security policy

By default, CSP settings are added for the frontend and backend. These settings can be modified via YAML or events.

Take a look at the current documentation: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/ContentSecurityPolicy/Index.html

4 Administration corner

4.1 Versions and support

Tiktok TYPO3 PHP Support / Development
4.x 14.x 8.2 - 8.5 features, bugfixes, security updates
3.x 13.x 8.2 - 8.5 bugfixes, security updates
2.x 12.x 8.1 - 8.4 bugfixes, security updates
1.x 10.x - 11.x 7.4 - 8.0 security updates

4.2 Release Management

tiktok uses semantic versioning, which means, that

  • bugfix updates (e.g. 1.0.0 => 1.0.1) just includes small bugfixes or security relevant stuff without breaking changes,
  • minor updates (e.g. 1.0.0 => 1.1.0) includes new features and smaller tasks without breaking changes,
  • and major updates (e.g. 1.0.0 => 2.0.0) breaking changes which can be refactorings, features or bugfixes.

4.3 Contribution

Pull Requests are gladly welcome! Nevertheless please don't forget to add an issue and connect it to your pull requests. This is very helpful to understand what kind of issue the PR is going to solve.

Bugfixes: Please describe what kind of bug your fix solve and give us feedback how to reproduce the issue. We're going to accept only bugfixes if we can reproduce the issue.

5 Thanks / Notices

  • Special thanks to Georg Ringer and his news extension. A good template to build a TYPO3 extension. Here, for example, the structure of README.md is used.
  • Thanks also to b13 for the online-media-updater extension. Parts of it were allowed to be included in this extension.

6 Support

If you are happy with the extension and would like to support it in any way, I would appreciate the support of social institutions.

ayacoo/tiktok 适用场景与选型建议

ayacoo/tiktok 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.69k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 12 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 ayacoo/tiktok 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2021-12-30