Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 11-27-2009, 11:45 PM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nobody can help me with the last bit?
Reply With Quote
  #12  
Old 11-28-2009, 01:37 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
Reply With Quote
  #13  
Old 11-28-2009, 08:45 AM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #14  
Old 11-28-2009, 09:00 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ...
Reply With Quote
  #15  
Old 11-28-2009, 09:31 AM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dartho View Post
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

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 Do i need to update the counters or anything like that?
Reply With Quote
  #16  
Old 11-28-2009, 09:44 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Attached Files
File Type: xml vbulletin-plugins.xml (851 Bytes, 4 views)
Reply With Quote
  #17  
Old 11-28-2009, 11:33 PM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I just worked out whats going on 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

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
Reply With Quote
  #18  
Old 11-29-2009, 12:11 AM
dartho dartho is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 2,303
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #19  
Old 11-29-2009, 02:08 AM
RedTrinity's Avatar
RedTrinity RedTrinity is offline
 
Join Date: Mar 2008
Location: QLD, Australia
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it 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

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12471 seconds
  • Memory Usage 2,261KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete