Create topic in the future


(Stuart Langridge) #1

I’d like to be able to, via the API, create a Discourse topic but not have it show up until a defined time in the future. This is really handy for things like announcement posts, so I can create a new topic to announce a thing at some point before the release of the thing, and have the forum discussion become available automatically at release time without me having to do anything. Has this sort of feature been discussed? (I did take a glance at the code, but I’m not really a Ruby guy, and I fear walking through the code and changing every single request for a topic to include “and publish_time <= now”…)


Pending post feature
Ability to add multiple topic timers
(Sam Saffron) #2

We would probably just create the topic hidden and have a job that unhides it if we were to build something like this.

First time I have seen this request, its quite common for blogs.


(5an1ty) #3

I like the idea, if you’d like to release an announcement at a future date. I think it has it’s uses on a forum.


(Jeff Atwood) #4

It reminds me of auto-close which is insanely useful, except it is “auto-unhide” (or is auto-hide at a future date useful too? I don’t know). Maybe something to add low on your list @neil.


(Stuart Langridge) #5

To fill in a little more detail on this, the reason I want it is that when
we record an episode of a podcast, I run a script which creates a post on
our (WordPress) website and also a new post to our discourse forum (
community.badvoltage.org). The two posts link to one another. At the moment
I have to be present at release time in order to run the script because
discourse doesn’t allow me to post hidden; formerly I could run it whenever
I wanted and set the WordPress publish time to be the release time.
Obviously this is fairly niche, I accept, but a fix would be hugely useful
to me. (I fear running the script from cron in case it goes wrong.)


(Neil Lalonde) #6

Scheduling a topic for the future (auto-unhide) would be really useful. Added to my list.


Is it possible to schedule posts?
(Мария Сергеева) #7

Autohide in future is very useful for some kind of topics, for example, for sell topics that should be valid for predefined period of time like one month or week.


(Kevin P. Fleming) #8

Would the Discourse plugin for Wordpress address this for you? When the Wordpress post was published, a matching topic in the Discourse forum would be created.

Although, I haven’t seen anyone mention whether that actually works or not :smile:


(Stuart Langridge) #9

I’m aware the WP plugin exists, and I know some people have used it. It’s sort of oriented around integrating Discourse and WP, which I don’t want to do (I just want the two things posted at the same time), and more importantly what gets posted to Discourse isn’t quite what gets posted to WP; the WP post has links to mp3s in it and things (it’s for a podcast). I could probably hack the WP plugin so that I write the contents of the proposed Discourse post into a custom WP property and then the WP plugin uses that rather than the WP post content… but at that point I’m doing a bunch of complicated hacking anyway, so it’d be easier to just talk to Discourse myself, hence the request for a post-in-the-future API :wink:


(Kevin P. Fleming) #10

Unless other users of the WP plugin would like your desired behavior too, in which case the work would benefit the world :wink:


(Steve Singkofer) #11

Good morning -

I’m just curious if this post-in-the-future feature has been looked at, worked on, or made possible in the three years since the original posts. I’m relatively new to Discourse, but this seems like a very useful tool.

It would allow me, personally, to pre-position a post on Friday afternoon for posting early on Monday morning. Or pre-position a post for when I’m on vacation.

Thanks.


(Sam Saffron) #12

Timed re-open (automatic re-open after cooldown period of close)

Is on our roadmap for next release and when we build it we will also ensure we have timed “unhide”.


(Alan Tan) #13

I’ve got a PR up for this

Here are some screenshots of the feature.


Schedule posts/topic?
(Travis) #14

Really interested in this!


(Sam Saffron) #15

It is live and working in latest :slight_smile:


(Blake Erickson) #16

I created a #howto for this: How to create a Timed Topic


(Tobias Eigen) #17

Looks really great - I just installed it and am testing.

It appears to be possible to set the topic timer for a message - this actually seems like a more workable procedure to me. E.g. start a message to myself, set the timer and choose the category where it will go. But I’m not sure from the UI whether this will happen correctly. We’ll find out - I set one to be published in an hour! :clock1:

Update: the message did not convert into a topic in the specified category when published. So seems to me either the topic timer should be disabled/hidden from messages or support for it should be added so folks can do what I tried to do. Thanks!


(Alan Tan) #19

Good catch @tobiaseigen :thumbsup:

Can you try out


(Tobias Eigen) #20

cool - thanks, @tgxworld!

I installed it and immediately my message with the timer set that had remained a message previously was posted to the specified category as a topic.

I also created a new message with a timer set, and it was automatically posted. Pretty slick!