function theme_guestbook in Guestbook 6
Same name and namespace in other branches
- 5.2 guestbook.module \theme_guestbook()
- 5 guestbook.module \theme_guestbook()
- 6.2 guestbook.module \theme_guestbook()
- 7.2 guestbook.module \theme_guestbook()
Guestbook theme functions
1 theme call to theme_guestbook()
- guestbook_page in ./
guestbook.module - Output a guestbook page; menu callback.
File
- ./
guestbook.module, line 666
Code
function theme_guestbook($uid, $entries, $comment_entry, $limit = 20) {
global $user;
$form_location = variable_get('guestbook_form_location', 'above');
$pager_position = variable_get('guestbook_pager_position', GUESTBOOK_PAGER_BELOW);
// intro text
$intro = _guestbook_info($uid, 'intro');
$output = $intro ? check_markup($intro) : '';
$output .= _guestbook_user_profile_link($uid);
// form on separate page
$output .= $form_location == 'separate page' ? guestbook_form_entry($uid, 'link') : '';
// form and pager above entries
$output .= $form_location == 'above' ? guestbook_form_entry($uid) : '';
$output .= $pager_position & GUESTBOOK_PAGER_ABOVE ? theme('pager', NULL, $limit, 0) : '';
$i = 0;
foreach ($entries as $entry) {
$zebra = $i % 2 ? 'odd' : 'even';
$output .= theme('guestbook_entry', $uid, $entry, $comment_entry, $zebra);
$i++;
}
// form and pager below entries
$output .= $pager_position & GUESTBOOK_PAGER_BELOW ? theme('pager', NULL, $limit, 0) : '';
$output .= $form_location == 'below' ? guestbook_form_entry($uid) : '';
return '<div class="guestbook">' . $output . "</div>\n";
}