Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

We have a client who is using WP as part of an alternate reality game, and as part of it, they want to have 'characters' leave comments on posts at certain times. They basically want to be able to queue up comments in advance, so that they drop at the right time (similar to how you can control posts going live at a certain time.)

Is there a plugin that handles this?

share|improve this question
    
Not something i have an answer for, just wanted to say it's an interesting question you have there, i'm curious to see if anyone can come up with a solution. –  Mark Duncan Jul 6 '11 at 19:25
add comment

1 Answer

There isn't a plugin that I know of. How many comments are we talking about? I'm assuming to many to manually approve.

A simple solution I can think of would be adding something like this to the comment loop in comments.php. Find the foreach loop and replace it with something like

<?php 
//set the date one day into the future
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
foreach($comments as $comment) :
    if($date > comments->comment_date ){
            <?php comment_text(); ?>  
            <cite><?php comment_type(); ?> by <?php comment_author_link(); ?> on <?php comment_date(); ?> at <?php comment_time(); ?></cite>  }
endforeach;
?>

This is untested and just an example. You should be able to set $date to whatever you want or even use a random time.

Resources:
get_comments()
Unraveling the Secrets of WordPress' Comments.php File
PHP Date add 1 hour

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.