|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
By: Ian Spence and gliderdad79 This is only for version 7.1 and greater In /cache_builders/forum_stats.php Find: $smarty->assign("maxonline",$maxonline); Add before: $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: $ubbt_lang['TOP_POSTERS'] = "Top Posters"; Add after: $ubbt_lang['POST_24HRS'] = "posts in the last 24hrs"; In /templates/default/island_forum_stats.tpl Find: <b>{$posts}</b> <?php echo $ubbt_lang['POSTS'] ?>
Add after: <b>{$recentposts}</b> <?php echo $ubbt_lang['POST_24HRS'] ?>
Last edited by Ian Spence; 01/14/2007 11:10 AM.
|
|
|
|
Joined: Mar 2006
Posts: 32
Beta Tester
|
Beta Tester
Joined: Mar 2006
Posts: 32 |
Thank you Ian for taking the time to re write this for 7.1 it is much appreciated 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
cool, thanks 
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Lookin Good 
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Thanks Ian 
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
not sure what I have done wrong, as it is straight forward - but it is not working for me.
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Mar 2006
Posts: 32
Beta Tester
|
Beta Tester
Joined: Mar 2006
Posts: 32 |
I havent been able to try it as I don't have 7.1 yet
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
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.
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Don't mind Ian, he's a PEBKAC lol
|
|
|
|
Joined: Mar 2006
Posts: 32
Beta Tester
|
Beta Tester
Joined: Mar 2006
Posts: 32 |
Thanks for the link to pebkac, after reading what it is I am dying over here.
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
I think everyone should have that as an "ActiveText" for the word "Dolt" lol
|
|
|
|
Joined: Nov 2003
Posts: 329
Beta Tester
|
Beta Tester
Joined: Nov 2003
Posts: 329 |
Cheers Ian works a treat 
BOOM 7.6.+ rocks....
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Grazi, works well 
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Works fine in 7.2 
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Mar 2006
Posts: 32
Beta Tester
|
Beta Tester
Joined: Mar 2006
Posts: 32 |
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 
|
|
|
|
Joined: Jul 2001
Posts: 808
Coder
|
Coder
Joined: Jul 2001
Posts: 808 |
|
|
|
|
Joined: Nov 2001
Posts: 134
Journeyman
|
Journeyman
Joined: Nov 2001
Posts: 134 |
Don't mind Ian, he's a PEBKAC lol I always prefered PICNIC Problem In Chair Not In Computer
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
should be instant - best bet is to clear your cache if it is not displaying straight away.
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Also make sure that you've applied the language portions as it seems to hang there.
|
|
|
|
Joined: Sep 2005
Posts: 136
Journeyman
|
Journeyman
Joined: Sep 2005
Posts: 136 |
I applied the language portion, it appears to be working
|
|
|
|
Joined: Mar 2006
Posts: 32
Beta Tester
|
Beta Tester
Joined: Mar 2006
Posts: 32 |
This is working in 7.3b4 with one small change. In /cache_builders/forum_stats.php 7.1 - 7.2 you would search for $smarty->assign("maxonline",$maxonline);
For 7.3b4 you will search for this instead $smarty->assign("maxonline", $cache['max_online']);
|
|
|
|
Joined: Nov 2003
Posts: 329
Beta Tester
|
Beta Tester
Joined: Nov 2003
Posts: 329 |
Excellent 
BOOM 7.6.+ rocks....
|
|
|
|
Joined: Apr 2007
Posts: 42
User
|
User
Joined: Apr 2007
Posts: 42 |
I'd like to use this - where exactly will this appear? (Any screenshots?)
Thank you!
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
It is showing in the footer of my forums. http://www.fansfocus.com
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Apr 2007
Posts: 42
User
|
User
Joined: Apr 2007
Posts: 42 |
Looks good - will see to that I think!
Thanks
|
|
|
|
Joined: Apr 2007
Posts: 42
User
|
User
Joined: Apr 2007
Posts: 42 |
Great! It works  thank you
|
|
|
|
Joined: Apr 2007
Posts: 42
User
|
User
Joined: Apr 2007
Posts: 42 |
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 (?)
|
|
|
|
Joined: Oct 2006
Posts: 21
Newbie
|
Newbie
Joined: Oct 2006
Posts: 21 |
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.
|
|
|
|
Joined: Oct 2006
Posts: 21
Newbie
|
Newbie
Joined: Oct 2006
Posts: 21 |
See the Average Daily Post count topic I'm creating for the "how to" here
Last edited by Carte Blanche; 05/31/2008 7:22 AM.
|
|
|
|
Joined: Nov 2003
Posts: 329
Beta Tester
|
Beta Tester
Joined: Nov 2003
Posts: 329 |
Confirmed this is working with version 7.6.1.1 Excellent 
BOOM 7.6.+ rocks....
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|