PDA

View Full Version : how to get node view counter


putrasurya
07-07-2017, 05:59 AM
hello everyone!

i've tried to get some thread with this api http://vb5support.com/resources/api/vB_Api_Node.html

i can get how many post replay in this thread, but not able to get how many this thread has been viewed

any suggestions? thanks

best regards!
putra.

noypiscripter
07-07-2017, 10:14 PM
There's getNodeviews() method but it is protected and not public so you cannot call it from outside.

http://vb5support.com/resources/api/vB_Api_Node.html#method_getNodeviews

You can create your own API and copy that method and then make it public.

delicjous
07-08-2017, 10:44 AM
You could use the 'MergeNodeviewsForTopics' class.

But it work just for Header template (for me... don't know if you could put it to Forum_display_templates...)

I made you a small Mod.
Should be OK if you don't want to use your own class.

Don't test it at all nodes articles blogs ... but it show you one way to do it.