vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How do I for the following equation for forumdisplay.php (POSTS - THREADS)... (https://vborg.vbsupport.ru/showthread.php?t=42142)

Sean 08-10-2002 10:55 PM

How do I for the following equation for forumdisplay.php (POSTS - THREADS)...
 
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

PHP Code:

$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/showthrea...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:
PHP Code:

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

in line 124, right above:
PHP Code:

$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


All times are GMT. The time now is 03:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01106 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete