[WordPress] 外掛分享: Lightweight YouTube Channel Widget

首頁外掛目錄 › Lightweight YouTube Channel Widget
WordPress 外掛 Lightweight YouTube Channel Widget 的封面圖片
10+
安裝啟用
尚無評分
4091 天前
最後更新
問題解決
WordPress 3.9.0+ v10.0 上架:2015-01-04

內容簡介

使用此外掛程式,當你想在你的網站側邊欄中顯示來自頻道或播放清單的最新 YouTube 影片時,就可以使用它。

此外掛程式是 Aleksandar Urošević 的 YouTube Channel 分支。這個外掛程式更輕巧,只有 YouTube Channel 的部分特色。

每個影片都只顯示縮圖,並且可以選擇顯示標題和/或描述。按一下縮圖會將使用者帶到 YouTube 上的影片頁面。這樣可以讓程式碼庫更小,且不需要額外的前端依賴。然而,原始外掛程式 YouTube Channel 依賴於幾個 JavaScript 函式庫(如 jQuery、FitVids.JS 和 Magnific Popup),這有可能使整個 WordPress 網站較慢而且使用不便。

特色

顯示來自 YouTube 頻道、收藏夾或播放清單的最新影片。
從上述資源中取得隨機影片的選項。
用縮圖來顯示影片。
按一下縮圖會將使用者帶到 YouTube 上的影片頁面。
自訂快取時間。

樣式

您可以使用主題中的 style.css 來為小工具的內容添加樣式。

.youtube_channel - 主要小工具包裝器類別(非響應式塊有額外的 default 類別,響應式塊有額外的 responsive 類別)。
.ytc_title - 縮圖上的影片標題類別。
.ytc_video_container - 單個項目的容器包裝器類別。
.ytc_video_1, .ytc_video_2, ... - 單個項目的容器類別,其中數字是列表中項目的位置。
.ytc_video_first - 第一個項目的容器類別。
.ytc_video_last - 最後一個項目的容器類別。
.ytc_video_mid - 所有其他容器的類別。
.ytc_description - 影片描述文字的類別。

開發人員

完整的外掛程式原始碼可以在 Github 上找到,網址為
github.com/MaTachi/lightweight-youtube-channel-widget。

鳴謝

原始程式碼庫(版本2.4.1.3)由 Aleksandar Urošević 編寫,並根據 GPLv3 授權。

外掛標籤

開發者團隊

⬇ 下載最新版 (v10.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Lightweight YouTube Channel Widget」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Use this plugin when you want to display a list of recent YouTube videos from a
channel or playlist in your site’s sidebar.
This plugin is a fork of Aleksandar Urošević’s YouTube
Channel. This plugin is much
more lightweight and does only have a subset of YouTube Channel’s features.
The videos are each only presented with a thumbnail, and optionally also its
title and/or description. Clicking a thumbnail takes the user to the video’s
page on YouTube. This results in a much smaller codebase and no additional
front-end dependencies. The original plugin, YouTube Channel by Aleksandar
Urošević, on the other hand depends on several JavaScript libraries
(jQuery, FitVids.JS and
Magnific Popup), which
potentially makes the whole WordPress site both slower to load and use.
Features

Display latest videos from YouTube channel, favorites or playlist.
Option to get random videos from resources mentioned above.
The videos are displayed with a thumbnail.
Clicking a thumbnail takes the user to the video’s page on YouTube.
Custom caching timeout.

Styling
You can use the style.css from your theme to style the widget’s content.

.youtube_channel – Main widget wrapper class (non-responsive block has
additional class default, responsive block has additional class
responsive).
.ytc_title – Class of video title above thumbnail.
.ytc_video_container – Class of a single item’s container wrapper.
.ytc_video_1, .ytc_video_2, … – Class for the container of a single
item where the number is the item’s placement in the list.
.ytc_video_first – Class of the first item’s container.
.ytc_video_last – Class of the last item’s container.
.ytc_video_mid – Class of all other containers.
.ytc_description – Class for video description text.

Developer
The full source code of the plugin can be found on Github at
github.com/MaTachi/lightweight-youtube-channel-widget.
Credits

Original codebase (YouTube Channel version
2.4.1.3) is written by
Aleksandar Urošević and licensed under GPLv3.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon