? ascending_form.patch
Index: shoutbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/shoutbox/shoutbox.module,v
retrieving revision 1.25.2.19
diff -u -p -r1.25.2.19 shoutbox.module
--- shoutbox.module	3 Mar 2009 08:01:44 -0000	1.25.2.19
+++ shoutbox.module	5 Dec 2009 15:34:35 -0000
@@ -813,16 +813,21 @@ function _shoutbox_block_view() {
   $show_amount = variable_get('shoutbox_showamount', '20');
   $shoutbox_ascending = variable_get('shoutbox_ascending', FALSE);
   $shoutbox_posts_data = _shoutbox_display_posts($show_amount);
-  $output = $shoutbox_posts_data['output'];
+
+  // List of posts.
+  $data = $shoutbox_posts_data['output'];
 
   // Output the shoutbox form.
   if (_shoutbox_user_access('post shouts') || _shoutbox_user_access('post shouts without approval')) {
-    $output .= drupal_get_form('shoutbox_add_form');
+    $for_user .= drupal_get_form('shoutbox_add_form');
   }
   else {
-    $output .= theme('shoutbox_post_forbidden');
+    $for_user .= theme('shoutbox_post_forbidden');
   }
 
+  // Put the form and forbidden message on top if the messages are ascending (newest on top).
+  $output = $shoutbox_ascending ? $for_user . $data : $data . $for_user;
+
   $default_nick = t('Your Name/Nick');
   $default_msg = t('Enter Message');
   $default_url = t('Your Website URL');
