View Count - my solution.
I noticed there was a change to vanilla/controllers/class.discussioncontroller.php
around line 90 and 91 these line have been commented out.
// NOTE: This has been moved to an event fired from analyticstick. // if ($Offset == '') // $this->DiscussionModel->AddView($DiscussionID,$this->Discussion->CountViews);
I modified it to this and got my view count back
if ($Offset == '') $this->DiscussionModel->AddView($DiscussionID,$this->Discussion->CountViews);
unfortunately analyticstick does not seem to get updated. if anyone want to provide a clue on why analyticstick table is not updated I will re-comment.
so I just uncommented them out and got my view count back.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Best Answers
-
Pamela ✭✭
peregrine said:
I noticed there was a change to vanilla/controllers/class.discussioncontroller.php
around line 90 and 91 these line have been commented out.Many thanks to share it not found by myself
unfortunately analyticstick does not seem to get updated. if anyone want to provide a clue on why analyticstick table is not updated I will re-comment.
+1 even if I don't understand (at this point...) what is it, this stick
5 -
Linc Admin
I suggested a much simpler workaround: http://vanillaforums.org/discussion/comment/171058/#Comment_171058
6
Answers
I probably won't get any likes here - but it does bring back things to the way they were.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
What do you mean? What things
you said you wanted your view count to be incremented.
if it is only being incremented when a user from a different ip address views the discussion
(this may or may not be the case). The change makes every view no matter what ip address the user is coming from to be incremented, which I believe was the way it worked in previous versions of vanilla. Personally, I don't care what you choose, i was just trying to provide you a solution.
From now on, if a user does not do one of two things
provide documentation on the wiki
or click the like button,
that is the end of my attempts to help that particular user.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Many thanks to share it not found by myself
+1 even if I don't understand (at this point...) what is it, this stick
I thinks its bigbrother vanilla analytics
There was an error rendering this rich post.
my workaround for 2.1 until it is modified.
create a folder under plugins called IncrementView
create a file called plugins/IncrementView/classincrementview.plugin.php
add the following
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I suggested a much simpler workaround: http://vanillaforums.org/discussion/comment/171058/#Comment_171058
I've tried like that it's working great... with "my" v2.1a33, thank you @peregrine
Thanks @peregrine that works!
@peregrine Thanks for the plugin, but when i enable it on Version 2.1a35 i get the following error in a red box:
There was an error getting the class methods.
Edit: For some reason i was fiddling about with the code and i caused and error when i reloaded the plugin page in the dashboard. I reverted my code fiddles to the original code and it was enabled when i reloaded the plugin page in the dash. Tested the view count on the forum and it works fine . I probably should of tried enabling it in the config now that i think of it.
Thanks for a great fix @peregrine