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-13-2009 10:22 PM

Forum Post Count
 
I want the total post count for a forum on my vBulletin Board to not count toward the board's total post count. Can this be done?

Bellardia 01-13-2009 11:28 PM

Forums And Moderators > Forum Manager > Find the one you want > Count Posts Made in this Forum Towards User Post Counts > No!

Nintendo-Daily 01-13-2009 11:31 PM

Quote:

Originally Posted by Bellardia (Post 1711527)
Forums And Moderators > Forum Manager > Find the one you want > Count Posts Made in this Forum Towards User Post Counts > No!

Wrong.

Not user post counts, total board count. Basically, I want to subtract the number of posts already in a forum from the board total.

Bellardia 01-13-2009 11:46 PM

Ah, poor reading on my part :(

Not sure of any ways to do it without editing the code or manipulating it with a plugin.

Nintendo-Daily 01-14-2009 04:28 PM

Does anyone else know how to do this?

Lynne 01-14-2009 05:06 PM

Are you simply talking about the post count on the index.php page? It looks like the total post count is grabbed from the forumcache and you can probably use construct_forum_bit (in functions_forumlist.php) to get the reply count for that particular forum and then just do a quick calculation to spit out what you want.

Nintendo-Daily 01-14-2009 09:42 PM

Thanks Lynne. I have no idea how I would do that though. Any advice?

Lynne 01-14-2009 11:04 PM

Quote:

Originally Posted by Nintendo-Daily (Post 1712616)
Thanks Lynne. I have no idea how I would do that though. Any advice?

I'd go find the function I was talking about and also read about it in here - http://members.vbulletin.com/api/ I'd also see how the function was used previously so you see what goes in and what comes out. Then just add the code into the index page at the bottom under where the total postcount is grabbed from the cache.

iBardia 01-14-2009 11:09 PM

I get what you are saying.

Seems pretty hard though..

Lynne 01-14-2009 11:45 PM

Actually, I just relooked and saw it's already there in the cache (and I don't know what I was thinking of using that function - middle of the afternoon brain fart or something). You can see it totaling up the posts in the function, just grab the total for that forum and do what you want with it:

Code:

if (is_array($vbulletin->forumcache))
{
    foreach ($vbulletin->forumcache AS $forum)
    {
        $totalthreads += $forum['threadcount'];
        $totalposts += $forum['replycount'];
        if ($forum['forumid'] == xx) $forumpostcount = $forum['replycount'];
    }
}



All times are GMT. The time now is 05:27 AM.

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.01079 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)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (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
  • (10)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