Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
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:
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
Joined: Mar 2006
Posts: 32
Beta Tester
Beta Tester
Offline
Joined: Mar 2006
Posts: 32
Thank you Ian for taking the time to re write this for 7.1 it is much appreciated thumbsup

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 smile


- Allen wavey
- What Drives You?
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 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, My UBB Scripts
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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
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 wink at the moment - but expanding all the time....)
Joined: Mar 2006
Posts: 32
Beta Tester
Beta Tester
Offline
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 wink 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


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, My UBB Scripts
Joined: Mar 2006
Posts: 32
Beta Tester
Beta Tester
Offline
Joined: Mar 2006
Posts: 32
Thanks for the link to pebkac, after reading what it is I am dying over here.

Sponsored Links
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


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, My UBB Scripts
Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
Cheers Ian works a treat wink


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 smile


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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....)
Joined: Mar 2006
Posts: 32
Beta Tester
Beta Tester
Offline
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

Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
Yes, works for me too.

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
Originally Posted by Gizmo
Don't mind Ian, he's a PEBKAC lol

I always prefered PICNIC

Problem In Chair Not In Computer

Joined: Sep 2005
Posts: 136
Journeyman
Journeyman
Offline
Joined: Sep 2005
Posts: 136
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

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 wink 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.


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, My UBB Scripts
Joined: Sep 2005
Posts: 136
Journeyman
Journeyman
Offline
Joined: Sep 2005
Posts: 136
I applied the language portion, it appears to be working

Joined: Mar 2006
Posts: 32
Beta Tester
Beta Tester
Offline
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']); 


Joined: Nov 2003
Posts: 329
Beta Tester
Beta Tester
Offline
Joined: Nov 2003
Posts: 329
Excellent smile


BOOM 7.6.+ rocks....
Joined: Apr 2007
Posts: 42
User
User
Offline
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 wink at the moment - but expanding all the time....)
Joined: Apr 2007
Posts: 42
User
User
Offline
Joined: Apr 2007
Posts: 42
Looks good - will see to that I think!

Thanks

Joined: Apr 2007
Posts: 42
User
User
Offline
Joined: Apr 2007
Posts: 42
Great! It works smile

thank you

Joined: Apr 2007
Posts: 42
User
User
Offline
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
Offline
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
Offline
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
Offline
Joined: Nov 2003
Posts: 329
Confirmed this is working with version 7.6.1.1

Excellent smile


BOOM 7.6.+ rocks....

Link Copied to Clipboard
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
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)