內容簡介
e4>Upgrade to the full version of the Nice YouTube plugin.
使用 Nice YouTube Lite 外掛,可以輕鬆方便地將 YouTube 影片播放器添加到文章、頁面和側邊欄小工具中,是最簡單方便的方法!
無論您想顯示一個或多個 YouTube 影片,Nice Youtube Lite 外掛都可以將任何 WordPress 文章、頁面或側邊欄小工具變為影片體驗。不需要花時間於繁瑣的嵌入代碼,Nice Youtube Lite 的實現快捷、靈活且易於使用。只需在想要顯示 YouTube 影片播放器的地方輸入 Nice Youtube Lite 的 shortcode,您就可以使用了!
例如:
[niceyoutubelite id=”UXtjrb0WBhc”]
一些很酷的特點:
在文章、頁面或側邊欄小工具中輕鬆添加 YouTube 影片。
支援在同一文章、頁面或側邊欄小工具中顯示多個 YouTube 影片。
設置 YouTube 影片播放器的預設寬度。
設置 YouTube 影片播放器的預設寬高比。
根據寬度設置自動計算 YouTube 影片播放器的高度。
支援選擇每個 YouTube 影片播放器的寬度設置。
支援選擇每個 YouTube 影片播放器的寬高比自定義。
包括方便的管理設置頁面,可輕鬆進行配置。
包括強大的 shortcode Youtube 播放器放置功能。
文件
基本用法
使用起來非常簡單。創建一個新的文章、頁面或文本小工具,將內容添加到其中。在需要顯示 YouTube 影片的地方包含一個 Nice YouTube shortcode,如以下示例。當您查看您發佈的文章、頁面或小工具時,該 shortcode 將自動替換為相應的 YouTube 影片。
短代碼示例
[niceyoutubelite id="UXtjrb0WBhc"]
注意,id 是您的影片的 YouTube 影片 id。
短代碼語法
[niceyoutubelite attribute_name=”attribute_value”]
短代碼屬性
Nice Youtube Lite 插件通過包含 3 個短代碼屬性提供選項。這些屬性如下所示。
id
width
aspect_ratio
可以在短代碼中通過包含屬性名稱,後跟等號和帶引號的屬性值來設置每個屬性。您可以在管理設置頁面上為所有屬性(除了 "id")設置默認值。
屬性示例
[niceyoutubelite id="UXtjrb0WBhc" width="320"]
短代碼屬性定義
id
[niceyoutubelite id=”YouTube_Video_Id”]
設置您要顯示的 YouTube 影片的影片 ID。當您在 YouTube 上觀看影片時,您的瀏覽器地址欄會顯示 YouTube 影片 id。要獲取 video id,請前往您的 YouTube video manager,然後播放您的 video。查看您的瀏覽器地址欄。您將看到一個網址,看起來像下面這樣。
網址 "v=" 之後的部分是影片 ID。
示例
[niceyoutubelite id="UXtjrb0WBhc"]
注意,id 值與 YouTube 影片 URI 的 "v=" 部分之後的值相同。
width
[niceyoutubelite width=”640″]
使用 width 設置 YouTube 影片播放器寬度。
aspect_ratio
[nic
外掛標籤
開發者團隊
原文外掛簡介
Upgrade to the full version of the Nice YouTube plugin.
Get the easiest and most convenient way to add a YouTube video player to posts, pages and sidebar widgets with Nice YouTube Lite plugin!
Whether you want to display one YouTube video or many YouTube videos, the Nice Youtube Lite plugin makes it easy to turn any WordPress post, page or sidebar widget into a video experience. No need to horse around with complicated embed codes, the Nice Youtube Lite’s implementation is quick, flexible and easy to use. Simply enter the Nice Youtube Lite shortcode where you want your YouTube video player to appear and you’re all set!
Example:
[niceyoutubelite id=”UXtjrb0WBhc”]
Some cool features:
Easily add YouTube videos anywhere in a post, page or sidebar widget.
Supports multiple YouTube videos per post, page or sidebar widget.
Set the default YouTube video player width.
Set the default YouTube video player aspect ration.
Automatically calculates YouTube video player height based on width setting.
Supports an optional per YouTube video player width setting.
Supports optional per YouTube video player aspect ratio customization.
Includes convenient admin settings page for easy configuration.
Includes powerful shortcode Youtube player placement.
Documentation
Basic Usage
Usage is simple. Create a new post, page or text widget add your content to it. Wherever you want a YouTube video to appear include a Nice YouTube shortcode, like the following example. When you view your published post, page or widget the shortcode will be automatically replaced with a corresponding YouTube video.
Shortcode Example
[niceyoutubelite id="UXtjrb0WBhc"]
Note, id is the YouTube video id of your video.
Shortcode Syntax
[niceyoutubelite attribute_name=”attribute_value”]
Shortcode Attributes
The Nice Youtube Lite plugin provides options through the inclusion of 3 shortcode attributes. These attributes are as follows.
id
width
aspect_ratio
Each attribute can be set in the shortcode by including the attribute name followed by an equals sign and the attribute value in quotes. You can set a default value for all of the attribute, excluding the video “id”, on the admin settings page.
Attribute Example
[niceyoutubelite id="UXtjrb0WBhc" width="320"]
Shortcode Attribute Definitions
id
[niceyoutubelite id=”YouTube_Video_Id”]
Sets the video id for the YouTube video you wish to display. The YouTube video id is displayed in your browsers address bar when you are watching a video on YouTube. To obtain the video id, go to your video manager on YouTube and simply play your video. Look at your browser’s address bar. You will see a web address that looks like the following.
The portion of the address after the “v=” is the video id.
Example
[niceyoutubelite id="UXtjrb0WBhc"]
Notice that the id value is the same as the value that comes after the “v=” portion of the YouTube video URI.
width
[niceyoutubelite width=”640″]
Use width to set the YouTube video player width.
aspect_ratio
[niceyoutubelite aspect_ratio=”16:9″]
Set the YouTube video player’s aspect ratio with the aspect_ratio attribute. The default YouTube video aspect ratio is 16:9. Older videos probably have an aspect ratio of 4:3. The aspect ratio and width settings are used to automatically calculate the appropriate height for the YouTube video player.
Plugin Settings
The Nice Youtube Lite plugin allows you to configure the plugin’s global default settings. Configuration of the plugin is made quick and easy through the use of it’s admin settings page. You can find the settings page at WP-Admin>>Settings>>Nice Youtube Lite. The global default settings that are made available to you are as follows.
Default video width
Enter the default YouTube video embed width in pixels. This will be used for all videos that do not have a width set in their respective shortcodes.
Default video aspect ratio
Enter the YouTube player aspect ratio. This will be used to determine the height of the video player. YouTubes standard aspect ratio is 16:9. Older videos may have an aspect ratio of 4:3.
