Hi,
it's me again. I'm trying to modify the userprofile plugin. I want that every author can view the complete profile of another author and export it as vcard. It should be some kind of address management with the ability to download vcf from every users.
Therefore I need to modify the profile page. At the moment I can select an author and get his complete profile.
I've changed the following to get it working:
Code: Select all
function showUser(&$user) {
global $serendipity;
echo '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
$local_properties =& $this->getLocalProperties();
foreach($local_properties as $property => $info) {
echo '<tr><td>'.$info['desc'].'</td><td>'.$user[$property].'</td></tr>';
}
echo '</table>';
}
to:
Code: Select all
function showUser(&$user) {
global $serendipity;
echo '<table border="0" cellspacing="0" cellpadding="3" width="100%">';
$profile =& $this->getConfigVars($user['authorid']);
foreach($this->properties as $property => $info) {
if (isset($serendipity['POST']['submitProfileOptions']) && isset($serendipity['POST']['profile' . $property])) {
$user[$property] = $serendipity['POST']['profile' . $property];
$this->updateConfigVar($property, $profile, $user[$property], $user['authorid']);
$profile[$property] = $user[$property];
} else {
$user[$property] = $profile[$property];
}
$this->showCol($property, $info, $user);
}
echo '</table>';
To provide every author with the ability to export the contact as vcard i've set the export button out of a if clause in function showUsers().
Now to the problem. Everytime I want to export a contact as vcard I get the following error:
FN not specified and N not set; cannot set FN.FN component not set (required).
Catchable fatal error: Object of class PEAR_Error could not be converted to string in /var/www/bretsch/serendipity/plugins/serendipity_event_userprofiles/serendipity_event_userprofiles.php on line 768
I'm not quite sure but I think I got problems with $serendipity['POST']['profileUser']. I'm really stuck in this...
Thanks in Advance
Regards Andi