Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2005
Posts: 17
Junior Member
Junior Member
Offline
Joined: Jun 2005
Posts: 17
How could I get the total monthly pageviews statistic to appear on my forum summary page? It appears on the control panel page, per below. Could that segment be moved just below my copywrite info at the page bottom of the forum summary (or next to the total members statistic.)

Still working with 6.7.2 but have upgraded though not installed 6.7.3. Much, much thanks!

from cp2_home.pl:

my $pageview_string;
my $total_hits;

if($monthly_hits > 0) { # old hit counter format
if(($cache_hits > 0) && ($dynamic_hits > 0)) {
$total_hits = $cache_hits + $dynamic_hits;
my $perc_dynamic = sprintf("%2.3f", $dynamic_hits / $total_hits);
my $perc_cache = 100 * sprintf("%.4f", $cache_hits / $total_hits);
$pageview_string = <$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): $total_hits

$vars_wordlets_cp2{home_pageviews_cached}: $perc_cache%

THEEND
} else {
$total_hits = $cache_hits + $dynamic_hits + $monthly_hits;
$pageview_string = <$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): $total_hits

THEEND
} # end if
} else { # new hit counter format
if(($cache_hits > 0) && ($dynamic_hits > 0)) {
$total_hits = $cache_hits + $dynamic_hits;
my $perc_dynamic = sprintf("%2.3f", $dynamic_hits / $total_hits);
my $perc_cache = 100 * sprintf("%.4f", $cache_hits / $total_hits);
$pageview_string = <$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): $total_hits

$vars_wordlets_cp2{home_pageviews_cached}: $perc_cache%

THEEND
} else {
$total_hits = $cache_hits + $dynamic_hits + $monthly_hits;
$pageview_string = <$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): $total_hits

THEEND
} # end if
} # end if

Sponsored Links
Joined: Mar 2000
Posts: 21,080
Likes: 3
I type like Navaho
I type like Navaho
Joined: Mar 2000
Posts: 21,080
Likes: 3
You'd need to require that wordlet file too ($vars_wordlets_cp2), but it looks like it should work.

You could also try requiring the template fiel itself and just putting this where you want it:

$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): $total_hits


Not sure if it would work, haven't touched classic except for imports for a while now - will always remain my fave forum, just don't use it anymore smirk


- Allen wavey
- What Drives You?

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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3174
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 10
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)