[WordPress] 外掛分享: Flickr Shortcode Importer

WordPress 外掛 Flickr Shortcode Importer 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Flickr Shortcode Importer」是 2011-08-10 上架。
  • 目前有 80 個安裝啟用數。
  • 上一次更新是 2017-02-07,距離現在已有 3008 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.9.2 以上版本才可以安裝。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

comprock | saurabhd | subharanjan |

外掛標籤

image | photo | flickr | import | featured image |

內容簡介

Flickr 短代碼匯入器可以匯入 [flickr]、[flickrset]、[flickr-gallery] 短代碼和來自 Flickr 的 A/IMG 標記媒體到媒體庫中。此外,它可以將貼文內容中的 [flickr] 短代碼轉換為連結,其中包含基於媒體庫的相應大小和對齊方式的圖像。匯入可以直接從編輯頁面和貼文畫面運行。

在貼文內容中找到的第一個 [flickr] 圖像被設置為貼文的特色圖片並從貼文內容中刪除。然後,其餘的 [flickr] 短代碼被轉換為圖像連結到其附件頁面。

[flickrset] 和 [flickr-gallery] 短代碼在 Flickr 套裝圖像被添加到媒體庫後轉換為 。如果在設定中勾選了「設置特色圖片」,則會使用 [flickrset] 的第一張圖像作為特色圖片。

來自 Flickr 的 A/IMG 標記媒體將轉換為 [flickr],然後按照正常程序進行匯入,很適合將您一直在使用的所有媒體項目,但現在 Flickr 提供「圖像不可用」的情況下,帶進您的 Media Library 中。在處理 IMG 之前處理 A/IMG 標記以防止意外結果。

如果啟用設定,可以添加圖像歸屬鏈接。此外,此外掛還很方便地過渡到您自己的媒體庫,因為您有 CDN 服務,或者想要遠離第三方軟件,但之前一直使用 wordpress-flickr-manager 和 flickr-gallery。

此外掛主要功能包括:

- API
- 自動為新插入的圖庫短代碼添加媒體 ID
- 匯入衍生自 Flickr 的 A/IMG 標記媒體到 WordPress
- 匯入 [flickr] 短代碼的媒體,並將其轉換為本地託管的 A/IMG 標記
- 匯入 [flickrset] 和 [flickr-gallery] 短代碼的媒體,並轉換為 。
- 設定導出和匯入功能
- 設定畫面

處理的短代碼和媒體樣例有:

- [flickr size=”small” float=”left”]http://www.flickr.com/photos/dancoulter/2619594365/[/flickr] (圖像)
- [flickr height=”300″ width=”400″]http://www.flickr.com/photos/dancoulter/2422361554/[/flickr] (視頻)
- [flickr id=”5348222727″ thumbnail=”small” overlay=”false” size=”large” group=”” align=”none”]
- [flickrset id=”72157631107721746″ thumbnail=”small” photos=”” overlay=”true” size=”large”]
- [flickr-gallery mode=”photoset” photoset=”72157626302265777″]
- [flickr-gallery mode=”tag” tags=”foo,bar” tag_mode=”all”]
- [flickr-gallery mode=”interesting”]
- [flickr-gallery mode=”recent”]
- [flickr-gallery mode=”search” tags=”barcamp” group_id=”431412@N25″]
- Khan Sao Road, Bangkok, Thailand
- Khan Sao Road, Bangkok, Thailand

設定選項包括:

- 匯入設定
- 跳過匯入影片
- 演示屏幕

原文外掛簡介

Flickr Shortcode Importer imports [flickr], [flickrset], [flickr-gallery] shortcode and Flickr-sourced A/IMG tagged media into the Media Library. Furthermore, it transforms the post content [flickr] shortcodes into links containing the Media Library based image of the proper size and alignment.
Import can be run directly from edit page and post screens.
The first [flickr] image found in post content is set as the post’s Featured Image and removed from the post content. The remaining [flickr] shortcodes are then transformed as image links to their attachment page.
[flickrset] and [flickr-gallery] shortcodes are converted to [ gallery] after the Flickr set images have been added to the Media Library. If ‘Set Featured Image’ is checked in Options, then the first image of the [flickrset] is used as such.
Flickr-sourced A/IMG tagged media is converted into [flickr] and then imported as normal. Great for finally bringing into your control all of those media items you’ve been using, but now Flickr is giving you ‘Image is unavailable’ for. A/IMG tag is processed before IMG to prevent unexpected results.
Image attribution links can be added if enabled via Settings.
This plugin is handy for transitioning from plugin wordpress-flickr-manager and flickr-gallery to your own Media Library because you have CDN services or want to move off of third party software.
There is no restore functionality. Backup beforehand or be prepared to revert every transformed post by hand via the post revision tool.
Primary Features

API
Automatically adds media ids to newly inserted gallery shortcodes
Flickr-sourced A/IMG tagged media imported into WordPress
Media of [flick] shortcodes are imported and converted to locally hosted A/IMG
Media of [flickrset] and [flickr-gallery] shortcodes are imported and converted to [ gallery]
Settings export/import
Settings screen

Handled shortcode & media samples

[flickr size=”small” float=”left”]http://www.flickr.com/photos/dancoulter/2619594365/[/flickr] (image)
[flickr height=”300″ width=”400″]http://www.flickr.com/photos/dancoulter/2422361554/[/flickr] (video)
[flickr id=”5348222727″ thumbnail=”small” overlay=”false” size=”large” group=”” align=”none”]
[flickrset id=”72157631107721746″ thumbnail=”small” photos=”” overlay=”true” size=”large”]
[flickr-gallery mode=”photoset” photoset=”72157626302265777″]
[flickr-gallery mode=”tag” tags=”foo,bar” tag_mode=”all”]
[flickr-gallery mode=”interesting”]
[flickr-gallery mode=”recent”]
[flickr-gallery mode=”search” tags=”barcamp” group_id=”431412@N25″]
Khan Sao Road, Bangkok, Thailand
Khan Sao Road, Bangkok, Thailand

Settings Options
Import Settings

Skip Importing Videos – Importing videos from Flickr often fails. Shortcode is still converted to object/embed linking to Flickr.
Import Flickr-sourced A/IMG tags – Converts Flickr-sourced A/IMG tags to [flickr] and then proceeds with import.
Set Featured Image – Set the first [flickr] or [flickrset] image found as the Featured Image. Will not replace the current Featured Image of a post.
Force Set Featured Image – Set the Featured Image even if one already exists for a post.
Remove First Flickr Shortcode – Removes the first [flickr] from post content. If you use Featured Images as header or lead images, then this might prevent duplicate images in your post.
Make Nice Image Title? – Try to make a nice title if none is set. For Flickr set images, Flickr set title plus a numeric suffix is applied.
Replace Filename with Image Title? – Mainly for SEO purposes. This setting replaces the imported media filename with the media’s title. For non-images, this is always done.
Image Import Size – Size of image to import into media library from Flickr. If requested size doesn’t exist, then original is imported because it’s the closest to the requested import size.
Default Image Alignment – Default alignment of image displayed in post when no alignment is found.
Default Image Size – Default size of image displayed in post when no size is found.
Default A Tag Class – Inserts a class into links around imported images. Useful for lightbox’ing.
Link Image to Attachment Page? – If set, post single view images are linked to attachment pages. Otherwise the image links to its source file.
Image Wrap Class – If set, a span tag is wrapped around the image with the given class. Also wraps attribution if enabled. e.g. Providing flickr-image results in |
Set Captions – Uses media title as the caption.
Set Descriptions – Include Flickr descriptions in media information.
Include Flickr Author Attribution? – Appends Flickr username, linked back to Flickr image to the imported Flickr image.
Flickr Author Attribution Text
Flickr Author Attribution Wrap Class – If set, a span tag is wrapped around the attribution with the given class. e.g. Providing flickr-attribution results in |
Add Flickr Link in Description? – Like Include Flickr Author Attribution but appends the image description.
Flickr Link Text
Add Image License to Description? – Append image license and link to image description.
Flickr Image License Text

Posts Selection

Posts to Import – A CSV list of post ids to import, like ‘1,2,3’.
Skip Importing Posts – A CSV list of post ids not to import, like ‘1,2,3’.

Testing Options

Import Limit – Useful for testing import on a limited amount of posts. 0 or blank means unlimited.
Debug Mode – Bypass Ajax controller to handle posts_to_import directly for testing purposes.

Post Options

Post [flickr] Import Widget? – Minimum role to enable for [flickr] Import wi
dget on posts and page edit screens.
Enable for Pages
Enable for Posts
Enable for Media
Enable for custom post types – if any

Flickr API

Flickr API Key – Flickr API Documentation
Flickr API Secret
Flickr User ID – For Flickr Gallery plugin. Example: 90901451@N00
Images Per Page – For Flickr Gallery plugin.

Reset

Reimport Flickr Source Images – Needed when changing the Flickr image import size from prior imports.
Export Settings – These are your current settings in a serialized format. Copy the contents to make a backup of your settings.
Import Settings – Paste new serialized settings here to overwrite your current configuration.
Remove Plugin Data on Deletion? – Delete all Flickr Shortcode Importer data and options from database on plugin deletion
Reset to Defaults? – Check this box to reset options to their defaults

Notes

Backup your database before importing. You can use revision to revert individual posts, but doing so in mass is a major PITA.
During my own imports, a post with one [flickr] entry could take a minute. Then posts with many [flickr] entries, several Flickr-source’d A/IMG tags and [flickset] with 30 or so photos took over 10-minutes to import.
During import, it might look like nothing is happening. The progress bar only moves after each import succeeds or fails.
I recommend setting the limit in options to 1 and then testing your installation. That sure makes for easier recovery in case something goes wrong. If something doesn’t work, report it, https://wordpress.org/extend/plugins/flickr-shortcode-importer/.
It’s strongly recommended to deactivate plugins like WordSocial, WP Smush.it and similar to prevent extended import times. You can always enable them and run them enmasse later.
Make sure you have enough disk space. Figure on about 1 GB per 1,000 photos given your using Scissors-continued and have a maximum image size of 1280 x 1024. If your images can be larger, then you’ll probably need 1 GB per 250 photos imported.
Using your own Flickr API Key might be necessary. Test a single import and see the results before setting your own.

API

Read the Flickr Shortcode Importer API.

Localization
You can translate this plugin into your own language if it’s not done so already. The localization file flickr-shortcode-importer.pot can be found in the languages folder of this plugin. After translation, please send the localized file for plugin inclusion.
How do I localize?
Thank You

Thank you for tobylewis for his file_get_contents_curl and custom post types contributions.
A big thank you to Željko Aščić of http://www.touristplayground.com/ for feedback and ideas.
Initial code is modeled after Viper007Bond’s class based Regenerate Thumbnails plugin. The AJAX status and single auto-submission operations were a big help.
[flickr] shortcode handling code copied from Trent Gardner’s very fine Flickr Manager plugin.
Hat’s off to Alison Barret for her Settings API tutorials and class My_Theme_Options.

Current development by Axelerant.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Flickr Shortcode Importer」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.1.0 | 1.0.0 | 1.0.1 | 1.1.0 | 1.2.0 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.3.5 | 1.4.0 | 1.4.1 | 1.4.2 | 1.4.3 | 1.4.4 | 1.4.5 | 1.4.6 | 1.4.7 | 1.4.8 | 1.4.9 | 1.5.0 | 1.5.1 | 1.5.2 | 1.5.3 | 1.6.0 | 1.6.1 | 1.7.0 | 1.7.1 | 1.7.2 | 1.7.3 | 1.7.4 | 1.7.5 | 1.7.6 | 1.7.7 | 1.7.8 | 1.7.9 | 1.8.0 | 1.8.1 | 2.0.0 | 2.0.1 | 2.0.3 | 2.1.0 | 2.1.1 | 2.2.0 | 2.2.1 | 2.2.2 | 2.2.3 | trunk | 1.7.10 | 1.7.11 |

延伸相關外掛(你可能也想知道)

  • Image Optimization by Optimole – Lazy Load, CDN, Convert WebP & AVIF, Optimize Images 》, Optimole的獨特之處在哪裡?, , 更小的圖片,同樣的品質, 完全自動化;設定一次就忘記它, 支援所有圖片格式, 支援Retina和WebP圖片, 以機器學習為基礎的自...。
  • Imsanity 》使用 Imsanity,自動調整大型圖片上傳大小。選擇你喜歡的尺寸和品質,讓 Imsanity 完成其餘所有工作。當投稿者上傳大於配置尺寸的圖片時,Imsanity 將自動將...。
  • Firelight Lightbox 》Easy FancyBox WordPress外掛為您的網站提供靈活美觀的光箱解決方案,幾乎適用於網站上的所有媒體連結。Easy FancyBox使用更新的傳統FancyBox jQuery擴展版本...。
  • Simple Lightbox 》Simple Lightbox 是一個非常簡單且可自定義的燈箱,在您的 WordPress 網站上添加它非常容易。, 功能, 自定義燈箱行為的選項位於外觀 > Lightbox 管理員菜...。
  • Robin image optimizer — save money on image compression 》需要專業支援嗎?, 開始免費支援, 開始高級支援, 透過減少圖像大小,讓您的網站加快速度。我們的 WordPress 圖像優化外掛,可以將圖像大小減少80%,而且不損...。
  • Responsive Lightbox & Gallery 》提供完整的 WordPress 相簿外掛所需一切, Responsive Lightbox and Gallery 外掛是一個全功能的 WordPress 相簿外掛,擁有強大的拖放相簿生成器和 Lightbox ...。
  • reSmush.it : The original free image compressor and optimizer plugin 》reSmush.it Image Optimizer 是一個 WordPress 外掛,透過 reSmush.it API 提供圖片優化服務。reSmush.it 使用多種高級演算法對圖像進行大小減小。API 支援最...。
  • Menu Image, Icons made easy 》這個外掛可以輕鬆地在選單項目中加入圖像或圖示,打造更好的網站選單。, 可以控制圖像或圖示的位置以及大小。, 這個 Menu Image 外掛還有其他功能,以下是其...。
  • Image Widget 》Image Widget 是一個簡單的外掛程式,利用 WordPress 原生媒體管理員,為您的網站新增圖片小工具。, 需要新增幻燈片、燈箱或隨機圖像嗎?, 請查看 Image Widg...。
  • Featured Image from URL (FIFU) 》h3>WordPress 外掛 - 用於顯示外部特色圖片、影片、音訊等等, FIFU 自 2015 年來已幫助全球數千個網站節省了儲存空間、處理時間和版權費用。, 如果您已經厭倦...。
  • Default Featured Image 》在媒體設定頁面上新增一個預設的特色圖像。如果沒有設定任何特色圖像,這個預設的特色圖像就會顯示。就這麼簡單。, 查看常見問題以獲取基本問題資訊。, 如果...。
  • All In One Favicon 》查看最新的WordPress交易以優化您的網站。, All In One Favicon為您的網站和管理頁面添加favicon。, 您可以使用您已經上傳的favicon或使用內置的上傳機制將fa...。
  • ImageMagick Engine 》透過讓 WordPress 使用 ImageMagick 而非標準的 GD 圖像庫,大幅提升重新調整大小的圖像品質。, 功能, , 在重新調整大小的圖像中保留嵌入式色彩設定檔, 自動...。
  • WP Featherlight – A Simple jQuery Lightbox 》WP Featherlight 是一個 WordPress 外掛,可為您的WordPress 網站添加一個極簡、高效、響應式 jQuery 燈箱。在其核心,WP Featherlight是一個用於 Featherlig...。
  • Phoenix Media Rename 》通過使用「Phoenix Media Rename」外掛,將您的媒體檔案重新命名,極大地提高您的 SEO。, 在Phoenix Media Rename 官方頁面上提供了完整的使用和設置指南。。

文章
Filter
Apply Filters
Mastodon