定制 coldtrick/oembed 二次开发

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

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

coldtrick/oembed

最新稳定版本:v5.1.1

Composer 安装命令:

composer require coldtrick/oembed

包简介

Provides oEmbed support for URLs in text

关键字:

README 文档

README

Elgg 5.0 Elgg 6.0 Lint Checks Latest Stable Version License

Provides oEmbed support for URLs in text

Features

  • This plugin tries to replace URLs in output/longtext with embed code. For example if you paste a YouTube URL it will be replaced by the embed code for that URL.
  • Nothing is done to the original text, so if the plugin is disabled all original links are still present.
  • In order to control which URLs should be replaced there is a plugin setting for a whitelist and a blacklist. If the whitelist is set only those URLs will be replaced and the blacklist is ignored. If only the blacklist is set, every URL except those on the blacklist will be replaced.

Caching

The results of the oEmbed requests is cached in system cache. This is to increase performance and reusability. If the cache is flushed requests will be made again.

Developers

Prevent oEmbed

In order to prevent the use of oEmbed on your use of output/longtext set a var 'oembed' => false.

Modifying valid URL

Before an oEmbed adapter is created based on a valid URL an event is triggered. This allows last minute changes to the URL (eg. adding validation tokens). The event is replace_url, oembed. The return value should be a URL. in the $params you get the original url under url.

Output views

To change the output of the oEmbed code the different types have their own view oembed/type/{$oembed_type}.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2017-03-08