Viewing 8 replies - 16 through 23 (of 23 total)
  • Yup! That fixed it! Thanks ifelse!

    yes, thanks for the update, it works like a charm. very needed since I am working at the moment and seem to post everything “early in the morning” :DDD

    @wairoanz
    Sorry. Call it with <?php dumb_comments_link() ?>. I accidently published it with “comment” instead of the plural “comments.”
    And sorry to post this in this topic.

    Would it be possible to have the same for comment dates?

    I would love this to be used in the comment times.
    This plugin is great!

    I’ve updated the code so that you pass in a date value rather than the post_id. This will mean that it should work for comments as well.
    Note the usage method has changed to:
    <?php time_of_day(abs(strtotime($post->post_date)));?>
    To use it for comments, try the following:
    <?php time_of_day(abs(strtotime($comment->comment_date)));?>
    Note, I’ve disabled comments on my site, so comment usage is not as well tested. Give me a shout if it works/breaks.

    It didn’t break anything has far has I can see.

    I ran into the same non-appearing-date problem during certain hours & made the following modification with successful results:
    In the main switch statement, I changed all case statements to check for strings & it seems to have fixed all problems (not quite sure why tho).
    From >>
    case 00:
    case 01:
    case 02:
    […]
    To >>
    case ’00’:
    case ’01’:
    case ’02’:
    […]

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Dunstan’s time_of_day anyone?’ is closed to new replies.