Profiles in join page

Hi all can someone give me a heads up on how to display a bunch of profiles on the join page in the same way thay are displayed on the home page in a block of 10.

Thank

Quote · 2 Oct 2009

Hi all can someone give me a heads up on how to display a bunch of profiles on the join page in the same way thay are displayed on the home page in a block of 10.

Thank

Not sure how you will have it!!!
This example will add a new box with Members between the join form and footer,
(you can choose how many members you will have inside this box, just change $members_num)


1)
Made a new file templates/tmpl_uni/_join_footer.html and add code below


<div class="clear_both"></div>

<br>
<div class="disignBoxFirst">
<div class="boxFirstHeader">Members</div>
__members__
</div>
<div class="clear_both"></div>


</div>
<!-- end of body -->
__banner_bottom__
__boonex_footers__
<div class="bottomCopyright">
<div class="bottomLinks">
__BMI_Links__
__BMI_News__
__BMI_ContactUs__
__BMI_About__
__BMI_Privacy__
__BMI_Termsofuse__
__BMI_FAQ__
__BMI_Feedback__
__BMI_Aff__
__BMI_Invitefriend__
__BMI_Bookmark__
</div>
<div class="bottomCpr">__copyright__</div>
</div>
</div>

__includebase _footer.html__



2)
Made a new file templates/tmpl_uni/page_3.html and add code below

__include _header.html__
__page_main_code__
__include _join_footer.html__


3)
Open file join.php and add this code $_page_cont[$_ni]['members'] = getMembers();

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = $oJoinProc -> process();
$_page_cont[$_ni]['members'] = getMembers();



4)
Open inc/design.inc.php and add code bellow at the bottom of the file

/**
* Members on join page
*/
function getMembers() {
global $site;
global $aPreValues;
global $getBlockCode_Members_db_num;
global $max_thumb_width;
global $max_thumb_height;
global $oTemplConfig;


$members_num = '10';


if ( $members_num )
{
$members_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country`
FROM `Profiles`
WHERE `Couple` = '0' AND `Picture` = '1' AND `Status` = 'Active'
ORDER BY RAND()
LIMIT $members_num" );


$ret .= '<div class="clear_both"></div>';

if( mysql_num_rows( $members_res ) > 0 )
{
$j=1;
while( $members_arr = mysql_fetch_assoc( $members_res ) )
{

$members_country = _t($aPreValues['Country'][$members_arr['Country']]['LKey']);                              
$members_flag = '&nbsp;<img src="'. ($site['flags'].strtolower($members_arr['Country'])) .'.gif" alt="flag" />';

$ret .= '<div class="featured_block_1">';
$ret .= get_member_thumbnail( $members_arr['ID'], 'none' );
$ret .= '<center>';
$ret .= '<a href="' . getProfileLink( $members_arr['ID'] ) . '">';
$ret .= process_line_output( $members_arr['NickName'] );
$ret .= '</a>';
$ret .= ", ";
$ret .= age( $members_arr['DateOfBirth'] );
$ret .= '<br />';
$ret .= $members_country;
$ret .= $members_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;
}

Quote · 3 Oct 2009

Thanks for your help but I cant seem to get this working, I just keep getting a blank page.

Quote · 3 Oct 2009

Thanks for your help but I cant seem to get this working, I just keep getting a blank page.

It works, check what you have done, you have simply forgot somethingSmile

Quote · 4 Oct 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.