Turn off "news" page views for non admins

Post

Posted
Rating:
#8778 (In Topic #2954)
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
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
Online now: No Back to the top

Post

Posted
Rating:
#8788
Avatar
Site staff
Adam Edington is in the usergroup ‘Super-moderators’
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.
Online now: No Back to the top

Post

Posted
Rating:
#8789
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
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!
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris Graham)
#8790
Avatar
Site staff
Adam Edington is in the usergroup ‘Super-moderators’
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

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).
 
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam Edington)
#8792
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
That's awesome, thank you so much! Works like a champ :thumbs:
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,051 topics, 7,194 posts, 10,824 members
  • Our newest member is gracenayjanjoh
Birthdays:
Back to Top