
05-05-2009, 02:49 PM
|
|
|
Join Date: Nov 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by WetWired
The problem with mucking with the top activity is that when you do it, the optimization to prevent checking everyone's activity breaks... since you are interested in the activity of a limited group of people, perhaps that is something you can deal with.
in the plugin marked "Top Activity" (for forumhome), find
Code:
//****************************************
// How old are we? how many users do we need to process?
if(MAX_NUM==0){
$querylimit=1;
}else{//(MAX_NUM==0)
$daysold=($WWU002startOfDay-$statdata[0])/WWU002_ONE_DAY;
if(($daysold>=($vbulletin->options['WWU002weeks']*3.5))||($_REQUEST['oldway'])){
//A complete reversal of activity is possible in this time period, we must check everyone
$querylimit='1';
}else{//($daysold>=($vbulletin->options['WWU002weeks']*3.5))
//What is the lowest activity that could surpass the lowest activity on the old list?
$acc=0;
DEVDEBUG('Days old='.$daysold);
for($i=1;$i<=$daysold;$i++){
$acc+=$WWU002maxDay*$WWU002weekWeights[floor($i/7)];
}//endfor($i=1;$i<$daysold;$i++)
$temp=$statdata[1];
$temp=array_pop($temp);
DEVDEBUG('Activity lower limit='.$temp[3].'-'.($acc*2).'='.($temp[3]-($acc*2)));
$acc=$temp[3]-($acc*2);
if($acc<=0){
//just use the simple where clause
$querylimit='1';
}else{//($acc<=0)
$querylimit='wwu002activity>='.$acc;
}//endif($acc<=0)
}//endif($daysold>=($vbulletin->options['WWU002weeks']*3.5))
}//endif(MAX_NUM==0)
replace with
Code:
$querylimit='usergroupid<>100';
This should (I'm not testing any of this) remove the optimization and instead only include people whose primary group is not group 100.
For the date thing, I think you should be able to
find (in the same plugin)
Code:
$longresult=$db->query_read('SELECT userid,username,joindate FROM '.TABLE_PREFIX.'user WHERE userid IN ('.$ids.')');
and replace with
Code:
$longresult=$db->query_read('SELECT userid,username,lastvisit AS joindate FROM '.TABLE_PREFIX.'user WHERE userid IN ('.$ids.')');
|
All worked perfectly -- thanks!!!
|