1

I am using the 'Advanced Forum' module in Drupal 7 and I want to have a 'Views' column in the topic list. I have managed to do this using the Statistics module, but now at the bottom of every node it says '## reads', much to my dislike. Therefore, I would like to remove every visible view count; only leaving the views column in the 'Advanced Forum'.

Is this possible? If it is possible, how can I do it?

1

You can remove it through template_preprocess_node(). For instance:

function YOURTHEMENAME_preprocess_node(&$variables) {
  unset($variables['content']['links']['statistics']);
}

Or you may be able to do this with simple CSS as well:

li.statistics_counter {
  display: none;
}
| improve this answer | |
  • Thank you. The CSS didn't seem to change anything but the function worked perfectly! Sorry for my delayed response. – Andy Jul 29 '11 at 14:09
2

Also, the view count on nodes is permission based, so you can deny the view permission to everyone and then it will only show for UID 1.

| improve this answer | |
  • Thanks for your answer. I think I tried that, but I'm new to Drupal 7 so I didn't really know what I was doing. Anyway, I have a solution now, and me and my mate are 'pausing' the project until futher notice as well! Thanks again, and sorry for my slow reply! – Andy Aug 3 '11 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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