[WordPress] 外掛分享: WP-Auto Image Grabber

前言介紹

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

外掛協作開發者

meitar |

外掛標籤

images | automation |

內容簡介

插入一個連結至某個網頁的圖片於部落格文章開始位置。一個簡單的演算法會試著取得「主題內容」的圖片(而不是廣告),並自動提供相關屬性的圖片,為文章增添意義。這特別對於將文章轉發至 Facebook 或 Digg 等網站的部落客非常有用,這些網站會使用文章中的第一幅圖片作為縮圖。

此外掛需要 PHP 5,使用 PHP 4 的網站會造成嚴重錯誤。

預設情況下,此掛件會依據您部落格文章中的第一個連結與該連結中預期適當的主題內容圖片。如果您的文章遵循特定的結構或模式,您可以透過設定 Pointer element for destination page 欄位來告訴掛件要遵循某個連結(例如某個特定 class 的連結)。

例如,以下 XPath 查詢會匹配第一個 grab-me class 連結:

//a[@class="grab-me"][1]

以下 XPath 查詢會匹配您的文章中最後一段裡的第一個連結:

//p[position()=last()]/a[1]

如需更多 XPath(以及 XQuery)語法範例,請參考 W3C 的 XPath 規格。如果您是一名開發人員,您也可以找到幾個XPath 工具會很有幫助。

此外,此掛件允許您在 元素上設置自訂的 class 值,只要在 Image class value 欄位中設置即可。為了確保最大的相容性,建議使用大多數佈景主題都會使用的 WordPress 產生的 class 之一。例如,使用 alignright 將會讓自動加入的圖片靠右對齊。
此掛件使用 PHP5 的 DOMDocument 方法來解析您的文章以及遠端網頁。它使用 XPath 來查詢 DOM。

原文外掛簡介

Inserts an image from a page you link to at the start of your blog post. A simple algorithm tries to get a “main content” image (rather than an advertisement), automatically providing your post with relevant, attributed artwork. This is especially useful for bloggers who syndicate posts to sites like Facebook or Digg, which use the first image in a post as a thumbnail for their post.
This plugin requires PHP 5; sites running on PHP 4 will produce fatal errors.
By default, the plugin will follow the first link in your blog post and grab what it thinks is an appropriate main content image from there. If your posts follow a particular structure or pattern, you can tell the plugin to follow a certain link (such as a link with a particular class) by setting the Pointer element for destination page value to an XPath query that returns the link you want.
For instance, the following XPath query will match the first link with a class of grab-me:
//a[@class="grab-me"][1]

Here’s an XPath query that will match the first link within the very last paragraph of your post:
//p[position()=last()]/a[1]

For more XPath (and XQuery) syntax examples, refer to the XPath specification at the W3C. If you’re a developer, you may also find several XPath tools helpful.
Additionally, this plugin allows you to set a custom class value on the element that it adds to your post by specifying it in the Image class value setting. For maximum compatibility, consider using one of the WordPress-generated classes most themes utilize. For instance, using alignright will probably make the automatically-added image float to the right.
This plugin uses PHP5’s DOMDocument methods to parse both your post and the remote page. It uses XPath to query the DOM.

各版本下載點

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

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


最新版本

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

  • Autoptimize 》Autoptimize 能夠輕鬆優化您的網站。它可以整合、縮小和快取腳本和樣式表,在默認情況下向頁面 head 中注入 CSS,但也可以內嵌關鍵 CSS 並延遲整合的完整 CSS...。
  • WebP Express 》ch means less bandwidth usage and faster page load times., Easy to use - with little effort, WordPress site admins can have their site serving auto...。
  • Recent Posts Widget With Thumbnails 》列出最新的文章標題、縮略圖、摘要、作者、類別、日期等等!, 雖然此外掛僅建立在小工具區域,但使用者報告說它在 Elementor 和 Oxygen 上運作順暢。但它是否...。
  • Modern Image Formats 》外掛介紹:此外掛可在 WordPress 應用程式中增加 WebP 支援,但僅針對新上傳的影像檔案轉換成 WebP 格式,現有檔案不會轉換。預設情況下,WebP 只會針對 JPEG...。
  • Responsive Lightbox & Gallery 》提供完整的 WordPress 相簿外掛所需一切, Responsive Lightbox and Gallery 外掛是一個全功能的 WordPress 相簿外掛,擁有強大的拖放相簿生成器和 Lightbox ...。
  • Lightbox & Modal Popup WordPress Plugin – FooBox 》FooBox是第一個嚴肅考慮響應式佈局的燈箱。它不僅會將圖片縮放以在手機上呈現更好的效果,還會重新排列按鈕控制,使其在縱向或橫向的方向上都展現出色的外觀...。
  • Media Cleaner: Clean your WordPress! 》Media Cleaner 是一個強大的外掛,它可以幫助你清理 WordPress 媒體庫中未使用的媒體條目和文件,以及修復損壞的條目。內置回收站功能讓你可以在永久刪除之前...。
  • Media Library Assistant 》媒體庫助手提供多個增強功能,方便管理媒體庫,其中包括:, , , , [mla_gallery] 短碼,在文章、頁面或自訂文章類型中使用,添加圖片和/或其他媒體庫項目(...。
  • Image Placeholders 》總結:, 這個外掛可以在WordPress的媒體庫中確定並儲存新上傳圖片的主要顏色,並且利用它在前端建立一個相應顏色的佔位背景,在圖片加載之前可見。, , 問題與...。
  • Image Watermark 》Image Watermark 外掛能讓您自動給 WordPress 媒體庫上傳的圖片打上浮水印,也可大量添加浮水印到之前上傳的圖片之中。, 欲進一步瞭解,請前往dFactory的外掛...。
  • FancyBox for WordPress 》本外掛能讓FancyBox輕鬆整合到您的部落格:上傳,啟用,完成。您也能選擇進行更多的設置。, 您幾乎可以對Fancybox lightbox的所有屬性進行自定義:邊框、邊緣...。
  • Crop-Thumbnails 》此外掛提供調整裁切圖像的裁切區域功能。它會在編輯頁面和媒體對話框中添加按鈕,以便進入裁剪編輯器。, 在裁剪編輯器中,您可以選擇一個或多個(如果它們具...。
  • Clean Image Filenames 》這個外掛可以在您上傳至媒體庫時自動將檔名中的語言重音符號轉換。轉換後的字符將會變成網頁和伺服器友好、無語言重音的字元。, 功能, , 將瑞典語、丹麥語、...。
  • Enhanced Responsive Images 》這個外掛程式實現了將 sizes="auto" 加入到懶加載圖片的 HTML 規格。, 相關背景資訊請參考:https://github.com/whatwg/html/issues/4654。, , 問...。
  • Optimus – WordPress Image Optimizer 》WordPress圖片優化器, Optimus可自動降低已上傳媒體檔案的檔案大小。根據圖片和格式,可以減少高達70%的大小。每張圖片可以節省數千位元組,這些節省可以對博...。

文章
Filter
Apply Filters
Mastodon