Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/javascripts/discourse/initializers/patreon.js.es6
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function initWithApi(api) {
const showDonationPrompt =
this.siteSettings.patreon_enabled &&
this.siteSettings.patreon_donation_prompt_enabled &&
this.siteSettings.patreon_donation_prompt_campaign_url !== "" &&
this.currentUser.show_donation_prompt &&
$.cookie(cookieName) !== "t" &&
numTopicsOpened >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{{d-icon "times"}}
</span>

{{{i18n "patreon.donation_prompt.body"}}}
{{{i18n "patreon.donation_prompt.body"
campaignUrl=siteSettings.patreon_donation_prompt_campaign_url}}}
</div>
{{/if}}
2 changes: 1 addition & 1 deletion config/locales/client.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ en:
<p>Thank you for your support!<p>

<p>
<a class="btn btn-large btn-danger" href="#">Become a Patron</a>
<a class="btn btn-large btn-danger" href="{{campaignUrl}}">Become a Patron</a>
</p>
1 change: 1 addition & 0 deletions config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ en:
patreon_verbose_log: 'enable verbose logging of patreon payload'
patreon_donation_prompt_enabled: "Enable donation prompt?"
patreon_donation_prompt_show_after_topics: "Show donation prompt after n topics"
patreon_donation_prompt_campaign_url: "Donation prompt campaign URL"
dashboard:
patreon:
access_token_invalid: "Patreon Creator's access and refresh token values are incorrect. You must copy-paste new tokens from <a href='https://www.patreon.com/platform/documentation/clients'>Patreon website</a> to <a href='%{base_path}/admin/site_settings/category/all_results?filter=patreon'>site settings</a>."
Expand Down
4 changes: 4 additions & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ plugins:
default: 20
client: true
min: 0
patreon_donation_prompt_campaign_url:
default: ""
client: true
regex: "^https?:\/\/.+[^\/]$"