Random Members for browse.php

im sure there is a way this can be done but i just cant figure it out if anybody knows how this can be done please let me know or if you want to build this module for me let me know your quote. i really want members to show randomly as default on browse.php and latest activity on search.php..............can this be done? o and im using 7.0.4

Damn i can't wait for Dolphin10 to be released, Its gonna be awesome :)
Quote · 1 Dec 2010

files to edit
/templates/base/scripts BxBaseBrowse.php

around line ~ 686 ~ find this

  // select sorting parameters ;
  $sSortParam = '`Profiles`.`DateLastLogin` DESC';
  if ( isset($this -> aDisplaySettings['sort']) ) {
   switch($this -> aDisplaySettings['sort']) {
    case 'activity' :
     $sSortParam = ' `Profiles`.`DateLastLogin` DESC';
     break;   
    case 'date_reg' :   
     $sSortParam = ' `Profiles`.`DateReg` DESC';
     break;   
    case 'rate' :   
     $sSortParam = ' `sys_profile_rating`.`pr_rating_sum` DESC';
     break;   
    default :
     $sSortParam = ' `Profiles`.`DateLastLogin` DESC';
     $this -> aDisplaySettings['sort'] = 'activity';
     break;   
   }
  } else
   $this -> aDisplaySettings['sort'] = 'activity';

 

and change it to

 

  // select sorting parameters ;
  $sSortParam = '`Profiles`.`DateLastLogin` DESC';
  if ( isset($this -> aDisplaySettings['sort']) ) {
   switch($this -> aDisplaySettings['sort']) {
    case 'activity' :
     $sSortParam = ' `Profiles`.`DateLastLogin` DESC';
     break;   
    case 'date_reg' :   
     $sSortParam = ' `Profiles`.`DateReg` DESC';
     break;   
    case 'rate' :   
     $sSortParam = ' `sys_profile_rating`.`pr_rating_sum` DESC';
     break; 
    case 'rand' :   
     $sSortParam = ' `Profiles`.`Couple` DESC, RAND()';
     break;    
    default :
     $sSortParam = ' `Profiles`.`Couple` DESC, RAND()';
     $this -> aDisplaySettings['sort'] = 'rand';
     break;   
   }
  } else
   $this -> aDisplaySettings['sort'] = 'activity';

 

 

then around line ~826~ find  this

  $aSortingParam = array
  (
   'activity'     => _t( '_Latest activity' ),
   'date_reg'     => _t( '_FieldCaption_DateReg_View' ),
   'rate'         => _t( '_Rate' ),
  );

 

and change to

 

  $aSortingParam = array
  (
   'activity'     => _t( '_Latest activity' ),
   'date_reg'     => _t( '_FieldCaption_DateReg_View' ),
   'rate'         => _t( '_Rate' ),
   'rand'         => _t( '_Random'),
  );

 

Tested on 7.0.3 & 7.0.4

rand.JPG

Quote · 2 Dec 2010

yay yay.....thanks amir its worked just what i was looking for. Good looking out man :)

Damn i can't wait for Dolphin10 to be released, Its gonna be awesome :)
Quote · 2 Dec 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.