vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Forum Post Count (https://vborg.vbsupport.ru/showthread.php?t=201682)

Nintendo-Daily 01-15-2009 12:24 AM

Thanks so much Lynne. What file is that though and where is it located? I looked in the "functions_forumlist.php" file and it wasn't in there. Well, I did a search in the file for "$forumpostcount" and didn't find it.

Lynne 01-15-2009 02:38 AM

It's at the bottom of the index.php page. The line in red is what I added, so you aren't going to find $forumpostcount anywhere.

Nintendo-Daily 01-15-2009 03:28 AM

Thanks, Lynne. I am still confused about what I need this to look like exactly though.

if ($forum['forumid'] == xx) $forumpostcount = $forum['replycount'];

Could you maybe give me an example so I don't mess anything up?

Lynne 01-15-2009 03:42 AM

xx is the forumid you want to get the post count of and then it will be stored in $forumpostcount (or whatever you want to call that variable). Then you can use that number to calculate the total posts on the board minus those in that forum.

Dismounted 01-15-2009 04:36 AM

You must do the calculation in the file before the reply count is formatted using vb_number_format().

Nintendo-Daily 01-15-2009 09:02 PM

OK, I am officially confused now :(

@ Lynne: Are you saying all I have to do is insert that line of code but just add the forum ID for the forum I wish not to count toward the board's total count?

@ Dismounted: huh?

Lynne 01-15-2009 09:34 PM

Add that line, but change the xx to the forum id. Then, the line will give you the post count in that forum. Then, outside of the loop, you need to perform your calculation ($totalposts - $forumpostcount) and, as Hanson said, you need to do that before you format the number (a couple lines down from that code).

I would strongly suggest you just play with this on your test site. You will learn a lot by just trying things out. That will help you in the long run because you will be more willing to modify other modifications and personalize your site.

Nintendo-Daily 01-15-2009 09:39 PM

unfortunately, I don't have a test site. Also, what do you mean when you say outside of the loop?

Lynne 01-15-2009 09:54 PM

PHP Looping

Step by Step: Create a test forum based on a 'snapshot' of your live one


All times are GMT. The time now is 06:18 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.01282 seconds
  • Memory Usage 1,729KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete