function theme_guestbook_form_entry_form in Guestbook 6
Same name and namespace in other branches
- 5.2 guestbook.module \theme_guestbook_form_entry_form()
- 5 guestbook.module \theme_guestbook_form_entry_form()
- 6.2 guestbook.module \theme_guestbook_form_entry_form()
- 7.2 guestbook.module \theme_guestbook_form_entry_form()
File
- ./
guestbook.module, line 562
Code
function theme_guestbook_form_entry_form($form_state) {
$output = '';
$access = $form_state['access']['#value'];
$display = $form_state['display']['#value'];
$uid = $form_state['uid']['#value'];
switch ($access) {
case 'allowed':
if ($display == 'link') {
// Output only a link to a page with the form.
$output .= '<p>» ' . l(t('Add guestbook entry'), guestbook_path($uid) . '/sign') . '</p>';
}
else {
$output .= $display == 'page' ? '' : '<h3>' . t('Add guestbook entry') . '</h3>';
$output .= drupal_render($form_state);
}
break;
case 'own guestbook':
$output .= ' ';
break;
case 'not logged in':
$output .= '<p class="links">» ' . t('You must be logged in to post a comment.') . '</p>';
break;
case 'not allowed':
$output .= '<p class="links">» ' . t('You are not allowed to post in this guestbook.') . '</p>';
break;
}
return $output;
}