Register Members List Search Today's Posts Mark Forums Read

Thread Tools
Old 07 Jul 2017, 08:59
putrasurya putrasurya is offline
Join Date: Jun 2017
how to get node view counter

hello everyone!

i've tried to get some thread with this api

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!
Reply With Quote
Old 08 Jul 2017, 01:14
noypiscripter's Avatar
noypiscripter noypiscripter is offline
Join Date: Aug 2013
There's getNodeviews() method but it is protected and not public so you cannot call it from outside.

You can create your own API and copy that method and then make it public.
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
Old 08 Jul 2017, 13:44
delicjous's Avatar
delicjous delicjous is offline
Join Date: Nov 2014
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.
Attached Files
File Type: xml product_ForumNodeViews.xml (2.8 KB, 5 views)
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 18:22.

Layout Options | Width: Wide Color: