Gold members block:
- only single male/female
- only active members
- only members with picture uploaded
- random selected from DB
Will display nickname, age, country and country flag bellow user pic.
----
1) Admin/Builders/Pages Builder => Homepage, Add a new HTML page as bellow:
Caption Lang Key: _gold members
Visible for: Guest Member
SAVE
2) Open phpMyAdmin, click on table PageCompose and browse
look at row Caption and find _gold members (shall be the last insert id)
Edit ID where Caption = _gold members as bellow:
Page: index
Desc: List of GOLD members profile selected from database
Func: Gold
Content:
SAVE
(Content shall be blank)
3) Admin/Settings/Languages Settings, add a new language string
New language key name: _gold members
Category: Page titles
String texts for available languages: Gold Members
SAVE
4) Open file templates/base/scripts/BxBaseIndex.php
Find Featured members block and add this code above
/**
* GOLD members block
*/
function getBlockCode_Gold() {
global $site;
global $aPreValues;
global $getBlockCode_Gold_db_num;
global $max_thumb_width;
global $max_thumb_height;
global $oTemplConfig;
$gold_num = '8';
if ( $gold_num )
{
$gold_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country`
FROM `Profiles`
LEFT JOIN `ProfileMemLevels` ON ( `ProfileMemLevels`.`IDLevel` = '4' )
WHERE (
`ProfileMemLevels`.`IDMember` = `Profiles`.`ID`
)
AND `Couple` = '0'
AND `Picture` = '1'
AND `Status` = 'Active'
ORDER BY RAND()
LIMIT $gold_num" );
$ret .= '<div class="clear_both"></div>';
if( mysql_num_rows( $gold_res ) > 0 )
{
$j=1;
while( $gold_arr = mysql_fetch_assoc( $gold_res ) )
{
$gold_country = _t($aPreValues['Country'][$gold_arr['Country']] ['LKey']);
$gold_flag = ' <img src="'. ($site['flags'].strtolower($gold_arr['Country'])) .'.gif" alt="flag" />';
$ret .= '<div class="featured_block_1">';
$ret .= get_member_thumbnail( $gold_arr['ID'], 'none' );
$ret .= '<center>';
$ret .= '<a href="' . getProfileLink( $gold_arr['ID'] ) . '">';
$ret .= process_line_output( $gold_arr['NickName'] );
$ret .= '</a>';
$ret .= ", ";
$ret .= age( $gold_arr['DateOfBirth'] );
$ret .= '<br />';
$ret .= $gold_country;
$ret .= $gold_flag;
$ret .= '</center>';
$ret .= '<br />';
$ret .= '</div>';
$j++;
}
}
else
{
$ret .= '<div class="no_result">';
$ret .= '<div>';
$ret .= _t("_No results found");
$ret .= '</div>';
$ret .= '</div>';
}
$ret .= '<div class="clear_both"></div>';
}
return $ret;
}
SAVE FILE
5) Remember to edit IDLevel to a number that suit your membership level (`ProfileMemLevels`.`IDLevel` = '4')
If you look at table MemLevels, you will find your ID number there.
Now you can take a look at your web page
Thank you.
That would look so cool, making it look seemless... yea! =)