Drupal Theme Remove View Count

Discussion in 'Drupal' started by litebulb1, Oct 29, 2007.

  1. #1
    Does anybody know how to remove the view count at the bottom of each page in drupal?
     
    litebulb1, Oct 29, 2007 IP
  2. ascetic

    ascetic Peon

    Messages:
    148
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Go to Administer -> Logs -> Access log settings -> Disable the "Count content views:"
     
    ascetic, Oct 30, 2007 IP
  3. litebulb1

    litebulb1 Peon

    Messages:
    151
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I actually want to count the views but in the theme I have it displays it at the bottom of every node. Im not sure which file I should edit to remove that.
     
    litebulb1, Oct 30, 2007 IP
  4. beejaysea

    beejaysea Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Who are you trying to remove it for?

    For anonymous and authenticated users, as long as "view post access counter" is not checked in Administer/User Managment/Access Control, it will not be displayed for users of that type. Administrator (user 1) has all access perms turned on, so Administrator will always see it unless you remove it from the template. I typically just turn if off for the roles (usually just anon) that I don't want to see the info.

    As I recall, the data is put into $links in node.tpl.php, but if you remove $links, you will remove other important stuff. You may be able to unset($vars['links']['statistics_counter']); in template.php in the _phptemplate_variables function, in the case of $hook = 'page', if you want to remove admin's access to it as well. Note: I haven't tried it...

    A Drupal tip: It's good to look at your site as an anonymous user, an authenticated user, as well as admin at times. I personally use admin in one browser (so I can save admin pws), and use anon and authenticated in another. This is pretty key to getting everything "just right".

    Hope this helps.
     
    beejaysea, Oct 30, 2007 IP
  5. litebulb1

    litebulb1 Peon

    Messages:
    151
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks beejaysea. I didnt even think to check to see if I was seeing the views because I was admin.

    Thanks for the drupal tip!

     
    litebulb1, Oct 30, 2007 IP