Previous Thread
Next Thread
Print Thread
Rate Thread
[7.1] Forum Stats: Posts in the last 24 hours. #312664
01/13/2007 7:36 PM
01/13/2007 7:36 PM
Joined: Jan 2003
Posts: 3,765
Saint Johns, PA
I
Ian Spence Offline OP
Master Hacker
Ian Spence  Offline OP
Master Hacker
I
Joined: Jan 2003
Posts: 3,765
Saint Johns, PA
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'] ?>



Last edited by Ian Spence; 01/14/2007 11:10 AM.
Sponsored Links
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian Spence] #312667
01/14/2007 5:04 AM
01/14/2007 5:04 AM
Joined: Mar 2006
Posts: 32
G
gliderdad Offline
Beta Tester
gliderdad  Offline
Beta Tester
G
Joined: Mar 2006
Posts: 32
Thank you Ian for taking the time to re write this for 7.1 it is much appreciated thumbsup

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: gliderdad] #312670
01/14/2007 10:28 AM
01/14/2007 10:28 AM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
Texas
cool, thanks smile


- Allen wavey
- What Drives You?
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: AllenAyres] #312673
01/14/2007 8:24 PM
01/14/2007 8:24 PM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Lookin Good wink


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #312684
01/15/2007 3:42 AM
01/15/2007 3:42 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
Thanks Ian smile


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Sponsored Links
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #312686
01/15/2007 7:22 AM
01/15/2007 7:22 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
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 wink at the moment - but expanding all the time....)
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #312688
01/15/2007 7:25 AM
01/15/2007 7:25 AM
Joined: Mar 2006
Posts: 32
G
gliderdad Offline
Beta Tester
gliderdad  Offline
Beta Tester
G
Joined: Mar 2006
Posts: 32
I havent been able to try it as I don't have 7.1 yet

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: gliderdad] #312690
01/15/2007 7:36 AM
01/15/2007 7:36 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
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 wink at the moment - but expanding all the time....)
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #312695
01/15/2007 8:01 AM
01/15/2007 8:01 AM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Don't mind Ian, he's a PEBKAC lol


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #312704
01/15/2007 10:29 AM
01/15/2007 10:29 AM
Joined: Mar 2006
Posts: 32
G
gliderdad Offline
Beta Tester
gliderdad  Offline
Beta Tester
G
Joined: Mar 2006
Posts: 32
Thanks for the link to pebkac, after reading what it is I am dying over here.

Sponsored Links
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: gliderdad] #312715
01/15/2007 8:06 PM
01/15/2007 8:06 PM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
I think everyone should have that as an "ActiveText" for the word "Dolt" lol


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #313274
02/25/2007 8:56 PM
02/25/2007 8:56 PM
Joined: Nov 2003
Posts: 331
UK
M
Mark_S Offline

Beta Tester
Mark_S  Offline

Beta Tester
M
Joined: Nov 2003
Posts: 331
UK
Cheers Ian works a treat wink


BOOM 7.6.+ rocks....
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Mark_S] #313402
03/05/2007 10:08 PM
03/05/2007 10:08 PM
Joined: Mar 2000
Posts: 25,587
Texas
AllenAyres Offline
I type Like navaho
AllenAyres  Offline
I type Like navaho
Joined: Mar 2000
Posts: 25,587
Texas
Grazi, works well smile


- Allen wavey
- What Drives You?
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: AllenAyres] #314625
06/28/2007 1:40 AM
06/28/2007 1:40 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
Works fine in 7.2 smile


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #314629
06/29/2007 1:00 AM
06/29/2007 1:00 AM
Joined: Mar 2006
Posts: 32
G
gliderdad Offline
Beta Tester
gliderdad  Offline
Beta Tester
G
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 laugh

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: gliderdad] #314764
07/17/2007 3:09 PM
07/17/2007 3:09 PM
Joined: Jul 2001
Posts: 811
Berlin, Germany
Zarzal Offline
Coder
Zarzal  Offline
Coder
Joined: Jul 2001
Posts: 811
Berlin, Germany
Yes, works for me too.

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #315820
09/25/2007 5:04 AM
09/25/2007 5:04 AM
Joined: Nov 2001
Posts: 137
M
MattUK Offline
Journeyman
MattUK  Offline
Journeyman
M
Joined: Nov 2001
Posts: 137
Originally Posted by Gizmo
Don't mind Ian, he's a PEBKAC lol


I always prefered PICNIC

Problem In Chair Not In Computer

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: MattUK] #315964
10/06/2007 9:26 PM
10/06/2007 9:26 PM
Joined: Sep 2005
Posts: 137
Columbus, OH
A
AshtarRose Offline
Journeyman
AshtarRose  Offline
Journeyman
A
Joined: Sep 2005
Posts: 137
Columbus, OH
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

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: AshtarRose] #315970
10/07/2007 3:43 AM
10/07/2007 3:43 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
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 wink at the moment - but expanding all the time....)
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #315971
10/07/2007 9:15 AM
10/07/2007 9:15 AM
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Gizmo Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Gizmo  Offline

UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,938
Portland, OR, USA
Also make sure that you've applied the language portions as it seems to hang there.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #315974
10/07/2007 10:31 AM
10/07/2007 10:31 AM
Joined: Sep 2005
Posts: 137
Columbus, OH
A
AshtarRose Offline
Journeyman
AshtarRose  Offline
Journeyman
A
Joined: Sep 2005
Posts: 137
Columbus, OH
I applied the language portion, it appears to be working

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: AshtarRose] #316720
02/15/2008 6:51 PM
02/15/2008 6:51 PM
Joined: Mar 2006
Posts: 32
G
gliderdad Offline
Beta Tester
gliderdad  Offline
Beta Tester
G
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
Code
$smarty->assign("maxonline",$maxonline);


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



Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: gliderdad] #316734
02/19/2008 3:42 PM
02/19/2008 3:42 PM
Joined: Nov 2003
Posts: 331
UK
M
Mark_S Offline

Beta Tester
Mark_S  Offline

Beta Tester
M
Joined: Nov 2003
Posts: 331
UK
Excellent smile


BOOM 7.6.+ rocks....
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #317083
05/28/2008 7:06 PM
05/28/2008 7:06 PM
Joined: Apr 2007
Posts: 42
W
willing Offline
User
willing  Offline
User
W
Joined: Apr 2007
Posts: 42
I'd like to use this - where exactly will this appear? (Any screenshots?)

Thank you!

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: willing] #317087
05/29/2008 2:47 AM
05/29/2008 2:47 AM
Joined: Feb 2002
Posts: 2,575
England
Ian_W Offline
Veteran
Ian_W  Offline
Veteran
Joined: Feb 2002
Posts: 2,575
England
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 wink at the moment - but expanding all the time....)
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian_W] #317088
05/29/2008 3:47 AM
05/29/2008 3:47 AM
Joined: Apr 2007
Posts: 42
W
willing Offline
User
willing  Offline
User
W
Joined: Apr 2007
Posts: 42
Looks good - will see to that I think!

Thanks

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Gizmo] #317089
05/29/2008 4:16 AM
05/29/2008 4:16 AM
Joined: Apr 2007
Posts: 42
W
willing Offline
User
willing  Offline
User
W
Joined: Apr 2007
Posts: 42
Great! It works smile

thank you

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: willing] #317109
05/31/2008 1:54 AM
05/31/2008 1:54 AM
Joined: Apr 2007
Posts: 42
W
willing Offline
User
willing  Offline
User
W
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 (?)

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: willing] #317114
05/31/2008 6:20 AM
05/31/2008 6:20 AM
Joined: Oct 2006
Posts: 21
Auckland, NZ
C
Carte Blanche Offline
Newbie
Carte Blanche  Offline
Newbie
C
Joined: Oct 2006
Posts: 21
Auckland, NZ
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.

Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Carte Blanche] #317115
05/31/2008 6:53 AM
05/31/2008 6:53 AM
Joined: Oct 2006
Posts: 21
Auckland, NZ
C
Carte Blanche Offline
Newbie
Carte Blanche  Offline
Newbie
C
Joined: Oct 2006
Posts: 21
Auckland, NZ
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.
Re: [7.1] Forum Stats: Posts in the last 24 hours. [Re: Ian Spence] #322931
01/15/2018 3:01 PM
01/15/2018 3:01 PM
Joined: Nov 2003
Posts: 331
UK
M
Mark_S Offline

Beta Tester
Mark_S  Offline

Beta Tester
M
Joined: Nov 2003
Posts: 331
UK
Confirmed this is working with version 7.6.1.1

Excellent smile


BOOM 7.6.+ rocks....

Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with, and recommend, the following Web Hosts:
· Stable Host
· Blue Host
· Interserver.net
Visit Us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,170
Joined: July 2001
Show All Member Profiles 
Forum Statistics
Forums64
Topics37,448
Posts293,484
Members13,793
Most Online1,498
Mar 17th, 2017
Top Posters(All Time)
AllenAyres 25,587
JoshPet 11,330
Rick 8,373
LK 7,396
Lord Dexter 6,503
Gizmo 5,938
Greg Hard 5,533
Top Posters(30 Days)
isaac 4
Today's Statistics
Currently Online 732
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 21
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2018 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.6.2
(Preview build 20180611.dev)
Page Time: 0.074s Queries: 15 (0.015s) Memory: 3.4837 MB (Peak: 3.8276 MB) Zlib enabled. Server Time: 2018-06-21 23:43:29 UTC