Ich bin für meine kleine feine Seite was am basten und ich will für die User eine Anzeige machen, wieviel das Profil ausgefüllt ist.
Hatte mich schon ein wenig bei einer anderen Koponente bedient aber irgendwie klappt es noch nicht so wirklich mit der SQL-Datenbank Anbindung
Kenne mich auch erst recht wenig aus und momentan viel am Lesen testen etc.
Code: Alles auswählen
function _getProgressProfile( $userinfo, $type)
{
// $type = bar or message
$message = '';
$progressprofile = '';
$total = 10; // 10% by default on registration with name, username, password, email etc...
// check User infos
if ( $userinfo->job!='' && $userinfo->education!='' && $userinfo->graduationyear ){
$total = $total + 10;
} else $message = 'education';
if ( $userinfo->city!='' ){
$total = $total + 10;
} else $message = 'location';
if ( $userinfo->aboutme!='' ){
$total = $total + 10;
} else $message = 'aboutme';
if ( $userinfo->gender>0 ){
$total = $total + 10;
} else $message = 'gender';
if ( $userinfo->birthdate!='0000-00-00' ){
$total = $total + 10;
} else $message = 'birthdate';
if ( $userinfo->avatar!='' ) {
$total = $total + 40;
} else $message = 'avatar';
Kann mir jemand da helfen ?
Gruß