- function show_profile($profile, $terms) {
- common_element_start('li', array('class' => 'profile_single',
- 'id' => 'profile-' . $profile->id));
- $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
- common_element_start('a', array('href' => $profile->profileurl));
- common_element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE),
- 'class' => 'avatar stream',
- 'width' => AVATAR_STREAM_SIZE,
- 'height' => AVATAR_STREAM_SIZE,
- 'alt' =>
- ($profile->fullname) ? $profile->fullname :
- $profile->nickname));
- common_element_end('a');
- common_element_start('p');
- common_element_start('a', array('href' => $profile->profileurl,
- 'class' => 'nickname'));
- common_raw($this->highlight($profile->nickname, $terms));
- common_element_end('a');
- if ($profile->fullname) {
- common_text(' | ');
- common_element_start('span', 'fullname');
- common_raw($this->highlight($profile->fullname, $terms));
- common_element_end('span');
- }
- if ($profile->location) {
- common_text(' | ');
- common_element_start('span', 'location');
- common_raw($this->highlight($profile->location, $terms));
- common_element_end('span');
- }
- common_element_end('p');
- if ($profile->homepage) {
- common_element_start('p', 'website');
- common_element('a', array('href' => $profile->homepage),
- $this->highlight($profile->homepage));
- common_element_end('p');
- }
- if ($profile->bio) {
- common_element_start('p', 'bio');
- common_raw($this->highlight($profile->bio, $terms));
- common_element_end('p');
- }
- common_element_end('li');