Counter for yester hits in surfbar added
authorRoland Häder <roland@mxchange.org>
Mon, 8 Sep 2008 19:19:42 +0000 (19:19 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 8 Sep 2008 19:19:42 +0000 (19:19 +0000)
inc/extensions/ext-surfbar.php
inc/reset/reset_surfbar.php
surfbar.php
templates/de/html/surfbar/surfbar_frame_stats.tpl

index 739272c..f77381e 100644 (file)
@@ -129,6 +129,7 @@ INDEX (`userid`,`url_id`)
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30";
index 4fc2f6b..3b83306 100644 (file)
@@ -44,7 +44,8 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
 if (($CSS == 1) || (defined('__DAILY_RESET'))) return;
 
 // Reset surfbar counter
-UPDATE_CONFIG("surfbar_daily_counter", "0");
+UPDATE_CONFIG(array("surfbar_daily_counter", "surfbar_yester_counter`"), array(0, $_CONFIG['surfbar_daily_counter']));
+$_CONFIG['surfbar_yester_counter'] = $_CONFIG['surfbar_daily_counter'];
 $_CONFIG['surfbar_daily_counter'] = 0;
 
 //
index 8202188..690443a 100644 (file)
@@ -83,13 +83,14 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install
 
                        // Prepare content
                        $content = array(
-                               'points'  => TRANSLATE_COMMA($points),
-                               'online'  => SURFBAR_DETERMINE_TOTAL_ONLINE(),
-                               'reload'  => ($_CONFIG['surfbar_stats_reload'] * 1000),
-                               'c_total' => TRANSLATE_COMMA($_CONFIG['surfbar_total_counter']),
-                               'c_today' => TRANSLATE_COMMA($_CONFIG['surfbar_daily_counter']),
-                               'c_week'  => TRANSLATE_COMMA($_CONFIG['surfbar_weekly_counter']),
-                               'c_month' => TRANSLATE_COMMA($_CONFIG['surfbar_monthly_counter']),
+                               'points'   => TRANSLATE_COMMA($points),
+                               'online'   => SURFBAR_DETERMINE_TOTAL_ONLINE(),
+                               'reload'   => ($_CONFIG['surfbar_stats_reload'] * 1000),
+                               'c_total'  => TRANSLATE_COMMA($_CONFIG['surfbar_total_counter']),
+                               'c_today'  => TRANSLATE_COMMA($_CONFIG['surfbar_yester_counter']),
+                               'c_yester' => TRANSLATE_COMMA($_CONFIG['surfbar_daily_counter']),
+                               'c_week'   => TRANSLATE_COMMA($_CONFIG['surfbar_weekly_counter']),
+                               'c_month'  => TRANSLATE_COMMA($_CONFIG['surfbar_monthly_counter']),
                        );
 
                        // Load template for "stats" page
index 0e0ca5a..ca2ee0f 100644 (file)
@@ -4,6 +4,7 @@
                &raquo;Guthaben: <span class="surfbar_points">$content[points]&nbsp;{!POINTS!}</span>&laquo;&nbsp;-
                &raquo;Jetzt Online: <span class="surfbar_counter">$content[online]</span>&laquo;&nbsp;-
                &raquo;Seitenaufrufe: Heute:<span class="surfbar_counter">$content[c_today]</span>&nbsp;-
+               Gestern:<span class="surfbar_counter">$content[c_yester]</span>&nbsp;-
                Woche:<span class="surfbar_counter">$content[c_week]</span>&nbsp;-
                Monat:<span class="surfbar_counter">$content[c_month]</span>&nbsp;-
                Gesamt:<span class="surfbar_counter">$content[c_total]</span>&laquo;