Custom Topic Button

AI-generated summary

The discussion revolves around the deprecated Discourse Custom Topic Button plugin, which adds a customizable button at the bottom of topics for logged-in users. The plugin is now superseded by the official Topic Footer Buttons theme component, available at meta.discourse.org. Users can configure the button’s URL, title, and label via site settings. A key issue raised is that the button opens links in a new window, and users are seeking a way to open them in the same window. The plugin and theme component both use code that forces a new window, and while no UI option exists to change this, one user has offered to investigate a fix. The original plugin is hosted on GitHub, and installation instructions are provided via the official plugin guide. techAPJ notes the deprecation, while JammyDodger and Canapin discuss the technical limitations and potential fixes. danielabc requests the feature and praises the plugin’s functionality.

:information_source: Deprecated: There is now a Customization > Theme component that provides the same feature: Topic Footer Buttons

Summary: This plugin adds a custom button at the bottom of a topic, visible to everyone (who is logged in).

:link: GitHub: https://github.com/techapj/discourse-custom-topic-button
:arrow_right: Install: Follow the plugin installation guide.

Features

Configuration

From Admin > Site Settings > Plugin, modify

  • custom_topic_button_url
  • custom_topic_button_title
  • custom_topic_button_label

Note: For button to be visible only to staff or members of a specific group, see:

CHANGELOG

TODO

20 Likes

when I click on the button it opens a link on another page, how do I click on the button and it opens on the same page?

1 Like

I’m not sure, but I believe there are a couple of official theme components that are the up-to-date method of acheiving this. Topic Footer Buttons

Do they behave in a similar way?

I installed them, but both open the link in another window, is there any way for it to open in the same window?

Hmmm. :thinking: If I’m reading it right, I think it’s part of the theme component code that it opens in a new window:

(and the plugins too I think)

discourse-custom-topic-button/assets/javascripts/discourse/connectors/after-topic-footer-main-buttons/custom-public-button.js.es6 at c4a91727c0322f0c59bc09af7fbcb076b5676de4 · arpitjalan/discourse-custom-topic-button · GitHub

It does not seem that there’s currently a way through the UI to change that. It may be possible to amend that behaviour with a bit of custom work, but I’m afraid that’s not my forte. :slight_smile:

1 Like

Hi koliwi, I’ll try to have a look at the theme component to add this feature this week. :slight_smile:

3 Likes

Is this plugin yours? Congratulations for the work, I really liked it! If you can open it in the same window it will be even better! Thanks!

It’s not mine, but I can have a look at it nonetheless. I’ll let you know :slight_smile:

2 Likes