MyBB Community Forums
Adding automatic timer-based posts to MyBB? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Adding automatic timer-based posts to MyBB? (/thread-179001.html)



Adding automatic timer-based posts to MyBB? - hansolo - 2015-09-12

Hi All,

Are there any currently existing plugins which perform automatic posting based on timers?

What I'm looking to do is to have the forum software make an automatic post to a thread if the OP doesn't make a special 'Update Post' within a fixed time period.

If no plugin of this nature exists, are there any hints on how I could implement this?

Many Thanks!


RE: Adding automatic timer-based posts to MyBB? - Destroy666 - 2015-09-13

Hints:
1. Create a task file which will do the checking/updating. Examples are in the inc/tasks folder. Use posthandler to insert posts.
2. Insert a task record for the file to the mybb_tasks table: https://github.com/mybb/mybb/blob/feature/install/resources/mysql_db_tables.php#L780-L796 Fill at least all required columns (title, file, enabled, any time value, nextrun - you can use fetch_next_run()).
3. Remove the task record on deactivation/uninstallation.


RE: Adding automatic timer-based posts to MyBB? - hansolo - 2015-09-13

Thanks!