There is a need to add a time limit for stories to be promoted. For instance stories can only be promoted if they have being submitted within the last 2 days, or the last 24 hours.
Logged In: YES user_id=1433075
The Fix: In config.php: add the folowing line - define('days_to_publish', 2); // After this many days posts will not get published
In link.php change the function: function insert_vote as follow -
the if statement if($this->status == 'queued' && $this->votes>=votes_to_publish) { ...
should be - if($this->status == 'queued' && $this->votes>=votes_to_publish) { $now = time(); $diff=$now-$this->date; $days=intval($diff/86400); if ($days <=days_to_publish) { $this->publish(); }
Log in to post a comment.
Logged In: YES
user_id=1433075
The Fix:
In config.php:
add the folowing line -
define('days_to_publish', 2); // After this many days posts
will not get published
In link.php change the function: function insert_vote as
follow -
the if statement if($this->status == 'queued' &&
$this->votes>=votes_to_publish) { ...
should be -
if($this->status == 'queued' &&
$this->votes>=votes_to_publish) {
$now = time();
$diff=$now-$this->date;
$days=intval($diff/86400);
if ($days <=days_to_publish) {
$this->publish();
}