Title: Nostrtium
Author: pjv
Published: <strong>2023 年 4 月 28 日</strong>
Last modified: 2023 年 6 月 23 日

---

搜尋外掛

![](https://ps.w.org/nostrtium/assets/banner-772x250.png?rev=2905773)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://ps.w.org/nostrtium/assets/icon-256x256.png?rev=2905773)

# Nostrtium

 由 [pjv](https://profiles.wordpress.org/pjv/) 開發

[下載](https://downloads.wordpress.org/plugin/nostrtium.0.7.4.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/nostrtium/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/nostrtium/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/nostrtium/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/nostrtium/#developers)

 [技術支援](https://wordpress.org/support/plugin/nostrtium/)

## 外掛說明

Nostrtium lets you post from WordPress to [nostr](https://nostr.how/en/what-is-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](https://github.com/pjv/nostrtium) and the
best (fastest) way to get support is to raise an [issue](https://github.com/pjv/nostrtium/issues)
or start a [discussion](https://github.com/pjv/nostrtium/discussions) 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](https://computingforgeeks.com/how-to-install-php-on-ubuntu-linux-system/))*
php-bcmath module must be installed ([Installation on Ubuntu](https://www.itsolutionstuff.com/post/ubuntu-php-bcmath-extension-install-commands-exampleexample.html))*
WordPress 6.0+ * Writable uploads directory (on activation, the plugin writes a 
cryptographic keyfile to a storage directory)

### How to Use

 1. 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.
 2. 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';
    });
    ```

## 螢幕擷圖

[⌊Nostrtium settings⌉⌊Nostrtium settings⌉[

Nostrtium settings

[⌊Post to nostr metabox⌉⌊Post to nostr metabox⌉[

Post to nostr metabox

## 安裝方式

#### Automatic installation

Automatic installation is the easiest option as WordPress handles the file transfers
itself and you don’t need to leave your web browser. To do an automatic install 
of Nostrtium, log in to your WordPress dashboard, navigate to the Plugins menu and
click Add New.

In the search field type “Nostrtium” and click Search Plugins. Once you’ve found
the plugin you can view details about it such as the point release, rating and description.
Install it by simply clicking “Install Now”.

#### Manual installation

The manual installation method involves downloading the plugin and then uploading
it to your webserver via your favorite FTP application. The WordPress codex contains
[instructions on how to do this here](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Nostrtium〉的開發相關工作。

參與者

 *   [ pjv ](https://profiles.wordpress.org/pjv/)

[將〈Nostrtium〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/nostrtium)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/nostrtium/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/nostrtium/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/nostrtium/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/nostrtium/)。

## 變更記錄

#### 0.7.4

 * Fix for very long relay URLs messing up table width on settings page

#### 0.7.3

 * Allow unenecrypted (ws://) relay URLs

#### 0.7.2

 * Update requirements text and requirements check
 * Fix missing variable declaration

#### 0.7.1

 * Auto-post only on first publication – not updates of old posts.
 * Auto post only of type ‘post’ (currently not pages or custom post types).
 * Fix not saving auto publish settings to running settings instance.

#### 0.7.0

 * Allow auto posting excerpt, permalink, or both on publication of WordPress post.
 * NOTE: If you have installed a prior version, this update requires you to re-enter
   your private key on the Nostrtium settings page. This is a one-time occurrence.

#### 0.6.1

 * Initial public release

## 中繼資料

 *  版本 **0.7.4**
 *  最後更新 **3 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 6.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **6.2.9**
 *  PHP 版本需求 ** 8.1 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/nostrtium/)
 * 標籤:
 * [nostr](https://tw.wordpress.org/plugins/tags/nostr/)[social media](https://tw.wordpress.org/plugins/tags/social-media/)
 *  [進階檢視](https://tw.wordpress.org/plugins/nostrtium/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/nostrtium/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/nostrtium/reviews/)

## 參與者

 *   [ pjv ](https://profiles.wordpress.org/pjv/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/nostrtium/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://github.com/pjv/nostrtium)