[WordPress] 外掛分享: Hosted Content Importer (HCI)

WordPress 外掛 Hosted Content Importer (HCI) 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Hosted Content Importer (HCI)」是 2016-04-16 上架。
  • 目前有 20 個安裝啟用數。
  • 上一次更新是 2020-12-05,距離現在已有 1611 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0.0 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

pbimal |

外掛標籤

Gist | embed | cached | content | external |

內容簡介

這個外掛可以將來自第三方網站的內容匯入 WordPress 博客中,你可以定義從哪個 URL/資源中獲取內容,原始內容可以被信任的任何其他使用者編輯。因此,你可以讓其他使用者對博客的特定部分進行外部編輯,並且不必提供他們任何網站訪問權限。

安裝後,可以使用簡短標籤[third],其中包含幾個參數,如下:

[third source="markdown" id="https://goo.gl/UpclKH" section=""]

source 是內容處理器的類型。
id 是第三方提供的 URL 或 ID。
section 是可選參數,用於存取更深層次的內容。
cache 是一個布林指令,指定是否重複使用緩存內容。

然後它會在你的博客中嵌入遠程線上資料,你可以使用Parsedown將其轉換為 HTML。

參數

source:數據來源(例如:內容托管服務器)。例如:

analytics: 已實現(Google Analytics)
file: 已實現(從本地文件讀取)
gist: 已實現(嵌入 gist 片段)
jotform: 已實現(嵌入 Web 表單)
markdown: 已實現(解析遠程markdown文件)
qr: 已實現

對於自定義數據,
對於當前頁面的 URL

youtube: 已實現(嵌入 YouTube 視頻)
database: 部分實現,留給開發人員實現
url, api: 正在進行中
wikipedia: 正在進行中,策略:將內容 JSON 轉換為數據區段

列表不限於以上,你可以擴展它,請加入或派生開發

id:所需資料的內容 ID(唯一識別符號),通常:

完整的 URL
資料庫 ID
由服務提供商提供的資源 ID,例如 YouTube 視頻 ID、JotForm 表單 ID,等等
本地文件的完整路徑

section: 用於識別特定內容部分的附加參數。

範例:解析遠程.md文件
[third source="markdown" id="https://goo.gl/UpclKH" section=""]

請學習如何編寫.md 文件。

範例:從 GitHub 嵌入 gist 代碼
[third source="gist" id="000000000000" section="filename.php"]

在 GitHub 上創建你自己的 gist。

範例:嵌入 JotForm 表單
[third source="jotform" id="000000000000" section=""]

在JotForm 網站上建立你自己的 Web 表單。

範例:讀取服務器的本地文件
[third source="file" id="/tmp/readme.txt" section=""]

基於安全理由,它必須是一個靜態文件。例如,如果你讀取 .php 文件,它不會處理它,而只是讀取其內容。它可以包含有效的 HTML 資料、css 和 javascripts。

範例:存取數據庫 - 自行擴展
[third source="database" id="0" section="recent"]

詳細實作留給開發人員,因為這是一個概念證明工作。請自由修改/擴展。

範例:自訂

原文外掛簡介

It imports third party hosted contents within WordPress blog. You can define from which url/resource to fetch the content. The original source may be editable by anyone else whom you trust. Thus, it logically empowers you to allow other users to externally edit a particular section of your blogs. And, you do not have to give them any access credentials of your website.
After installation, use shortcode tag [third] with few parameters as:
[third source="markdown" id="https://goo.gl/UpclKH" section=""]

source is a content processor type.
id is a URL or ID given by the third parties.
section is an optional parameter to access deeper content.
cache is a boolean directive whether to reuse the cached content.

It will then embed remote markdown content inside your blog.
Additionally, it will convert the text into HTML using Parsedown.
Parameters
source: Where to seek the data (eg. Content Hosting Server). Examples:

analytics: ✔ implemented (Google Analytics)
file: ✔ implemented (Read from local file)
gist: ✔ implemented (Embed Gist Snippets)
jotform: ✔ implemented (Embed Web Forms)
markdown: ✔ implemented (Parse remote markdown files)
qr: ✔ implemented

For Custom Data,
For current page’s URL

youtube: ✔ implemented (Embeds a YouTube Video)
database: Partially implemented, and left for developers
url, api: Work in progress
wikipedia: Work in progress, Strategy: Content JSON to Data Section

The list is not limited, you expand it. Join/Fork Development
id: Content ID (unique identifier) of the data you want. Often:

Full URLs
Database IDs
Resource IDs provided by Service Providers eg. YouTube Video ID, JotForm Form ID, …
Full Path of a Local File

section: Additional parameter to identify the specific section of the content.
Example: Parsing a remote .md file
[third source="markdown" id="https://goo.gl/UpclKH" section=""]

Learn to write your .md file.
Example: Embedding a gist code from GitHub
[third source="gist" id="000000000000" section="filename.php"]

Create your gists at GitHub.
Example: Embedding a JotForm
[third source="jotform" id="000000000000" section=""]

Create your own web form at JotForm website.
Example: Reading a server’s local file
[third source="file" id="/tmp/readme.txt" section=""]

It has to be a static file for security reasons. For example, if you read the .php file, it will NOT process it, rather read its contents only. Your can contain valid HTML data, css and javascripts.
Example: Accessing database – Expand it yourself
[third source="database" id="0" section="recent"]

Detailed implementations are left for the developers because of the nature. It is a proof of concept work. Please feel free to modify/expand it.
Example: Custom QR Code
[third source="qr" id="YOUR DATA" section=""]

Example: QR Code for Current Page (Full URL)
[third source="qr" id="url" section="internal"]

The above example is a full code. If you embed it anywhere, it lets your users copy that page’s URL into their mobile.
Example: Embedding a YouTube Video
[third source="youtube" id="v00000000000" section=""]

Choose your video from YouTube.
Personalized Content Processors
You may often consider writing your own Content Processor.
Refer to Custom Content Processor section in [Other Notes] tab.
Custom Content Processors
If you want to develop your own Content Processor, it is much easier now.
Just create a tiny class file inside classes/processors as like one of the existing one. Simple examples are YouTube, JotForm and Gist processors.
Minimum requirements

File name: class.processor_YOURNAME.inc.php
Method: public function fetch($form_id = null, $section = null).

Process your content.
Return HTML string.
For references, see class.processor_none.inc.php

Use as: [third source="YOURNAME" section=""]

Click for real examples.
Just that much easy drop-in replacement.
Banner Image
Used from unsplash.com

Cable Cars and Rope: Represents contents coming from various sources.

各版本下載點

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

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


1.0.0 | 2.0.0 | 2.0.1 | 2.0.2 |

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

  • Simple Iframe 》輕鬆地在區塊編輯器中插入 iframe。, 此外掛會在 Embeds 類別中新增一個 Iframe 區塊。, 只需拖曳 Simple Iframe 區塊,即可插入外部(或內部)URL。。
  • WooCommerce Cloak Affiliate Links 》WooCommerce Cloak Affiliate Links(WooCommerce 隱藏推廣連結)外掛可讓您在 WooCommerce 購物商店中遮蔽所有外部連結。, 例如,將此更改為:, merchan...。
  • GDPRess | Eliminate external requests to increase GDPR compliance 》2022年1月,德國法院判決一名網站擁有者違反了GDPR,因使用嵌入式的 Google Fonts,未事先獲得用戶的同意即傳輸用戶的個人數據(IP地址),需支付 100 歐元的...。
  • External Login 》External Login 外掛讓您可以使用「外部資料庫」登入 WordPress 網站,而不是使用 WordPress 資料庫。這意味著如果您已經有一個登入系統,您可以將其整合到 W...。
  • Archivarix External Images Importer 》Archivarix 外部圖片導入器將掃描您的文章和頁面中所有圖片標籤的 src / srcset 屬性的外部 URL。根據設置,它可以:, , 從其外部位置下載圖片, 從網際網路檔...。
  • Indicate External Links 》這是一個簡單且輕量的外掛,可在文章、頁面和自訂內容中顯示外部 http 和 https 連結,並在連結後面加上一個小的斜箭頭圖示,以提示使用者此為外部連結。, 使...。
  • Multiple external product URLs for WooCommerce 》這個外掛是 WooCommerce 的擴充功能。, 使用這個外掛可以創建多個外部/聯盟產品網址和按鈕文字。, 這個外掛會在外部/聯盟產品編輯表單上創建額外的字段,並提...。
  • Better WordPress External Links 》這個外掛可以完全掌控網站上的外部連結,同時還帶有全面的網域過濾功能。BWP External Links 基於 Ken F. Innes IV(Prime Halo)編寫的受歡迎的 Prime Links...。
  • Nofollow External Links (SEO) 》本外掛自動設置網站內容中所有外部連結為「nofollow」。, 符合 SEO 的原則。, 外掛功能:, 1)在後台啟用後,它會自動在內容中使用的外部連結中添加nofollow...。
  • External URL Featured Image 》這個外掛可以讓您使用外部圖片作為特色圖片,如果您的圖片存儲在其他位置,這將特別有用。, 這個外掛與Nelio External Featured Image Metadata相容,所以如...。
  • Easy External Links 》Easy External Links 是一個 WordPress 的 SEO 友好型外部連結管理外掛。, Easy External Links 目前的目標是標準化外部連結的格式,並創造一致的頁面 SEO。,...。
  • WC External Variations 》這個外掛為WooCommerce的變化 / 變動產品基本功能提供了基本支援,允許您在任何變化上定義外部URL,並當用戶點擊添加到購物車按鈕時打開該鏈接。因為使用Java...。
  • External url as post Featured Image (thumbnail) 》[✅ 由 Puvox 提供的安全插件]:, , • 為了安全而修訂,不會包含任何漏洞。 , • 高效,不會使網站增加負載或減慢速度。 , • 不會收集私人數據。, , 外掛...。
  • WP Autoset Featured Image Plus 》如果文章沒有設置特色圖片,WP Autoset Featured Image Plus 將檢查文字是否包含圖片。如果有,就將其設為特色圖片;如果沒有,您可以設置任何外部 URL 圖片...。
  • External Nofollow 》此外掛會在文章內容中的所有外部連結新增 rel="nofollow",這樣可以避免流失 PageRank 到其他網站,並且提升您的部落格 SEO。, 內部連結不會有所更改。, 需要...。

文章
Filter
Apply Filters
Mastodon