Turn off "news" page views for non admins
Does anyone know where this is in the admin zone? I have tried every possible search string and can not find a toggle for it. Simply want to disable page views on a news article for all roles aside from admin.
Thanks in advance!
F_O
Thanks in advance!
F_O
Hi,
Admin Zone > Setup > Configuration > Site options has an option called "Reveal usage figures". This is probably what you are seeking but the effect is global and not just for news.
Admin Zone > Setup > Configuration > Site options has an option called "Reveal usage figures". This is probably what you are seeking but the effect is global and not just for news.
Thanks Adam, i tried it and while it does allow forum views to still be seen, the article page views are not seen by an admin. I just don't want other roles to see them, so it won't meet the requirements. Thank you though for the feedback!
Hi again,
To achieve what you require, create a fresh copy of NEWS_ENTRY_SCREEN.tpl in your templates_custom directory (to avoid core updates undoing your edit) then make the following change:-
Find
Replace
You may need to do make this edit to any other news templates you are displaying/using (blocks, etc) if they also show the view count (not sure if any do but worth checking).
To achieve what you require, create a fresh copy of NEWS_ENTRY_SCREEN.tpl in your templates_custom directory (to avoid core updates undoing your edit) then make the following change:-
Find
Code
{+START,IF,{$INLINE_STATS}}Replace
Code
{+START,IF,{$AND,{$IS_ADMIN},{$INLINE_STATS}}}You may need to do make this edit to any other news templates you are displaying/using (blocks, etc) if they also show the view count (not sure if any do but worth checking).
That's awesome, thank you so much! Works like a champ
1 guest and 0 members have recently viewed this.
