Can a banner be removed automatically at a specific time?

Hi all,

If I have a topic set as a banner will setting the auto close date/time also make the banner disappear, or does that always require admin intervention to un-banner-ise it?

Thanks in advance.

Fairly certain it will remain a banner.

1 Like

Hi @cpradio,

Thanks for the response, appreciated.

That was my feeling. I take it there isn’t anything else which automatically stops the banners?

We typically use them for announcements relating to a promotion, so they have a valid reason for being removed, I have been doing it manually, but when an offer ends at midnight it means I have to stay up! :tired_face:

If there isn’t anything like this at the moment, do you think it would be worth putting it forwards as a suggestion? No point if you don’t feel it has value.

You could always schedule a command similar to the following to be executed:

  • at the right time
  • on a computer that doesn’t fall to sleep
  • with a good internet connection
curl -X PUT -d api_key=YOUR_API_KEY_GOES_HERE -d api_username=API_USERNAME_HERE http://discourse.example.com/t/YOUR_TOPIC_ID_GOES_HERE/remove-banner
4 Likes

Why not just put the text “this offer ends at midnight UTC” in the banner text?

3 Likes

Yes, could do that, already have those details bar the UTC etc. Just feels like as there is already automation around the closing of topics, that if they have been pinned or set as a banner, an option to unpin/remove banner would make sense too.

Bit of a cleaner/tidier experience for the users not still seeing things which are no longer valid (fully appreciating I could just stay up and remove it when it expires).

I tend to also make the posts which are for banners unlisted, e.g. its just an announcement that we want to show across the top of the screen, not necessarily as a specific topic in the list, which gets shuffled down through the “Latest Topics” view really quickly anyway. Can only set it as a banner if it is listed though, so harder to set a banner without displaying the topic (briefly) first.

Again, maybe just the way I’m using it but thought I’d mention it.

Thanks as always for the responses :slight_smile:

I wonder what happens if you set a delete timer on a topic that has been bannered? Can you test that @tshenry?

1 Like

Just tested and the banner is removed once the topic’s delete timer has run out.

2 Likes

There you go @RobMeade all things are now possible through the magic of Discourse! :rainbow:

3 Likes

Are you saying the banner will be removed but the topic will not be deleted?

The topic will be deleted due to the function of the timer, so it is important to note that you would want to use a topic that is safe to delete.

4 Likes

Thanks Jeff and team.

I’m actually no longer part of the community for which all of my questions, bug reports and support requests related to. I do appreciate the efforts though.

Hope everyone is well and thanks again. :slight_smile:

5 Likes