Quote:
Can somebody else confirm the issues, and specify the platform they are using?
please, see MACTEP's post above.
Can somebody else confirm the issues, and specify the platform they are using?
// ===================== Profile completeness hack =============================== //
$uid = $thisUser->getVar('uid');
$query_c = "SELECT * FROM " . $xoopsDB -> prefix( "profile_profile" ) . " WHERE profile_id = '$uid'";
$result_c = $xoopsDB -> query ($query_c );
$all_rows = $xoopsDB -> fetchArray( $result_c );
$num_rows = count( $all_rows );
$full_rows = array_diff($all_rows,array(NULL));
$num_full_rows = count ( $full_rows );
$perc = floor($num_full_rows*100/$num_rows);
$xoopsTpl->assign('compl', $perc);
// Colors
if ( $perc < 25 ) {
$class = 'warning';
} elseif ( $perc >= 25 && $perc < 50 ) {
$class = 'danger';
} elseif ( $perc >= 50 && $perc < 75 ) {
$class = 'info';
} else {
$class = 'success';
}
$xoopsTpl->assign('class', $class);
// ==================== End of profile completeness hack ===================================== //
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php';
?>
// ===================== Profile completeness hack =============================== //
$query_c = "SELECT * FROM " . $xoopsDB -> prefix( "profile_profile" ) . " WHERE profile_id = '$uid'";
$result_c = $xoopsDB -> query ($query_c );
$all_rows = $xoopsDB -> fetchArray( $result_c );
$num_rows = count( $all_rows );
$full_rows = array_diff($all_rows,array(NULL));
$num_full_rows = count ( $full_rows );
$perc = floor($num_full_rows*100/$num_rows). '%';
$xoopsTpl->assign('compl', $perc);
// ==================== End of profile completeness hack ===================================== //