Scheduled Posts Module v1.0
Description
This module MUST be installed when you set to TRUE "Allow Scheduled Articles" in
Dashboard -> Settings -> Submit -> Allow Scheduled Articles.
How it works?
The module runs only once a day, to save queries and strain on the server. It runs whenever the Index (Published) page is accessed, and the process is as follows:
- First, we check if the Allow_Scheduled is set to true in the dashboard, Submit Settings.
- If it is true, then we check, in the misc_data table, for the date the module last ran. If the value is empty or not equal to today's date, then the module will run
- If scheduled posts to be posted on the current date are found in the links table, the module calls a function to check whether the status of these posts should be set to Published or New and then it updates their status and adjusts the totals table accordingly.
- Updates the date value of "scheduled_run" in the misc_data table to the CURRENT date to prevent the module from keep running on that day.
- If no scheduled posts were found, it also updates the date value to prevent it from running again in the same day.
- If it is false, then we save the queries and the module won't run.
Revision History
Created by Redwine for PliKli 4.0
- v1.0 2017/07/01 - PliKli 4.0