vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Display Enhancements - Stop Posts and Threads Counting Towards FORUMHOME Totals (https://vborg.vbsupport.ru/showthread.php?t=213217)

Stormraven 05-08-2009 10:00 PM

Stop Posts and Threads Counting Towards FORUMHOME Totals
 
This small mod was brought to you by CodersHangout.co.uk the Web Design and Web Development Forums. I use this small mod on my website, I did a quick search on here to see if it had already been posted but it hadn't, so I thought I would share it with you all.

If you want to stop posts and threads counting towards the totals on FORUMHOME, then this is how to do it.

You will need to modify the index.php file for this:

Find:

Code:

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


Replace with:

Code:

        foreach ($vbulletin->forumcache AS $id => $forum)
        {
                if ($id != XX)
                {
                        $totalthreads += $forum['threadcount'];
                        $totalposts += $forum['replycount'];
                }
        }


Replace the 'XX' with the ID of the forum that you want excluded from the FORUMHOME totals.


If you want to use this code for multiple forums, then use this:

Code:

if (($id != XX) && ($id != XX) && ($id != XX))

Please don't forget to click on the install button, and have a nice day :)

Brandon Sheley 05-09-2009 04:22 AM

nice idea, I have a section I might use this for

Sweeks 05-09-2009 11:21 AM

Thank you for this, installed and works great! I am wondering something, will this work when statistics are displayed within the header instead of the normal forumhome location?

Thanks

Princeton 05-10-2009 01:21 PM

no files - moved to graveyard


All times are GMT. The time now is 09:12 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.00994 seconds
  • Memory Usage 1,718KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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