2006-10-31, 05:47 PM

I was just wondering if I could some help here, hopefully from MusicalMidget, since this is your mod!

I've changed the order of the shouts so that the newest appears first and now need to have the code rewritten so that each of the pages will also have the newest listed first. I found the code that needs to be rewritten.

Can anyone take a whack at this? I tried myself but I'm not good enough at this. Thanks in advance!

I have tried the following, which will put them in the right order but will only show the first and last page of shouts. Will be a problem when/if I get 3 or more pages!

I've changed the order of the shouts so that the newest appears first and now need to have the code rewritten so that each of the pages will also have the newest listed first. I found the code that needs to be rewritten.

```
if($page == $total_pages)
{
$start = 0;
$limit = $count - (($total_pages - 1) * $perpage);
}
else
{
$limit = $perpage;
if($page == 1)
{
$start = $count - $limit;
}
else
{
$start = $count - ($limit * $page);
}
}
```

Can anyone take a whack at this? I tried myself but I'm not good enough at this. Thanks in advance!

I have tried the following, which will put them in the right order but will only show the first and last page of shouts. Will be a problem when/if I get 3 or more pages!

```
if($page == 1)
{
$start = 0;
$limit = $perpage;
}
else
{
$start = $count - $perpage;
$limit = $perpage;
}
if($start < 0)
{
$limit = $count;
}
```