PDA

View Full Version : Total Views, replies and threads in forumdisplay_threadlist


Owen
02-20-2003, 06:26 PM
Would it be possible to show Total Views, replies and threads in forumdisplay_threadlist? Since there is a totalviews template hack and a simalar hack for showthread.

If its not possible I will try at vbulletin.org when they are done with servermove.

manex
02-20-2003, 06:57 PM
i think this will require hacking...butim not sure

Owen
02-20-2003, 07:01 PM
I was thinking it might be possible to do it through the phpinclude template.

filburt1
02-20-2003, 07:14 PM
It can be done by phpinclude. Here's a query that should do it:

mysql> select f.threadcount,f.replycount,sum(t.views) from forum f, thread t where t.forumid = 16 and f.forumid=16 group
by t.forumid;
+-------------+------------+--------------+
| threadcount | replycount | sum(t.views) |
+-------------+------------+--------------+
| 36 | 278 | 2405 |
+-------------+------------+--------------+
1 row in set (0.04 sec)

Owen
02-20-2003, 07:26 PM
DO I need to run that query for every forum? and how would I apply it in my template?

filburt1
02-20-2003, 07:52 PM
I'm a bit too busy to release a mod but if somebody else wants to (using PAPI naturally :p) that query seems to work nicely. Just remember to add AS clauses everywhere.

Owen
02-20-2003, 08:18 PM
Uhm I am afraid I dont understand. [blush]

I would really really apreciate it if someone would release this as a mod.

imported_Jamie
02-20-2003, 08:21 PM
Is there not something like this already released?

Owen
02-20-2003, 08:23 PM
no, or I wouldnt have posted this...