Edit thread counter

AFT

Member
Hi everyone, I was wondering if someone could please help me?

I transferred my site over from vBulletin to XF and currently have XenForo 1.5.14 installed. I wanted to add the number of views onto the total views of the same thread on XF to keep track of the amount of people who have looked at this thread but don't know how to edit the thread counter.
Is it possible to edit the thread counter?

Regards,
Craig
 
@AFT The xf_thread database table has a column view_count, so yes I it would be doable. It appears that xf_thread_view logs the thread views, but then the views get tallied into view_count in xf_thread, and xf_thread_view then gets truncated.

So if vBulletin had a similar thread table, my guess on how you'd do this would be to: import that old table into your xenforo database, run a query that matches old threads to new threads (e.g. thread title, or if the thread_id is kept the same in the transfer process, use that), and on matches update the xf_thread view_count with the sum of the old thread count and the current one, and then delete the old table. Sounds straightforward as long as you can reliably match old threads to new ones (which I suspect).
 
Last edited:
Back
Top Bottom