[WordPress] 外掛分享: Embed Google Photos album

首頁外掛目錄 › Embed Google Photos album
WordPress 外掛 Embed Google Photos album 的封面圖片
4,000+
安裝啟用
★★★★
4.4/5 分(15 則評價)
730 天前
最後更新
問題解決
WordPress 5.0+ PHP 5.3+ v2.2.1 上架:2018-03-09

內容簡介

這個外掛需要使用共享的 Google Photos 相簿連結才能使用相簿或輪播功能查看相片。這個小工具是免費提供給 WordPress 使用者使用的。

使用方法相當簡單,只需在您的文章中編寫短代碼並將共享的 Google Photos 相簿連結作為參數包含在內。插入的將不是短代碼,而是具有連結到相片並使用公共相簿 JavaScript 裝飾的 HTML 代碼。

範例

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" mode="carousel"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" mediaitems-cover="true"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" background-color="#007acc"]

link – [string] Google Photos 的公開連結
mode – [carousel | gallery-player] 裝飾模式,預設 ID 為 gallery-player
width – [int | ‘auto’] 小工具寬度,像素或“auto”以拉伸到100%
height – [int | ‘auto’] 小工具高度,像素或“auto”以拉伸到100%
image-width – [int] 圖像最大寬度,像素,默認為1920
image-height – [int] 圖像最大高度,像素,默認為1080
autoplay – [true | false] 開始簡報(當前裝飾程序不允許)
delay – [true | false] 簡報延遲秒數,預設為5秒
repeat – [true | false] 啟用或禁用重複簡報,默認是true
mediaitems-aspectration – [true | false],保持圖像比例,預設為true
mediaitems-enlarge – [true | false],打開/關閉圖像放大,預設為true
mediaitems-stretch – [true | false],打開/關閉圖像拉伸,預設為true
mediaitems-cover – [true | false],將圖像完整覆蓋,結合比例參數。默認是false
background-color – [#RRGGBB | transparent],設置背景顏色為 RGB 或透明。默認是 #000000
expiration – [int] 設置過期超時(以秒為單位); 默認為0;最小自訂值為86400秒(實驗性屬性)

這個小工具並不支援某些功能,例如圖片的時間戳和說明。有關該元件的更詳細說明,請參閱WordPress Google Photos 相簿外掛。

在某些情況下,直接在模板中使用以下代碼可能更好。

<?php
echo (new Pavex_embed_google_photos_album())->getcode(
'https://photos.app.goo.gl/CSV7NDstShTUwUZq5', 0, 480, 1920, 1080
);
?>

如何更新我的相簿?

只要您保存或更新文章,相簿就會自動更新。

Javascript 裝飾程序

外部 JavaScript 裝飾程序存儲在 CDN 上,並且其載入和執行已經過優化以提高性能。

JavaScript 小工具可以在不從 Google 相簿中使用照片的情況下使用。有關如何使用 JavaScript 的詳細信息,請參閱博客文章中有關輪播廊簾小工具的更新的其中一個較早的文章。

關於 Public Album 相片共享網站

Public Album 是相片共享網站。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Embed Google Photos album」→ 直接安裝(推薦)

原文外掛簡介

This plugin requires a shared Google Photos album link to view photos using gallery/player or carousel. This widget is free to use for WordPress users.
It is very easy to use. Just write a shortcode to your post and include a link of shared Google Photos album as a parameter. Instead of shortcode, html code with links to the photo will be inserted and it will be decorated using Public album javascript.
Example
[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" mode="carousel"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" mediaitems-cover="true"]

[embed-google-photos-album link="https://photos.app.goo.gl/CSV7NDstShTUwUZq5" background-color="#007acc"]

link – [string] public link of Google Photos album
mode – [carousel | gallery-player] setup decorator mode, default id gallery-player
width – [int | ‘auto’] set widget width in pixel or “auto” to stretch to 100%
height – [int | ‘auto’] set widget height in pixels or “auto” to stretch to 100%
image-width – [int] image max-width in pixels, default is 1920
image-height – [int] image max-height in pixels, default is 1080
autoplay – [true | false] start slideshow in normal view (currently not allowed by decorator)
delay – [true | false] slideshow delay in seconds, default is 5 seconds.
repeat – [true | false] Enable or disable repeat slideshow, delfault is true
mediaitems-aspectration – [true | false], Keep asspect ration of images delfault is true
mediaitems-enlarge – [true | false], Turn on/off image enlarge, delfault is true
mediaitems-stretch – [true | false], Tunr on/off image stretch, delfault is true
mediaitems-cover – [true | false], Cover full canvas. Combine with aspect ratio parameter. Delfault is false
background-color – [#RRGGBB | transparent], Setup background color to RGB or transparent. Default is #000000
expiration – [int] setup expiration timeout in secons; default is 0; min. custom value is 86400s (experimental property)

This widget, unsupported some features like a picture’s timestamp and captions. For a more detailed description of the component, go to WordPress Google Photos album plugin.
In some cases, it may be better to use the following code directly in the template.
getcode(
'https://photos.app.goo.gl/CSV7NDstShTUwUZq5', 0, 480, 1920, 1080
);
?>

How do I update my album?
The album will update automatically as soon as you save or update your post.
Javascript decorator
External javascript decorator is stored on CDN and loading and running of them is optimized for performance.
Javascript widget can be used without photos from Google photos. Detailed information on how to use javascript is available in one of older posts about carusel slideshow on my blog.
About Public album photo sharing website
Public album is now a photo sharing website and service for sharing short photosets available in single user profile.
The service can also be used as an alternative to public Google Photos. It is very suitable for the blogs focused mainly on photos. For example, a photoblog or a online bookmark manager.
Important links

Public album sharing website https://www.publicalbum.org
Blog https://www.publicalbum.org/blog
Facebook https://www.facebook.com/publicalbumapp
Reabr.com online bookmark manager

文章
Filter
Mastodon