hi

When i choose to show, say, only 20 posts in the shoutbox; it will show the 20 FIRST post and no the 20 lasts ones. It is quite anoying....

I have a quick hack to do so:
in shoutbox.module, line 449 ( after " $color = 0; " ),
replace the line $result = db_query("SELECT * FROM {shoutbox} WHERE status=1 ORDER BY created LIMIT %d", $show_amount);
by the lines:

$all_rows = db_query("SELECT * FROM  {shoutbox} WHERE status=1");
  $nb_rows = db_num_rows($all_rows);
  $start_row = $nb_rows - $show_amount;
  if ($start_row < 0)
        {
        $start_row = 0;
        }

  $result = db_query("SELECT * FROM {shoutbox} WHERE status=1 ORDER BY created LIMIT $start_row,$nb_rows);

Hope it will help

Charly

Comments

disterics’s picture

Version: master » 5.x-1.x-dev
Status: Active » Closed (fixed)

This is fixed in 5.x-1.0 and upwards vision.