Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
how to get topic view number?
wzttest1
New
hi,
who can tell me how to get the topic view number?which db field has this value?
I tried to get the view number from the gdn_discussion table's CountViews field,but its value is always 1.I do not know why this happen.
My vanilla version is 2.0.18.4 with no plugins!
thanks!
0
Comments
http://vanillaforums.org/discussion/19727/view-count-my-solution
and
http://vanillaforums.org/discussion/comment/167011/#Comment_167011
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
hi,
thanks!
but I need the official solution!
First off - you should have stated you wanted the "Official solution". As you may note this forum is primarily "unofficial". Official comes from the developers, so you need to address them specifically and state you don't want unofficial solutions next time, even though they provide the solution to your question. geez.
I believe you need the analytics plugin enabled. Also testing from the same ip address on local host will not increment your views. I'll do my best not to provide any more unofficial solutions for you, since I am not an "official". Which begs the question - how many solutions, themes, and addons on this site are "official".
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hello,peregrine:
I'm novice of this forum.
I am very thank you for your help!!!
What your said means the same ip will not increase the topic view number?
What is the analytics plugin functions?
Thank you!
@wzttest1
Yes, I believe so, unless you make the unofficial change.
I don't recall exactly, it could be vanilla statistics has to be enabled.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine 's change here works perfectly fine for me. Only need to uncomment two lines of code.