PDA

View Full Version : How do I for the following equation for forumdisplay.php (POSTS - THREADS)...


Sean
08-10-2002, 10:55 PM
I want to show the number of comments, instead of posts. Therefore, the number of posts MINUS the threads.

Example:

Forum Help:
Posts: 17
Threads: 7
Comments: 10

Get it? :D

Anyone know how? I tried a few things in forumdisplay.php, but they didn't work.

Thanks.

Kratheous
08-10-2002, 11:17 PM
Hmmm.. if you wanted to do this for forums on the main page, you'd edit index.php... I'm assuming you could put

$forum[commentcount] = $forum[threadcount] - $forum[replycount];

in there... I think at about line 109... and actually, the same code in forumdisplay.php at about line 130... then in Forum Home's and Forum Display's forumheader stuff, put another column in (or replace the Reply column) and then in their forumbit stuff, add another column or replace $forum[replycount] with $forum[commentcount]. Now, mind you, I'm not 100% positive that'll work, but it should.

Sean
08-10-2002, 11:18 PM
Thanks! I'll try that out when I get a chance and let you know. :D

Could you help with this other problem of mine?

https://vborg.vbsupport.ru/showthread.php?s=&threadid=41519

[D]Vincent
08-10-2002, 11:18 PM
If I'm not mistaken wouldn't it make more sense for the reply count to be basically what he's asking for?

Sean
08-11-2002, 04:57 PM
Got it. Your line number didn't work, but I moved it around a little, and found that this works:

Put:
$forum['commentcount'] = $forum['replycount'] - $forum['threadcount'];
in line 124, right above:
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forum[forumid]"] = $forum;

Than put $forum[commentcount] in forumdisplaybit.

Thanks for the main starting idea, it helped me get off the ground. :D