[WordPress] 外掛分享: Video-Link-Gallery

首頁外掛目錄 › Video-Link-Gallery
WordPress 外掛 Video-Link-Gallery 的封面圖片
全新外掛
安裝啟用
尚無評分
2213 天前
最後更新
問題解決
WordPress 4.7+ PHP 7.1+ v1.0.2 上架:2020-02-24

內容簡介

這個外掛程式可以透過簡單地使用簡碼定義影片庫,自動建立 YouTube、Vimeo 影片或直接的影片檔案連結庫。
影片將會在燈箱中開啟。

預設使用 Dmitry Semenov 的 PhotoSwipe 燈箱。
(目前僅有此燈箱可供選擇)

這個外掛程式設計簡潔易懂,易於擴展。
* 「src/VideoProvider」是一個目錄,包含每個影片平台(如 YouTube 或 Vimeo)的 php 類別,並實現了一個類別介面。
* 「src/Lightbox」是一個目錄,包含每個燈箱的 php 類別,實現了一個類別介面。
* 「src/Shortcodes」是一個目錄,包含「[video-gallery]-簡碼」的定義,這是程式的核心,但是您不需要編輯此文件。

參數和特殊的影片平台

所有參數,包括一般參數和特定於影片平台的參數,都直接在 [[video-gallery]] 簡碼中設置。

一般

參數
說明
預設

燈箱
應該使用的燈箱類別的名稱
PhotoSwipe

YouTube

參數
說明
預設

yt_nocookie
使用 youtube-nocookie.com 而不是 youtube.com,以確保 GDPR(DSGVO)安全的影片連結
true

Vimeo

在 Vimeo 中,預覽圖片 URL 不使用影片 ID,因此需要透過 API 請求擷取預覽圖片 URL。
在這個 API 請求中,我們也可以獲得影片的原始標題。
因此,我們需要 php CURL 擴展程式。
縮圖將從 API 回應中獲取。
如果沒有手動設定的影片標題,影片平台類別也會自動使用 API 回應中的原始影片標題。

擴展程式

您可以輕鬆地擴展這個外掛程式,撰寫自己的影片平台或其他燈箱的類別,只需實現介面即可。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Video-Link-Gallery」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin creates a video-gallery for youtube- or vimeo-videos or direct video-file-links by simply defining the gallery with shortcodes.
The Videos will be opened in a lightbox.
By default the “PhotoSwipe“-Lightbox of Dmitry Semenov is used.
(at the moment it is the only one)
This plugin is really simple and clean designed to be easily extendable.
* there is a “src/VideoProvider”-directory where every Video-Platform (like youtube or vimeo) is defined in an own php-class implementing a class-interface.
* there is a “src/Lightbox”-directory where every lightbox is defined in an own php-class, implementing a class-interface
* there is a “src/Shortcodes”-directory where the “[video-gallery]”-Shortcode is defined – that is where the magic happenes – but there is no need to edit this file.
Parameters and video-provider-specific specials
All parameters – general parameters and also video-provider-specific parameters are set directly in the [[video-gallery]]-Shortcode.
general
parameter
description
default
lightbox
name of the lightbox-class that should be used
PhotoSwipe
Youtube
parameter
description
default
yt_nocookie
use youtube-nocookie.com instead of youtube.com in video-links to be GDPR(DSGVO)-save
true
Vimeo
In vimeo the preview-image-URL doesn’t use the video-ID – so you need to make an API-request to get the image-URL.
In this API-call we also get the original title of the video.
For this reason we need the php CURL extension.
The thumbnail will be taken from the API-response.
When no manual video-title is defined, the video-provider-class uses also the original video-title from API-response automaticly.
Extending the Plugin
You can easily extend the Plugin by writing your own classes for Video-Platforms or other Lightboxes – you just have to implement the Interfaces.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon