Discourse カスタムアプリバナー

カスタム Discourse アプリや、会社用のアプリをお持ちの場合は、ユーザーにカスタムアプリのバナーを表示したいと思われるかもしれません。Discourse には、サイト設定の「Other」→「native app install banner」を使用して、Discourse アプリへの誘導機能のみが用意されています。例は以下の通りです:

afbeelding

discourse-custom-app-banner プラグインを使用すると、独自の iTunes や Android アプリを設定し、それらのためのバナーを表示することができます。

このプラグインは GitHub - communiteq/discourse-custom-app-banner · GitHub で入手可能です。

このプラグインは RZIM Connect のために開発され、@outofthebox 様がオープンソース化することを快く許可してくださいました。

「いいね!」 9

Richard, I’m grateful for your professionalism, speed, and expertise on the Discourse platform.

This plugin provides our members with a better experience. Thank you!

I’m also grateful that you wanted to share this plugin with the Discourse community, which speaks to your character and loyalty. I am very happy to be able, through your hard work, to contribute a tiny bit back to this outstanding product and community.

「いいね!」 3

I think it’s very reasonable to merge this functionality into core.

Two hidden site settings, that allow you to input android_app_id and ios_app_id and default to the current values.

I thought about doing this way, but back then there was just one Discourse app :wink:

「いいね!」 9

Agreed, this is totally fine to merge in. We do not want to forcefully tie people to the one app, that’s not intentional.

「いいね!」 7

このプラグインを使用しようとしている方のために、簡単な使い方を紹介します。この機能は現在、コアに含まれています。

ios_app_idandroid_app_id という 2 つの非表示のサイト設定があります。

これらを設定するには、Rails コンソールを開き、以下を入力してください。

SiteSetting.ios_app_id = XXX
SiteSetting.android_app_id = YYY

ここで XXX と YYY は、それぞれのアプリ ID です。

その後、[管理] - [設定] 画面から native_app_install_banner_ios および native_app_install_banner_android 設定を有効にできます。

「いいね!」 4