Hi!
Hm, indeed this would be harder to do.
Since you are already using the userprofiles plugin, you will see that for each author you can define birthdays, homepage URLs and so on. Now you just need a function that fetches this information and displays it for you.
Doing this is done within the same piece of code, which you replace to this:
Code: Select all
if (serendipity_db_bool($this->get_config('gravatar'))) {
$img = 'http://www.gravatar.com/avatar.php?'
. 'default=' . $this->get_config('gravatar_default','80')
. '&gravatar_id=' . md5($eventData['email'])
. '&size=' . $this->get_config('gravatar_size','80')
. '&border=&rating=' . $this->get_config('gravatar_rating','R');
$profile = $this->getConfigVars($eventData['authorid']);
$this->found_images[$author] = '<div class="serendipity_authorpic"><a href="' . $profile['url'] . '"><img src="' . $img . '" alt="' . AUTHOR . '" title="' . htmlspecialchars($authorname) . '" /></a><br /><span>' . htmlspecialchars($authorname) . '</span></div>';
$eventData['body'] = $this->found_images[$author] . $eventData['body'];
} elseif (isset($this->found_images[$author])) {
// Author image was already found previously. Display it.
$eventData['body'] = $this->found_images[$author] . $eventData['body'];
} elseif ($img = serendipity_getTemplateFile('img/' . preg_replace('@[^a-z0-9]@i', '_', $author) . '.' . $this->get_config('extension'))) {
// Author image exists, save it in cache and display it.
$profile = $this->getConfigVars($eventData['authorid']);
$this->found_images[$author] = '<div class="serendipity_authorpic"><a href="' . $profile['url'] . '"><img src="' . $img . '" alt="' . AUTHOR . '" title="' . htmlspecialchars($authorname) . '" /></a><br /><span>' .htmlspecialchars($authorname) . '</span></div>';
$eventData['body'] = $this->found_images[$author] . $eventData['body'];
} else {
// No image found, do not try again in next article.
$this->found_images[$author] = '';
}
Note how I added
Code: Select all
$profile = $this->getConfigVars($eventData['authorid']);
inside there and added a
Code: Select all
<a href="' . $profile['url'] . '">...</a>
to it.
Regards,
Garvin