From: Chuck Scott Date: Fri, 14 Oct 2016 14:30:35 +0000 (-0400) Subject: Minor updates to URL Click-through and Daily Page View graphs. X-Git-Tag: v2.7.0^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=1761863e0c029a244be2094778b66a60b90d568f;p=WP-Plugins%2Fglm-member-db.git Minor updates to URL Click-through and Daily Page View graphs. Also removed import of daily clicks and views from legacy sites due to that data not being available. --- diff --git a/css/admin.css b/css/admin.css index c74e49dc..6a64ad3d 100644 --- a/css/admin.css +++ b/css/admin.css @@ -419,3 +419,7 @@ input[type=submit], input[type=file] { font-weight: bold; } +.notice-link +{ + cursor: pointer; +} \ No newline at end of file diff --git a/models/admin/management/import/memberClicksViews.php b/models/admin/management/import/memberClicksViews.php index 7848771d..0934525b 100644 --- a/models/admin/management/import/memberClicksViews.php +++ b/models/admin/management/import/memberClicksViews.php @@ -6,7 +6,6 @@ /* * Check all input */ -trigger_error('STARTING', E_USER_NOTICE); // Check hostname $dbServer = preg_replace("/[^a-zA-Z0-9\._-]+/", "", trim($_REQUEST['dbServer'])); @@ -86,7 +85,7 @@ if (!$failure) { /* * Load data from source database */ -trigger_error('Memory before: '.memory_get_usage(), E_USER_NOTICE); + // Attempt to get member base data if (!$failure) { $sql = " @@ -128,6 +127,9 @@ if (!$failure) { // Create or update click entries as needed using a Transaction $this->wpdb->query('BEGIN'); +/* + Looking at the data it appears that the old database had some kind of processing that bunched things up by month. + Because of that, we're not going to use the day and week counts at this point. // Day count - stat_type = 1 $this->wpdb->query(" @@ -148,7 +150,7 @@ if (!$failure) { ON DUPLICATE KEY UPDATE clicks = clicks + ".$row['click']."; "); - +*/ // Month count - stat_type = 3 $this->wpdb->query(" INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."clickthrough_stats @@ -168,7 +170,7 @@ if (!$failure) { // Create or update click entries as needed using a Transaction $this->wpdb->query('BEGIN'); - +/* // Day count - stat_type = 1 $this->wpdb->query(" INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_detail_stats @@ -188,7 +190,7 @@ if (!$failure) { ON DUPLICATE KEY UPDATE clicks = clicks + ".$row['detail']."; "); - +*/ // Week count - stat_type = 3 $this->wpdb->query(" INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_detail_stats diff --git a/views/admin/member/index.html b/views/admin/member/index.html index 9f4b3309..b5f258d5 100644 --- a/views/admin/member/index.html +++ b/views/admin/member/index.html @@ -53,6 +53,7 @@ {/foreach}
Update Graphs
+ ?     
Print
Export All Monthly Totals @@ -77,6 +78,7 @@ {/foreach}
Update Graphs
+ ?     
Print
Export All Monthly Totals @@ -217,6 +219,11 @@ window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&member={$memberID}&showArchived=" + checked); }); + $('.message').on('click', function() { + var notice = $(this).attr('data-notice'); + alert(notice.replace(/-br-/g, "\n")); + }); + // Flash certain elements for a short time after display $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);