0

If I go to my drupal tracking page while logged in I can see a red 'new' by forum posts that have changed since ive visited them. How can I add this functionally? I need to be able to do this without the advanced forum module.

This is the page but you wont see the red 'new' as your not logged in as me. See the attached image to see what I see. Thanks http://drupal.org/user/643368/track enter image description here

1 Answer 1

0

You can do this by a custom module.

Create a new table in database with 3 column [ nid | uid | viewed_time ] representing node view history.

And override hook_node_view(). The logic could be something like:

if (user is authenticated) {

  if (the node type is forum && nid with current uid is not in a row of view history table) {

    append 'new!' to node title

  } else {

    write [nid , uid, current time] to the view history table

  }

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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