• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

What'd be the right approach to scheduling a thread in XenForo?

TheBigK

Well-known member
#1
I'm planning to create an addon (for learning purpose) that would let the user schedule thread in XenForo. I'm however totally stuck at what approach should I take to do it.

All I can think is this:

1. Add option "Post Thread After: [ x ] () Minute () Hours to the thread_create template using template modification.

2. If the user has specified a schedule, then I should save the entire thread into my own table (and not XF's default).

3. Run a CRON to simply copy the thread to its original table so that it looks like a regular thread to the visitors.

All I could do is add the options to the template; but that's no brainer. I'm totally confused about how should I proceed with Step #2.

PS: Another option could be to extend the data-writer and set the thread state to 'moderated' and then run a cron every minute and change the state to 'visible' at scheduled time.

PPS: I've already spent several days on this without making any real progress. I'd appreciate some hand holding.
 

TheBigK

Well-known member
#3
Well, it's super-difficult to understand. I'm coding it so that I can learn XF coding.

Anyway. I've decided to get my mind off this. Not my cup of tea, yet.