Members with pictures only in members block?

How can I show just members with pictures in the main members block on the homepage.  In other words, I don't want to show any members who have not uploaded a picture, and just have the default image.

Thanks

Rob

Quote · 23 Aug 2008

Edit templates/base/scripts/BxBaseIndex.php

Find function getBlockCode_Members()

and $aDBTopMenu = array();

 

Add code `Picture` > 0 AND in the sql query, se below.

 

$aDBTopMenu = array();
  //$menu = '<div class="dbTopMenu">';
  foreach( array( 'last', 'top', 'online', 'rand' ) as $myMode )
  {
   switch ( $myMode )
   {
    case 'online':
     if( $mode == $myMode )
      $filter = " FROM `Profiles` WHERE `Picture` > 0 AND `DateLastNav` > SUBDATE(NOW(), INTERVAL ".(int)getParam( "member_online_time" )." MINUTE) AND `Status` = 'Active' $query_add ORDER BY `Couple` ASC";
     $modeTitle = _t('_Online');
    break;
    case 'rand':
     if( $mode == $myMode )
    $filter = " FROM `Profiles` WHERE `Picture` > 0 AND `Status` = 'Active' $query_add ORDER BY `Couple` ASC, RAND()";
     $modeTitle = _t('_Random');
    break;
    case 'last':
     if( $mode == $myMode )
    $filter = " FROM `Profiles` WHERE `Picture` > 0 AND `Status` = 'Active' $query_add ORDER BY `Couple` ASC, `DateReg` DESC";
     $modeTitle = _t('_Latest');
    break;
    case 'top':
     if( $mode == $myMode )
     {
     $oVotingView = new BxTemplVotingView ('profile', 0, 0);
  
     $aSql        = $oVotingView->getSqlParts('`Profiles`', '`ID`');
    $sqlOrderBy  = $oVotingView->isEnabled() ? " ORDER BY `Couple` ASC, (`pr_rating_sum`/`pr_rating_count`) DESC, `pr_rating_count` DESC, `DateReg` DESC" : $sqlOrderBy ;
     $sqlFields   = $aSql['fields'];
     $sqlLJoin    = $aSql['join'];
$filter = "$sqlFields FROM `Profiles` $sqlLJoin WHERE `Picture` > 0 AND `Status` = 'Active' AND `pr_rating_count` > 2 $query_add $sqlOrderBy";
$filter2 = " FROM `Profiles` $sqlLJoin WHERE `Picture` > 0 AND `Status` = 'Active' AND `pr_rating_count` > 2 $query_add $sqlOrderBy";
     } 
     $modeTitle = _t('_Top');
    break;

   }

 

 

 

CheersSmile

 

Quote · 23 Aug 2008

Thank you!!!

Quote · 23 Aug 2008

worked like a charm :-)

Quote · 23 Aug 2008

Yep.  Worked great.  Thanks :)

 

Besides, the lazy asses that don't take the time to upload pics should give it up!

Quote · 22 Oct 2008

I know this is old but THANK YOU!

Happiness is a warm gun.
Quote · 22 Apr 2009

I also wanted to add my thanks here!  This was exactly what I was looking for :)

Quote · 27 Aug 2009
 
 
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.