Skip to:

How to Add Status Update *NEW* into Your Title

Viewing 8 replies - 1 through 8 (of 8 total)

    I think you can just change UNREAD to NEW.

    Thanks for this idea gerikg!

    But I think it’s not yet what I was looking for. Instead of the additional tables in the database I would just like to do one thing:

    Indicate wether the post you see was recently opened up, let’s say one day old or so. If so, put the new in front of the title.

    So instead of checking wether you have read the post already, the function just checks if the post is older than one day and shows yes or no!

    Should be fairly straight forward, but my coding skilss are not enough advanced.

    <?php if ( (time() - 24*60*60) < strtotime($topic->topic_time) ) : ?>*NEW* <?php endif; ?>

    A very rough way of doing it there, but if you put that in forum.php before say, <?php topic_title(); ?> if you want it in the topic title, it should work. Change 24*60*60 to the number of seconds you want to include topics from.

    Works perfectly as far as I can see!

    Why would you say this is a rough way? Seems very clean to me.

    Cheers Kawauso and gerikg.

    Ok now again it is connected with the last activity in a thread. So when I comment on an older thread it will show *new*.

    Instead I want it connected with the thread opening time?

    Apparently topic_time is timezone-shifted, so the previous code is wrong :P told you it was rough! This will take the time from the opening time :)

    <?php if ( (current_time('timestamp') - 24*60*60) < strtotime($topic->topic_start_time) ) : ?>*NEW* <?php endif; ?>

    Works a charm Kawauso :)

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar