MyBB Community Forums

Full Version: Recount / Rebuild
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Future consideration for MyBB,

This is looking ahead somewhat, As MyBB sees more larger forums in use and people using a dedicated server for their MyBB forums.

Idea-
Example:
During Recount/Rebuild- Click Process, next screen would show how many posts/attachments etc.. are left to process.

I also think this would come in handy for people on shared systems also. It would benefit everyone.

Regards
I think that's a good UI idea and it shouldn't be too hard to implement.
You know what else would be nice but possibly over the top? Is to have a progress bar also. You would have the exact physical number plus a progress bar for percentage of completion Big Grin Just another thought.

Kind Regards
I was going to suggest this as some point. It would be useful to see "Page 2 of 10" at least.
Sorry for reviving such an old thread. Didn't find any newer ones. Toungue

Recount & Rebuild

Click "Proceed" to continue the recount and rebuild process.

20250 / 100001 (20.2497%)

ETA: 13 hours, 56 minutes

[ Proceed ]

Some rough code for admin/modules/tools/recount_rebuild.php:

header("Refresh: 0; url={$mybb->settings['bburl']}/admin/index.php?module=tools-recount_rebuild&page={$next_page}&{$name}=$per_page&$name2={$lang->go}");
echo "<p>$finish / $current (".(floatval($finish)/$current*100)."%)</p>";
global $maintimer;
$maintimer->stop();
$remaining = $maintimer->totaltime * floatval($current-$finish)/$per_page;
echo "<p>ETA: ".intval(floor($remaining/60/60))." hours, ".number_format(($remaining-floor($remaining/60/60)*60*60)/60, 2)." minutes.</p>";

What this code does:

- Redirects are done through HTTP refresh header instead of JavaScript (so you can run this with lynx/links from a shell screen and/or with JS disabled)
- Shows progress as current / total / percentage
- Shows (rough) estimated time until finish (based on page generation time)

Of course for actual implementation in MyBB the code would have to be polished up a little, but it can be done without much effort...

EDIT: Oh, I also changed the request method post condition to allow the http refresh. For a clean implementation I guess the post key should go in there too but oh well...