function theme_shoutbox_page in Shoutbox 7
Same name and namespace in other branches
- 5 shoutbox.module \theme_shoutbox_page()
- 6.2 shoutbox.theme.inc \theme_shoutbox_page()
- 6 shoutbox.module \theme_shoutbox_page()
- 7.2 shoutbox.theme.inc \theme_shoutbox_page()
Theme function for displaying the shoutbox page.
Parameters
$output: The shout output data. See shoutbox_display_posts()
Return value
String containing HTML formatted page.
File
- ./
shoutbox.theme.inc, line 137 - Theme callbacks for the shoutbox module.
Code
function theme_shoutbox_page($variables) {
// Render each child.
// Then put it into a table.
$shouts = array();
$sorted_shouts = element_children($variables['rows'], TRUE);
foreach ($sorted_shouts as $key) {
$shouts[] = array(
drupal_render($variables['rows'][$key]),
);
}
if (!empty($shouts)) {
$shouts = theme('table', array(
'header' => NULL,
'rows' => $shouts,
));
}
else {
$shouts = t('There are currently no ' . DEFAULTSHOUTPLURAL);
}
return $shouts;
}