Now I found a way to make this work for my dolphin 7.3.3 here is the code that made it work for me, have marked the newly added code with red bold text and the original code that was edited is market with green bold text not sure if this is best way to do this but worked for me, remember to clear all caches after uploading the new file to your server.
// ----- non-block functions ----- //
function getMembers ($sBlockName, $aParams = array(), $iLimit = 32, $sMode = 'rand')
{
$aDefFields = array(
'ID', 'NickName', 'Couple', 'Sex'
);
$sCode = '';
$iOnlineTime = (int)getParam( "member_online_time" );
//main fields
$sqlMainFields = "";
foreach ($aDefFields as $iKey => $sValue)
$sqlMainFields .= "`Profiles`. `$sValue`, ";
$sqlMainFields .= "if(`DateLastNav` > SUBDATE(NOW(), INTERVAL $iOnlineTime MINUTE ), 1, 0) AS `is_online`";
// possible conditions
$sqlCondition = "WHERE `Profiles`.`Status` = 'Active' and (`Profiles`.`Couple` = 0 or `Profiles`.`Couple` > `Profiles`.`ID`)";
if (is_array($aParams)) {
foreach ($aParams as $sField => $sValue)
$sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'";
}
// top menu and sorting
$aModes = getParam('votes') ? array('last', 'top', 'rand', 'online') : array('last', 'top', 'rand', 'online');
$aDBTopMenu = array();
if (empty($_GET[$sBlockName . 'Mode'])) {
$sMode = 'rand';
} else {
$sMode = (in_array($_GET[$sBlockName . 'Mode'], $aModes)) ? $_GET[$sBlockName . 'Mode'] : $sMode = 'rand';
}
$sqlOrder = "";
foreach( $aModes as $sMyMode ) {
switch ($sMyMode) {
case 'online':
if ($sMode == $sMyMode) {
$sqlCondition .= " AND `Profiles`.`DateLastNav` > SUBDATE(NOW(), INTERVAL ".$iOnlineTime." MINUTE)";
$sqlOrder = " ORDER BY `Profiles`.`DateLastNav` DESC";
$sViewAllQuery = 'online_only=on';
}
$sModeTitle = _t('_Online');
break;
case 'last':
if ($sMode == $sMyMode) {
$sqlOrder = " ORDER BY `Profiles`.`DateReg` DESC";
$sViewAllQuery = 'sort=date_reg';
}
$sModeTitle = _t('_Latest');
break;
case 'rand':
if ($sMode == $sMyMode) {
$sqlOrder = " ORDER BY `Profiles`.`Couple` ASC, `DateLastNav` > SUBDATE(NOW(), INTERVAL ".$iOnlineTime." MINUTE) DESC, `Profiles`.`Avatar` <> 0 DESC, RAND()";
}
$sModeTitle = _t('_Random');
break;
case 'top':
if ($sMode == $sMyMode) {
$sqlOrder = ' ORDER BY `Profiles`.`Rate` DESC, `Profiles`.`RateCount` DESC';
$sViewAllQuery = 'sort=rate';
}
$sModeTitle = _t('_Top');
break;
}
Here is the original code, how it was before I made any changes
// ----- non-block functions ----- //
function getMembers ($sBlockName, $aParams = array(), $iLimit = 16, $sMode = 'last')
{
$aDefFields = array(
'ID', 'NickName', 'Couple', 'Sex'
);
$sCode = '';
$iOnlineTime = (int)getParam( "member_online_time" );
//main fields
$sqlMainFields = "";
foreach ($aDefFields as $iKey => $sValue)
$sqlMainFields .= "`Profiles`. `$sValue`, ";
$sqlMainFields .= "if(`DateLastNav` > SUBDATE(NOW(), INTERVAL $iOnlineTime MINUTE ), 1, 0) AS `is_online`";
// possible conditions
$sqlCondition = "WHERE `Profiles`.`Status` = 'Active' and (`Profiles`.`Couple` = 0 or `Profiles`.`Couple` > `Profiles`.`ID`)";
if (is_array($aParams)) {
foreach ($aParams as $sField => $sValue)
$sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'";
}
// top menu and sorting
$aModes = getParam('votes') ? array('last', 'top', 'online') : array('last', 'online');
$aDBTopMenu = array();
if (empty($_GET[$sBlockName . 'Mode'])) {
$sMode = 'last';
} else {
$sMode = (in_array($_GET[$sBlockName . 'Mode'], $aModes)) ? $_GET[$sBlockName . 'Mode'] : $sMode = 'last';
}
$sqlOrder = "";
foreach( $aModes as $sMyMode ) {
switch ($sMyMode) {
case 'online':
if ($sMode == $sMyMode) {
$sqlCondition .= " AND `Profiles`.`DateLastNav` > SUBDATE(NOW(), INTERVAL ".$iOnlineTime." MINUTE)";
$sqlOrder = " ORDER BY `Profiles`.`DateLastNav` DESC";
$sViewAllQuery = 'online_only=on';
}
$sModeTitle = _t('_Online');
break;
case 'last':
if ($sMode == $sMyMode) {
$sqlOrder = " ORDER BY `Profiles`.`DateReg` DESC";
$sViewAllQuery = 'sort=date_reg';
}
$sModeTitle = _t('_Latest');
break;
case 'top':
if ($sMode == $sMyMode) {
$sqlOrder = ' ORDER BY `Profiles`.`Rate` DESC, `Profiles`.`RateCount` DESC';
$sViewAllQuery = 'sort=rate';
}
$sModeTitle = _t('_Top');
break;
}