Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Thu Jul 21, 2005 11:24 am |
|
Well, I managed to introduce a bug in all my fiddling . the previous day's registration got screwed up again, so I have rewritten th whole routine. I have corrected the download, but you can do the following to correct your v2.0.0 code.
Correct version number to 2.0.1 from 2.0.0
In block-UserInfo.php
FINDCode:$Today = getdate();
//Formatting Current Date
$month = $Today['month'];
$mday = $Today['mday'];
$year = $Today['year'];
//Formatting Previous Date
$pmonth = $Today['month'];
$pmday = $Today['mday'];
$pmday = $mday-1;
$pyear = $Today['year'];
//Month conversion into numeric mode
if ($pmonth=="'"._JAN."'") $pmonth=1;
elseif ($pmonth=="'"._FEB."'") $pmonth=2;
elseif ($pmonth=="'"._MAR."'") $pmonth=3;
elseif ($pmonth=="'"._APR."'") $pmonth=4;
elseif ($pmonth=="'"._MAY."'") $pmonth=5;
elseif ($pmonth=="'"._JUN."'") $pmonth=6;
elseif ($pmonth=="'"._JUL."'") $pmonth=7;
elseif ($pmonth=="'"._AUG."'") $pmonth=8;
elseif ($pmonth=="'"._SEP."'") $pmonth=9;
elseif ($pmonth=="'"._OCT."'") $pmonth=10;
elseif ($pmonth=="'"._NOV."'") $pmonth=11;
elseif ($pmonth=="'"._DEC."'") $pmonth=12; ;
$test = mktime (0,0,0,$pmonth,$pmday,$pyear,1);
//Creating SQL parameter
$curDate2 = "%".$month[0].$month[1].$month[2]."%".$mday."%".$year."%";
$preday = strftime ("%d",$test);
$premonth = strftime ("%B",$test);
$preyear = strftime ("%Y",$test);
$curDateP = "%".$premonth[0].$premonth[1].$premonth[2]."%".$preday."%".$preyear."%";
//Executing SQL For Today and Yesterday
$userCount = 0;
$userCount2 = 0;
$sql = "SELECT user_regdate, COUNT(user_regdate) FROM ".$user_prefix."_users WHERE user_regdate LIKE '$curDate2' OR user_regdate LIKE '$curDateP' GROUP BY user_regdate LIMIT 0,2";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row[0]==substr($month,0,3).' '.$mday.', '.$year) $userCount = $row[1];
else $userCount2 = $row[1];
}
|
REPLACE WITHCode://Executing SQL For Today and Yesterday
$userCount = 0;
$userCount2 = 0;
$Today = date('M d, Y',time());
$Yesterday = date('M d, Y',time()-86400);
$sql = "SELECT user_regdate, COUNT(user_regdate) FROM ".$user_prefix."_users where user_regdate IN('$Today', '$Yesterday') GROUP BY user_regdate LIMIT 0,2";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
if ($row[0]==$Today) $userCount = $row[1];
else $userCount2 = $row[1];
}
|
In language/lang-english.php
FIND AND DELETECode:define("_JAN","January");
define("_FEB","February");
define("_MAR","March");
define("_APR","April");
define("_MAY","May");
define("_JUN","June");
define("_JUL","July");
define("_AUG","August");
define("_SEP","September");
define("_OCT","October");
define("_NOV","November");
define("_DEC","December");
|
|
|
|