vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Freezing postcounts during board cleanup (https://vborg.vbsupport.ru/showthread.php?t=225751)

RedTrinity 11-27-2009 11:45 PM

Nobody can help me with the last bit? :)

dartho 11-28-2009 01:37 AM

Create a new plugin:
Product: vBulletin
Hook Location: forumhome_complete
Name: Restore ForumHome Stats
Execution Order: 5
Plugin PHP Code:

Code:

function stripcomma($string){
  $string = str_replace(',', '', $string);
  return $string;
}

/*
 Enter in the figures you need to. Suggest you  make notes too for your own future reference
 Deleted 10,000 users, threads and posts on December 23 2008 added back in here
*/

$num_deleted_threads =10000;
$num_deleted_posts=10000;
$num_deleted_users=10000;

$totalthreads=vb_number_format(stripcomma($totalthreads)+$num_deleted_threads);
$totalposts=vb_number_format(stripcomma($totalposts)+$num_deleted_posts);
$numbermembers=vb_number_format(stripcomma($numbermembers)+$num_deleted_users);

Modify the following as required.
Code:

$num_deleted_threads =10000;
$num_deleted_posts=10000;
$num_deleted_users=10000;


RedTrinity 11-28-2009 08:45 AM

Hi Dartho,

Thanks for your help. I followed your instructions and set the following, which were the stats for our forum prior to the board cleanup...

Quote:

$num_deleted_threads=25,627;
$num_deleted_posts=421,341;
$num_deleted_users=1,087;
Have activated the plugin, but the stats haven't changed at all - they reflect the aftermath still. Have I done it correctly? :)

dartho 11-28-2009 09:00 AM

no commas!

BTW - don't put in the totals, put in teh number you deleted.

eg. if now (after the clean up) you have 5000 threads and previously you had 25627, then $num_deleted_threads=20627; etc ...

RedTrinity 11-28-2009 09:31 AM

Quote:

Originally Posted by dartho (Post 1921980)
no commas!

BTW - don't put in the totals, put in teh number you deleted.

eg. if now (after the clean up) you have 5000 threads and previously you had 25627, then $num_deleted_threads=20627; etc ...

Oh bugger, I have no idea how many I deleted LOL... I suppose that means I'm gonna have to do the math now, going by the current totals :p ;)

I'll give it a shot now and see how I go, thanks again :)

ETA: Ok, I altered the amounts to reflect the deletions:

Quote:

$num_deleted_threads=15548;
$num_deleted_posts=247368;
$num_deleted_users=0;
Made sure the plugin is active, still no change though :confused: Do i need to update the counters or anything like that?

dartho 11-28-2009 09:44 AM

1 Attachment(s)
I tested on my live site - let me just check that I haven't missed a vital point...


[Edit]
Tested and working on my site...

I exported teh plugin so it is definately identical - try uploading the attached (disable/delete the one you created manually first)

RedTrinity 11-28-2009 11:33 PM

Ok I just worked out whats going on :D The default display for our forum stats (ie. at the foot of the forum) is right ie. the plugin is working correctly :) Its the VBAdvanced forum stats box in the left side column thats still wrong :rolleyes:

I don't suppose there is an easy fix to get it working for that too? :)

Its not a huge issue if not, I am grateful for your help regardless Dartho :) Just means I'll have to either edit/remove that box, since its not the same!

Let me know :)

dartho 11-29-2009 12:11 AM

You could create another plugin with the same code and put it on

Product: vBadvanved CMPS
Hook Location: vba_cmps_module_stats (vbacmps)
Title: vBadvanced Stats

RedTrinity 11-29-2009 02:08 AM

Got it :D Its all fixed!!!

Thank you so much for all your help!!! I really appreciate it :) Our forum is nice and tidy now - and taking up a lot less database space :)

Cheers :D

ETA: Bugger, spoke too soon... the VBA stats work on all forum pages except for the index page - which goes blank when this plugin is active :S


All times are GMT. The time now is 08:13 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.01033 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (3)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
  • (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