Thread: Statistics Modifications - Cyb - Moderating Stats
View Single Post
  #59  
Old 10-19-2010, 02:07 AM
bulbasnore bulbasnore is offline
 
Join Date: Dec 2004
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Domenico View Post
Same here! I only see them when I set 'Show Mod log entries from last X days only' to NO.

Can you please fix this?
The workaround for me is to turn off the 'time period'. When that is marked 'no' it works to show infractions and points.

I'm guessing this has to do with the evil php 5.3.1 I am running. I'm guessing it has broken this construct:
PHP Code:
if ($vbulletin->GPC['cybms_del']<1)
            {
                
$cybmodstats_timeperiod "";
                
$cybmodstats_timeperiod_tot "";
                [
B]if ($vbulletin->options['cybmodstats_time_period'])
                {
                    
$fromtime TIMENOW - ($vbulletin->options['cybmodstats_period_days']*24*60*60);
                    
$cybmodstats_timeperiod "AND moderatorlog.dateline > $fromtime";
                    
$cybmodstats_timeperiod_tot "WHERE dateline > $fromtime";
                }[/
B
Valter?

--- later ---

OK, comparing to his 4.0 product I came up with this fix. Sorry to go all Unix 'diff' utility on you folks, but I'm off to shop for my wife's birthday.

Code:
diff -c Cyb_MS.xml Cyb_MSfixed.xml
*** Cyb_MS.xml	2008-10-26 14:55:56.000000000 -0700
--- Cyb_MSfixed.xml	2010-10-18 20:20:44.000000000 -0700
***************
*** 84,94 ****
--- 84,96 ----
  			{
  				$cybmodstats_timeperiod = "";
  				$cybmodstats_timeperiod_tot = "";
+ 				$cybmodstats_timeperiod_inf = "";
  				if ($vbulletin->options['cybmodstats_time_period'])
  				{
  					$fromtime = TIMENOW - ($vbulletin->options['cybmodstats_period_days']*24*60*60);
  					$cybmodstats_timeperiod = "AND moderatorlog.dateline > $fromtime";
  					$cybmodstats_timeperiod_tot = "WHERE dateline > $fromtime";
+ 					$cybmodstats_timeperiod_inf = "AND dateline > $fromtime";
  				}			
  				$cybmodstats_exclgroups = "";
  				if ($vbulletin->options['cybmodstats_exclgroups'])
***************
*** 114,120 ****
  					if ($vbulletin->options['cybmodstats_enable_infractions'])
  					{
  						$cybmodstats_infpoints = 0;
! 						$cybmodstats_get_infr = $vbulletin->db->query_read("SELECT whoadded, points, dateline FROM " . TABLE_PREFIX . "infraction WHERE whoadded='".$cybmodlogstat['userid']."' $cybmodstats_timeperiod ");
  						$cybmodstats_infractions = $db->num_rows($cybmodstats_get_infr);
  						while ($cybmodinfractions = $db->fetch_array($cybmodstats_get_infr))
  						{
--- 116,122 ----
  					if ($vbulletin->options['cybmodstats_enable_infractions'])
  					{
  						$cybmodstats_infpoints = 0;
! 						$cybmodstats_get_infr = $vbulletin->db->query_read("SELECT whoadded, points, dateline FROM " . TABLE_PREFIX . "infraction WHERE whoadded='".$cybmodlogstat['userid']."' $cybmodstats_timeperiod_inf ");
  						$cybmodstats_infractions = $db->num_rows($cybmodstats_get_infr);
  						while ($cybmodinfractions = $db->fetch_array($cybmodstats_get_infr))
  						{
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01972 seconds
  • Memory Usage 1,786KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (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