UBB.Dev
By: Ian Spence and gliderdad79

This is only for version 7.1 and greater

In /cache_builders/forum_stats.php
Find:
Code
$smarty->assign("maxonline",$maxonline);

Add before:
Code
$query = "
SELECT count(POST_ID)
FROM {$config['TABLE_PREFIX']}POSTS
WHERE POST_POSTED_TIME > ?
";

$sth = $dbh->do_placeholder_query( $query, array( $html->get_date() - 86400 ), __LINE__, __FILE__ );
list( $posts_24hrs ) = $dbh->fetch_array( $sth );

$smarty->assign("recentposts", $posts_24hrs );

In /languages/english/portal_islands.php
Find:
Code
$ubbt_lang['TOP_POSTERS'] = "Top Posters";

Add after:
Code
$ubbt_lang['POST_24HRS'] = "posts in the last 24hrs";

In /templates/default/island_forum_stats.tpl
Find:
Code
<b>{$posts}</b> <?php echo $ubbt_lang['POSTS'] ?>

Add after:
Code
<b>{$recentposts}</b> <?php echo $ubbt_lang['POST_24HRS'] ?>

Thank you Ian for taking the time to re write this for 7.1 it is much appreciated thumbsup
cool, thanks smile
Lookin Good wink
Thanks Ian smile
not sure what I have done wrong, as it is straight forward - but it is not working for me.
I havent been able to try it as I don't have 7.1 yet
ignore me - redone it, and it is fine - not sure what I did wrong - but cleared the cache a couple of times and it is fine. Weird.
Don't mind Ian, he's a PEBKAC lol
Thanks for the link to pebkac, after reading what it is I am dying over here.
I think everyone should have that as an "ActiveText" for the word "Dolt" lol
Cheers Ian works a treat wink
Grazi, works well smile
Works fine in 7.2 smile
Thanks Ian for letting us know. Trying to figure out which I am hacks gona need to rework on my site. Glad to hear it works and it dont need reworking laugh
Yes, works for me too.
Originally Posted by Gizmo
Don't mind Ian, he's a PEBKAC lol

I always prefered PICNIC

Problem In Chair Not In Computer
Is this mod supposed to be instant, or will it appear after 24 hours?
http://riddledindarkness.com/hprpg/ubbthreads.php?ubb=cfrm

Top Right corner of the page
should be instant - best bet is to clear your cache if it is not displaying straight away.
Also make sure that you've applied the language portions as it seems to hang there.
I applied the language portion, it appears to be working
This is working in 7.3b4 with one small change.

In /cache_builders/forum_stats.php

7.1 - 7.2 you would search for
Code

$smarty->assign("maxonline",$maxonline);

For 7.3b4 you will search for this instead
Code
$smarty->assign("maxonline", $cache['max_online']); 

Excellent smile
I'd like to use this - where exactly will this appear? (Any screenshots?)

Thank you!
It is showing in the footer of my forums.

http://www.fansfocus.com

Looks good - will see to that I think!

Thanks
Great! It works smile

thank you
Here's another that would be good:

Average number of posts per day

I suppose (perhaps incorrectly) that that might be a a fairly simple addition (?)
Probably, just would need to define the length of time you'd go back to do your averaging over and also decide if you'd want to show decimals or use modulo to determine whether you should round up or down if you're just looking for integer values.
See the Average Daily Post count topic I'm creating for the "how to" here
Confirmed this is working with version 7.6.1.1

Excellent smile
© UBB.Developers