$row->level = $slog->getStatus($row->groups, ', '); $vCard = new vCard('', ''); $vCard->setNickname($row->name); $vCard->setEMail($row->mail); $vCard->setNote($lang->phrase('vcard_note')); if (!empty($row->fullname)) { $names = explode(' ', $row->fullname); $anz = count($names); $middle = ''; foreach ($names as $middlename) { if ($middlename != $names[0] && $middlename != $names[$anz - 1]) { $middle .= $middlename; } } $vCard->setFirstName($names[0]); $vCard->setMiddleName($middle); $vCard->setLastName($names[$anz - 1]); } if (!empty($row->location)) { $vCard->setHomeCity($row->location); $vCard->setPostalCity($row->location); } if (!empty($row->hp)) { $vCard->setURLWork($row->hp); } if (!empty($row->birthday) && $row->birthday != '0000-00-00') { $bday = str_replace('-', '', $row->birthday); $vCard->setBirthday($bday, 1); } $filename = $row->id . '.vcf'; ($code = $plugins->load('profile_vcard_prepared')) ? eval($code) : null;