Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-12-2011, 11:25 PM
the1rabbits the1rabbits is offline
 
Join Date: Apr 2011
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Number Change Help

I previously ran a ProBoards forum and unfortunately discovered that there is no ProBoards to vBulletin converter. Of course I am much happier with vBulleting but I am hoping it is possible to do the following.

My ProBoards forum had over 60, 000 threads and over 700,000 posts. Is it possible to reflect these numbers in my newly created forum?

Basically I would like to change the Threads: Posts: number so it starts off at 60,000 and 700,000. (as well as the global statistics at the bottom of the site)

Is this possible? And how do I go about doing it

Thanks
the1rabbits
Reply With Quote
  #2  
Old 04-13-2011, 03:00 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unfortuntely, the totalthreads and totalposts variable has been formatted by the time you get to the forumhome_complete hook, so you would have to actually edit these lines to add it in in the forum.php file:
PHP Code:
$totalthreads vb_number_format($totalthreads);
$totalposts vb_number_format($totalposts); 
Something like adding this right above:
PHP Code:
$totalthreads $totalthreads 60000;
$totalposts $totalposts 700000
If you show those stats elsewhere, then you will need to modify the code there too.
Reply With Quote
  #3  
Old 04-13-2011, 03:43 AM
the1rabbits the1rabbits is offline
 
Join Date: Apr 2011
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your response Lynne

Sorry though I am not an advanced user when it comes to PHP coding so I will need a bit of extra help.

I would like to add those respective amount to one particular sub forum and the total statistics at the bottom of the page.

With what you have suggested above does that fix both of what I am looking to do.

Thanks Lynne
Reply With Quote
  #4  
Old 04-13-2011, 04:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The above code only fixes it for the total on the bottom of the forum.php page. If you need to add to the total for a specific forum, you can try a plugin (look in the manual if you need help) using the hook location "forumbit_display" and this code (change x to your forumid):
PHP Code:
if ($forum['forumid'] == x) {
$forum['threadcount'] = vb_number_format($forum['threadcount'] + 60000);
$forum['replycount'] = vb_number_format($forum['replycount'] + 700000);

Reply With Quote
  #5  
Old 04-14-2011, 12:06 AM
the1rabbits the1rabbits is offline
 
Join Date: Apr 2011
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So would this be correct if I were to re-upload my forum.php like this:

PHP Code:
// ### BOARD STATISTICS #################################################

// get total threads & posts from the forumcache
$totalthreads 0;
$totalposts 0;
if (
is_array($vbulletin->forumcache))
{
    foreach (
$vbulletin->forumcache AS $forum)
    {
        
$totalthreads += $forum['threadcount'];
        
$totalposts += $forum['replycount'];
    }
}
$totalthreads $totalthreads 60000;
$totalposts $totalposts 700000;  

$totalthreads vb_number_format($totalthreads);
$totalposts vb_number_format($totalposts); 
Also I am sorry Lynne, however I need further clarification on your above post. Where exactly should I be looking in the manual to help me out there? And what file to I have to place the forumid code in?
Reply With Quote
  #6  
Old 04-14-2011, 02:59 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I think that code looks correct. Upload it to your test site first if you are not sure - that is what they are for.

As for the plugin code, here is the section in the manual about plugins - Plugin System
Reply With Quote
  #7  
Old 04-14-2011, 03:33 AM
the1rabbits the1rabbits is offline
 
Join Date: Apr 2011
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Yes, I think that code looks correct. Upload it to your test site first if you are not sure - that is what they are for.

As for the plugin code, here is the section in the manual about plugins - Plugin System
Thanks Lynne! Test site? I was unaware that I actually had a test site, how do I access it? Or am I being ignorant once again? Do I have to create a test site. Sorry Lynee, I am really new to vBulletin and really do appreciate your help.

Just a quick question on the plugin... Does it matter what number I place in the 'Execution Order' field?
Reply With Quote
  #8  
Old 04-14-2011, 04:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to create a test site. There are instructions in the Home tab over on vbulletin.com on how to create one. You don't *need* one, but I would certainly never run a site without one. I always test any modifications on my test site first.

Just leave the execution order alone. Usually it doesn't matter. It only matters if you have another plugins running that uses the same hook location and they are not playing nice with each other unless you run one before the other.
Reply With Quote
  #9  
Old 04-14-2011, 10:47 PM
the1rabbits the1rabbits is offline
 
Join Date: Apr 2011
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much Lynne. I'll set up my test site soon

If I have any more questions I will be sure to come back and post here. Thankyou

--------------- Added [DATE]1302838155[/DATE] at [TIME]1302838155[/TIME] ---------------

Thank you Lynne

I have set up my test site and successfully implemented the changes there. I then implemented them on my LIVE site and all is good.

Thank you for your assistance
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 02:21 AM.


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.04146 seconds
  • Memory Usage 2,253KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete