投稿に「個人メッセージ」ボタンを追加

Do you think it is possible to add a “Private Message” button to the topic first post? :thinking:

I am surprised that many users don’t know how to send PM to OP, because the PM button is not visible unless they click on the OP’s avatar.

For example,


Currently, I am using the " discourse-custom-topic-button" plugin.

And use the url of
example.com/new-message?username=<TOPIC_USERNAME>&title=Re:<TOPIC_TITLE>

However, when user click on the button, it jump to the front page immediately, before the Message editor show up. It doesn’t act the same as the “Message” button in user card. If you click on the “Message” button in user card, it show up the message editor immediate without jumping to other page.

Do you think it is possible to make the custom button (new-message url) act the same as the Message button in user card ? :thinking:

I recently built this for a client:

https://github.com/paviliondev/discourse-pm-topic-author

It is open-source. It may suit your needs. Just add the Categories you want it to appear in. Let me know if you hit any bugs.

Unfortunately I don’t have time to extend it at present.

Thanks to @davidkingham for commissioning us to do the work and allowing this to be open source, and in turn therefore supporting the wider community.

「いいね!」 10

Thank you very much. :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

It works exactly what I am looking for. :partying_face: :partying_face: :partying_face:


Just out of curiosity, :grinning:

Do you think I can add
{{#if this.user.can_send_private_message_to_user}}
to “pm-topic-author.hbs” , so that the button won’t show up if the user is the same as the OP ? :thinking:

Similar to Discourse User card “user-card-contents.hbs

pm-topic-author.hbs

「いいね!」 3

Good catch!

Given we already have the showPMTopicAuthorButton property, we should probably do that in JS, though your solution is a great interim approach.

「いいね!」 3

So I’ve done that with JS:

https://github.com/paviliondev/discourse-pm-topic-author/commit/a82ac238d9dce2291e827b66784aef1715e077c0

Thanks for your feedback.

Upgrade when you get chance and please confirm that works for you.

「いいね!」 10

Thank you very much for the update. :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

Now It works perfectly well for login user. :partying_face: :partying_face: :partying_face:

However, it seem after updated, the plugin cause some error for non-login user. When non-login user visit the page, it get a blank post. It only show the title, category, tag, but everything below is empty . :thinking:

Browser Inspector:
2021-04-11_053333

Error log:

「いいね!」 1

https://github.com/paviliondev/discourse-pm-topic-author/commit/ed5a0128c754e1017a752a08bf3725acf3f5bfb5
Schoolboy error :man_facepalming:t3:- introduced that in last change. Hopefully that resolves it for you :slight_smile:

「いいね!」 4

コンポーザーにすでにあります。左上の返信矢印をクリックして、次のように 新しいメッセージ を選択します。

こんにちは、このプラグインは現在githubでメンテナンスされていますか?

プラグインをインストールしましたが、機能していないようです。まず、プラグインページのオンボタンがグレー表示になっています。これはどういう意味でしょうか?

次に、設定値を変更しても、ユーザー名の横にボタンが表示されません。

このプラグインはまだ機能しますか?動作するようにできますか?

こんにちは。

以下に示すように、投稿のユーザー名の横にメッセージ送信ボタンを追加したいと考えています。

この機能に関連するさまざまな投稿を読みましたが、私の要件を満たすものはありませんでした。

こちらを読みましたが、これはトピックの最後にボタンを追加するテーマコンポーネントを指しています。

これを実現する方法について何かアイデアはありますか?

ボタンを配置したい場所にプラグインのアウトレットがないようです。

代わりに topic-above-posts に配置することに満足できるかもしれません。

その後、ボタンを追加するglimmerコンポーネントを作成します。最後に、api.renderInOutlet を使用してそのコンポーネントを表示します。Custom Components -- add button or text at any plugin outlet がその例です。

そして、これを変更します。

メッセージを開始する URL を見つけるだけです (Prefilled composer link generator が役立つかもしれません – 必要なのは、目的のリンクを知ることだけです)。

「いいね!」 3

返信ありがとうございます。私の能力を超えています。
まさにこの要件を満たすプラグインがありましたが、削除されたようです。Add a "Personal Message" button on Post これが探していたものです。

サリーさん、こんにちは!なぜこれをしたいのか疑問に思っています。メンバー同士がトピックに返信して会話することを望んでいないのですか?そのようなリンクを追加すると、インターフェースが乱雑になり、メンバーの気が散ってしまいます。

アバター/ユーザー名をクリックすると、メンバーに直接メッセージを送信するボタンがあるユーザーカードが表示されるのでは不十分なのはなぜですか?

「いいね!」 3

ユーザーがフォーラムに投稿できますが、主な機能はお互いにメッセージを送信することであるメッセージングシステムを構築しようとしています。そのため、「メッセージ」ボタンを表示したいのです。新しいユーザーがメッセージの送信方法を理解するには時間がかかります。

「いいね!」 1

Discourse の興味深い使い方ですね。ユーザーカードへのアクセス方法をメンバーに教育して、個人メッセージ (またはチャット?チャットも使用していますか?) で返信できるようにするだけでもうまくいくかもしれません。たとえば、上部に永続的なバナーを作成できます。また、ウェルカムメッセージでアクセス方法を説明します。

どうしてもこのボタンが必要で予算がある場合は、Marketplace に投稿すれば、誰かが作成してくれるかもしれません。

すでに実施済みです。一番上に表示したり、ウェルカムメッセージや「私たちについて」ページなどで説明を送ったりしています。

チャットは使用していません。メッセージで十分です。

はい、それは最終手段になります。

過去には機能していたこのプラグインを、誰かが復活させてくれることを願っています。

私はオリジナルの作者です。たとえプラグインがまだ動作したとしても、最初の投稿にボタンを追加するだけで、すべての投稿に追加されるわけではありません。

「いいね!」 3

ロバートさん、こんにちは。はい、OPの最初の投稿の隣にメッセージボタンを追加したいのです。

問題は、そのプラグインが機能せず、メッセージボタンが表示されないことです。インストールしましたが、プラグインページでこのプラグインのオンボタンがグレー表示されているのが見えます。それが何を意味するのか分かりません。

このプラグインを復活させていただけますか?もしお時間があれば、お願いします。

実際には、カスタムコンポーネントのテーマコンポーネントが機能するはずです。\n\nURLにpmを開始するものを(それが機能すると思うのですが)設定で言及したプラグインのアウトレットに入れるだけです。\n\n編集:\n\nああ。残念。\n\nいいえ。これが必要です。\n\n https://your.discourse.site/new-message?username=username\n\nそして、トピックのユーザー名を含めるメカニズムはありません。

作業をスポンサーしていただける予算があれば、PMしてください。

「いいね!」 2