07-18-2011, 06:06 PM
Delayed publication plugin
07-30-2011, 09:53 PM
I would really like to see this.
08-03-2011, 06:29 PM
so i started looking at this and have a nice JS popup date time picker already added and the template edits done on my test forum to add the input forms.
if JS is disabled, the user can still type in a PHP friendly date time.
I need to consider time zone support though as the picker defaults to the server time.
maybe i can have something in a couple of days, of course its all dependent on my real life obligations.
Pavemen, I'm waiting for this plug-in for almost a year. So the waiting is not a problem.
08-05-2011, 06:26 AM
This is getting to be more work that I expected.
1) MyBB does not save any post, moderator or subscription options with the draft, so having the ability to "stick" or "close" or "subscribe" to a post/thread upon publishing is not supported without tracking extra variables. Its not hard to overcome, just a PITA. I already override the dateline of the post to the publication time since I can not modify the list of Drafts in the UserCP (no hooks for that) plus it puts the correct time of the post so it orders correctly. So I can just override/populate those options as well and store them in the database like you would a visible post/thread. Just more work.
2) The task to publish the drafts is either really simple and ignores subscriptions, sticky, closing, etc or complex and has me replicating a large portion of the MyBB functionality in the task file.
3) I need to see if I can utilize the built-in post handler in the task file instead, without ending up in an infinite loop or overriding already overridden vars as I am running the hooks in that code in order to grab the extra post/thread variables for the future date to publish on.
However, on the bright side, are the facts that I have completed
1) the plugin install, activate, deactive and uninstall
2) template edits
3) have a working JS based popup calendar/time picker
4) support user timezones (picker is based on your local computer time, so using that I need to get back to server time from your timezone settings, either user setting or board setting)
5) thread counters/lastpost are 95% complete
6) usergroup based permissions for allowing delayed posting. these are the only settings, nothing in configuration, only a new tab with single option when editing a group
7) task create/delete during install/uninstall and task enable/disable during activate/deactivate of the plugin
Here is a snap of the JS date/time picker popup
08-05-2011, 04:55 PM
This is awesome! You did a great job. This plugin allows to plan the news releases. You do not need to sit permanently on the forum to keep the activity. You can plan everything for the week ahead and do personal business at that time.
08-05-2011, 05:01 PM
I also have wanted this plugin for awhile, so glad it is currently being made.
I look forward to the release of this! .
- NaXuh [I'm back to MyBB, woot!]
Latest MyBB Plugin: ---
08-05-2011, 11:34 PM
So my plugin wont work if you use polls, unless you make a core edit to fix a bug. It won't matter if you don't use polls in your delayed threads, but if you want to use polls, then you HAVE to fix the bug.
So I need at least one beta tester to work with. On my test forum, I can't get tasks to run reliably on their own due to lack of traffic. I can manually run the tasks and things appear to be okay. But a couple other sets of eye would be nice.
More specifically, I need to see if I cover all the cases when the task is run.
1) Are threads, posts, polls, mod options, subscriptions, etc. processed as expected?
2) Do the last post, and forum/tread counters work right?
3) Does the timezone get worked out correctly? I user can have different timezone than the server and the picker users local time. Do the drafts get published at the requested time, relative to the server time? e.g. if user is in California and sets publish date to 2pm their time, and the server is in New York, does the post get published at 5pm server time?
Right now the task is set to run every 15 minutes, starting at min 7 (7,22,37,52)
The plugin uses most of the drafts system, but since i can't edit the drafts template output the "Saved Date" is the requested published date, not the actual saved date.
If you have a poll attached to a delayed post draft and edit the draft, the poll will remain, but if you check the "I want to add a poll" box again you will get an error. Leave it blank will keep the poll and NOT remove it from the poll table. However, when published, the poll will be present.