Fast Highlight

FWIW setting explorer explains the settings well:

GPT Bot Settings Explorer

Look up site setting context

Reading context for: share_quote_buttons

The share_quote_buttons setting in Discourse determines which items appear in the quote sharing widget, and in what order. The default options include “Twitter” and “Email”.

This setting is client-side and allows you to choose from a list of options including Twitter, Facebook, and Email. However, it does not allow any other choices apart from these.

The setting also includes a validation check. For example, if Facebook is included in the share_quote_buttons but the Facebook app ID is not set in the site settings, it will return an error.

This setting affects the visibility and options of the quote sharing widget in the user interface. For example, if the share_quote_buttons setting includes “Twitter” and “Email”, then when a user selects a text to quote, they will see options to share the quote on Twitter and via Email.

In the Discourse codebase, you can find this setting in the site_settings.yml file and its validations in the validations.rb file. The functionality of this setting is also tested in the topic-quote-button-test.js file.

Look up site setting context

Reading context for: share_quote_visibility

The share_quote_visibility setting in Discourse determines when to show quote sharing buttons. There are three possible choices for this setting:

  • “none”: The quote sharing buttons will never be shown.
  • “anonymous”: The quote sharing buttons will only be shown to anonymous users.
  • “all”: The quote sharing buttons will be shown to all users.

The default setting is “anonymous”. This means that by default, quote sharing buttons will only be visible to users who are not logged in.

This setting is used in the quoteSharingEnabled function in the quote-button.js file. This function checks several conditions to determine whether quote sharing should be enabled. These conditions include whether the site is in desktop view, whether there are any active sharing sources, whether the topic is visible, whether the topic’s category is read restricted, and what the share_quote_visibility setting is set to.

In the acceptance tests for the topic quote button, this setting is used to determine whether the quote sharing buttons should be shown or not. If the setting is “all”, the quote sharing buttons are shown. If the setting is “none”, the quote sharing buttons are not shown.