[WordPress] 外掛分享: Nostrtium

首頁外掛目錄 › Nostrtium
WordPress 外掛 Nostrtium 的封面圖片
10+
安裝啟用
尚無評分
999 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.1+ v0.7.4 上架:2023-04-27

內容簡介

總結:Nostrtium 外掛讓你可以從 WordPress 發佈到 Nostr,並提供基本的 Nostr 設置和信箱,供使用者在 WordPress 文章編輯頁面使用。使用者可以在信箱中自由編輯內容,也可以透過外掛新增功能,例如生成鑰匙、支援 NIP-07 瀏覽器擴充、提供個別 Nostr 個人檔案,以及支援長篇完整內容等。

問題與答案:

1. Nostrtium 是什麼?
答案:Nostrtium 是一個 WordPress 外掛,可以讓使用者發佈文章到 Nostr。

2. Nostrtium 外掛的基本功能是什麼?
答案:Nostrtium 外掛的基本功能是提供基本的 Nostr 設置和信箱,在 WordPress 文章編輯頁面使用,讓使用者可以自由編輯內容。

3. 在使用 Nostrtium 外掛時,可以對信箱中的內容進行編輯嗎?
答案:可以。使用者可以在信箱中自由編輯內容,並在送出前調整內容。

4. Nostrtium 外掛支援哪些新增功能?
答案:Nostrtium 外插支援生成鑰匙、支援 NIP-07 瀏覽器擴充、提供個別 Nostr 個人檔案,以及支援長篇完整內容等。

5. 安裝 Nostrtium 外掛前需要注意哪些系統要求?
答案:安裝 Nostrtium 外掛需要在 WordPress 系統中,安裝 PHP 8.1+、PHP-GMP 模組、WordPress 6.0+,並且需要具備可寫入的安裝目錄。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.7.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Nostrtium」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Nostrtium lets you post from WordPress to nostr.
This version implements basic nostr settings (private key, relays) and provides a metabox in the WordPress Post editing page which is pre-populated with the Post Excerpt and a link to the Post and lets you post the content of that metabox to your configured relays.
You can change the content in the metabox as you like. If you have a good excerpt and post it as-is, it creates a twitter-style “announcement” note on nostr. A lot of nostr clients will render the link to the WordPress post as a nice-looking summary card with featured image and etc. This functionality is probably enough for many use-cases but I have plans to add more functionality to this plugin in the future, including generation of keys; support for NIP-07 browser extensions; separate nostr profiles for individual WP users; support for full, long-form content from WP to nostr; and more.
There are also options (on the settings page) to auto-post to nostr the excerpt, the permalink, or both upon WordPress post publication.
[Note that the private key is stored encrypted in the WordPress database using libsodium cryptography.]
Support and Development
Development is taking place on github and the best (fastest) way to get support is to raise an issue or start a discussion there.
Requirements
Some of the included libraries have relatively recent dependency requirements so you will need the following in your WordPress platform:
* PHP 8.1+
* php-gmp module must be installed (Installation on Ubuntu)
* php-bcmath module must be installed (Installation on Ubuntu)
* WordPress 6.0+
* Writable uploads directory (on activation, the plugin writes a cryptographic keyfile to a storage directory)
How to Use

After installing and activating the plugin, go into Settings -> Nostrtium and copy/paste the private key (nsec1…) that you want to post from and tweak the relays to your liking.
Then visit the post editor page for an existing post and at or near the bottom you should see the Nostrtium metabox which is pre-populated with the excerpt and permalink for the post (you can change the content in the metabox as you like before posting):

User Role / Capability Filter
You can create a filter snippet (in your theme’s functions.php) to choose what user role or capability has access to Nostrtium functionality. The default is edit_posts. Here is a sample snippet that would change it so only adminstrators can see / use the plugin’s functionality:
add_filter ('nostrtium_role', function($role){
return 'administrator';
});

延伸相關外掛

文章
Filter
Mastodon