php forum
php mysql forum
php mysql smarty
 
Topic Options
#313509 - 03/12/07 03:35 PM total pageviews per month on summary page
Wendy Anderson Offline
Junior Member

Registered: 06/27/05
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 = <<THEEND;
$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): <strong>$total_hits</strong>
<br />$vars_wordlets_cp2{home_pageviews_cached}: <strong>$perc_cache</strong>%<br />
THEEND
} else {
$total_hits = $cache_hits + $dynamic_hits + $monthly_hits;
$pageview_string = <<THEEND;
$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): <strong>$total_hits</strong><br />
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 = <<THEEND;
$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): <strong>$total_hits</strong>
<br />$vars_wordlets_cp2{home_pageviews_cached}: <strong>$perc_cache</strong>%<br />
THEEND
} else {
$total_hits = $cache_hits + $dynamic_hits + $monthly_hits;
$pageview_string = <<THEEND;
$vars_wordlets_cp2{home_pageviews} ($GotTime{mon}/$GotTime{JSYear}): <strong>$total_hits</strong><br />
THEEND
} # end if
} # end if

Top
#313519 - 03/13/07 09:39 AM Re: total pageviews per month on summary page [Re: Wendy Anderson]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25366
Loc: Texas
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}): <strong>$total_hits</strong><br />

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?

Top


Moderator:  Gizmo 
Top Posters Last 30 Days
AllenAyres 83
Gizmo 27
sirdude 24
Zarzal 23
blaaskaak 11
swebs 6
willing 5
Who's Online
0 Registered (), 29 Guests and 23 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Nice Ajax Chat
by Thelockman
Yesterday at 09:07 AM
[7.x] UBB.Post Templates v0.1
by sirdude
07/05/08 12:48 PM
Team UBBDev Rides Again!
by AllenAyres
07/04/08 10:56 PM
[7.3.x] ubb.links
by AllenAyres
07/03/08 06:15 PM
Changing currency for subscriptions?
by AllenAyres
07/03/08 01:15 PM
Protect users emails
by AllenAyres
07/03/08 11:36 AM
VPS and Newbies
by Gizmo
07/02/08 09:08 PM
New Mods
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
Newest Members
ryzilla, M4D, Jer, Kanigo2, Bubba
13302 Registered Users

 

 

 
fusionbb message board php hacks