View Single Post
  #228  
Old 01-13-2006, 01:02 PM
MPDev's Avatar
MPDev MPDev is offline
 
Join Date: Oct 2003
Location: Virginia
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

More IP info. I get data like this (when printing out some added debug code to see them $item['count'] for each entry:

Code:
211540739 -> US -> 1 ->17
212681730 -> US -> 1 ->17
214962100 -> US -> 1 ->17
215641169 -> US -> 1 ->17
215650894 -> US -> 1 ->17
215630563 -> US -> 1 ->17
215698855 -> US -> 1 ->17
215837282 -> US -> 1 ->17
215915896 -> US -> 1 ->17
201656985 -> US -> 1 ->17
2097169078 -> JP -> 1 ->17
2155237942 -> US -> 3 ->17
2157127178 -> US -> 2 ->17
and this line:

Code:
                                        $updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
Would seemingly only be adding 1 to the value, not 1 for every instance of US in the list.

I changed it to this:

Code:
                                if (isset($database_country["$coucode"]))
                                {
                                        $item['count'] += $updatecache["country_||_$coucode"][1];
                                        $updatecache["country_||_$coucode"] = array($existingcache["country_||_$coucode"]['count'], $item['count'], $existingcache["country_||_$coucode"]['cmisc']);
                                }
                                break;
So that multiple "US" (or any other) entries would have a cumulative effect on the total. This appears to be working, however, your historial data prior to this change will be very inaccurate and should be erased.

I also added line for all the other totals - I'm working to confirm this is works.

Code:
                                // MDP
                                $itemcnt = $item['count'] + $updatecache["browser_||_$browser[bstring]"][1];
                                $updatecache["browser_||_$browser[bstring]"] = array($existingcache["browser_||_$browser[bstring]"]['count'], $itemcnt, $existingcache["browser_||_$browser[bstring]"]['cmisc']);
                                
                                // MDP
                                $itemcnt = $item['count'] + $updatecache["os_||_$browser[os]"][1];
                                $updatecache["os_||_$browser[os]"] = array($existingcache["os_||_$browser[os]"]['count'], $itemcnt, $existingcache["os_||_$browser[os]"]['cmisc']);
Code:
                                        // MDP
                                        $item['count'] += $updatecache["referrer_||_$item[cdata]"][1];
                                        $updatecache["referrer_||_$item[cdata]"] = array($existingcache["referrer_||_$item[cdata]"]['count'], $item['count'], $existingcache["referrer_||_$item[cdata]"]['cmisc']);
Code:
                                        // MDP
                                        $item['count'] += $updatecache["screendepth_||_$depthstring"][1];
                                        $updatecache["screendepth_||_$depthstring"] = array($existingcache["screendepth_||_$depthstring"]['count'], $item['count'], $existingcache["screendepth_||_$depthstring"]['cmisc']);
Code:
                                // MDP
                                $item['count'] += $updatecache["screenresolution_||_$item[cdata]"][1];
                                $updatecache["screenresolution_||_$item[cdata]"] = array($existingcache["screenresolution_||_$item[cdata]"]['count'], $item['count'], $existingcache["screenresolution_||_$item[cdata]"]['cmisc']);
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03327 seconds
  • Memory Usage 1,781KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete