Hello can someone please I want the members to show on featured randomly without me having to make them featured just give everyone a chance to be featured randomly
Hello can someone please I want the members to show on featured randomly without me having to make them featured just give everyone a chance to be featured randomly |
Hi, Try this /templates/base/scripts/BxBaseProfileView.php Around line 819 find $sPossibleOrder = ''; Replace with $sPossibleOrder = ' ORDER BY RAND()'; Then around line 822 remove or comment $aWhere[] = "`Profiles`.`Featured` = '1'"; Or if you want to show randomly profiles with images only replace $aWhere[] = "`Profiles`.`Featured` = '1'"; with $aWhere[] = "`Profiles`.`Avatar` > '0'"; Then Edit /templates/base/scripts/BxBaseIndexPageView.php Remove or comment around line 319 $sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'"; Or if you want to show randomly profiles with images only replace $sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'"; With $sqlCondition .= " AND `Profiles`.`Avatar` > '0'"; Thats it or if thats not what you wanted use in conjunction with this http://www.boonex.com/unity/forums/#topic/Members-Blocks-Show-Random.htm If you do this and want to set a limit find in /templates/base/scripts/BxBaseProfileView.php Then on /templates/base/scripts/BxBaseIndexPageView.php if ($sBlockName == 'Featured') { if ($iCount > '25') { $iCount='25'; // Change the number to amount that you want to limit to } $blfile='search.php?show=featured&res_per_page=64&page=1'; } else if ($sBlockName == 'Members') { $blfile='browse.php'; }
Dave.... |
thanks alot for your help! |
Hi, On my site, I noticed this fix does not make Featured "random". Its appearing on my site the SAME as "Members". Which is latest signups appear.
|
Also, i was told, that when you make changes to files in /base/scripts/ folder... that after you make change and confirm it works, you should then REMOVE the change from /base/scripts/BxBaseProfileView.php (or any file in the base/scripts/ folder). and then paste the change into the tmpl_uni/scripts/ folder. Because, he said, if you dont do this, then when you upgrade to a newer version of Dolphin, that it will remove your changes. Is this true? |