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,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,575
Posts293,927
Members13,822
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)
cgregg 1
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 20240506)