Drupal: How to Remove Node Statistics Counter
If Statistics module is enabled on your site, a number of views is shown for every node. In this article we will study how to hide this information.
Options:
1. Remove Statistics module
You should keep in mind that the following logs will be inaccessible without Statistics module:
- Visitor sources
- Last visits
- Popular pages
- Active visitors
- Access log settings
2. Hide counter with the help of CSS
The following CSS rule will hide information about views number. But the information will be generated & calculated:
li.statistics_counter {display: none; }
3. Disable access to this information
- Open “Access control” page;
- Find “statistics” module here;
- Disable “enable access to the statistics” and “view message counter” for the appropriate roles.
Nevertheless, site administrator will be able to view the counter.
4. Очистить переменную в массиве $links
Statistics output is codes in $links array. Insert this code before the first $links output in your template:
unset($links[‘statistics_counter’]);
5. Disable calculating of views number
- Open logs settings (admin/logs/settings)
- Set “Disabled” for “Content views counter”
Please, can you translate step 4:
Очистить переменную в массиве $links
I also have a question… i want only to remove or hide the counter from the page content type. How to do this?
Thanks,