Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Disable statistics?


Reply

13 Posts   5443 Views

Avatar
Blackdog

14 October 2008 at 12:09pm Community Member, 156 Posts

works fine for me.

Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(
'statistics',
'newsletter',
'comments'
)
));

Avatar
Liam

14 October 2008 at 12:30pm Community Member, 470 Posts

Ya you had newsletters (plural) it should only be singular.

It'll work for all of them, just a matter of testing the proper names.

Avatar
Willr

14 October 2008 at 1:09pm Forum Moderator, 5511 Posts

That will only remove the statistics from the CMS view. If you want to disable statistics completely (eg stop keeping PageView counts) You need to remove the lines below (like lines 86-87) From sapphire/core/control/ControlController.php

// Log page views
// Statistics::collect(); add a // before Statistics::collect() like this or remove this completely

Avatar
NickJacobs

14 October 2008 at 2:56pm Community Member, 144 Posts

great, thanks....yeah I just put 'newsletters' because that was the name on the menu. & yes will, I did uncomment that line....thanks all.

Avatar
fumble

20 November 2008 at 4:57pm (Last edited: 20 November 2008 4:58pm), Community Member, 1 Post

(edit: Duh, I didn't see the second forum page with everyone else's reply)

@[url="/site-builders-forum/reply/40525#post200539"]galilee[/url]: For removing the newsletter links, I tried "newsletter" (singular, not plural) and it worked :)

Object::addStaticVars('LeftAndMain', array(
'removed_menu_items' => array(
'newsletter',
)
));

-fumble