UBB.Dev
Posted By: Anno Finished-[6.5] Paginate PMs 1.0 - 06/24/2005 3:54 PM
Mod Name / Version: Paginate PMs 1.0

Description: Splits the list of PMs into pages. The number of PMs per page is twice the number of posts per page on postlist.php.

Working Under: UBB.Threads 6.5, likely also 6.4x, 6.5.1, 6.5.1.1 and 6.5.2

Mod Status: Finished

Any pre-requisites: none

Author(s): Anno

Date: 06/24/05

Credits:

Files Altered:
viewmessages.php
templates/default/viewmessages.tmpl

New Files: none

Database Altered: no

Info/Instructions: In attachment

Disclaimer: Please backup every file that you intend to modify.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you might need to restore unmodified files.


Attached File
Posted By: Anno Re: Beta-[6.5] Paginate PMs - 06/25/2005 3:05 PM
Fixed a bug which resulted in an infinite loop when all messages were deleted.

If you already applied the mod, please reaply this step:

in viewmessages.php

Old code:
Code
  <br />#### Search for:<br />$i = 0;<br /><br />#### Insert before:<br />	$numpms = $dbh->total_rows($sth);<br />	<br />	if ($numpms == 0 && $page > 0){<br />		$page = ceil($nums/$PostsPer)-1;<br />	}	<br />}while ($numpms == 0);<br />.........<br />.........<br />.........<br />


New code:
Code
 <br />	$numpms = $dbh->total_rows($sth);<br />	$reloop = 0;<br />	if ($numpms == 0 && $page > 0){<br />		$page = ceil($nums/$PostsPer)-1;<br />		$reloop = 1; <br />	}	<br />}while ($reloop == 1);<br />.........<br />.........<br />.........<br /> 


I uploaded the new version in the attachemnt of the first post.
Posted By: bostongio Re: Beta-[6.5] Paginate PMs - 06/25/2005 4:34 PM
Hmm, this looks familiar...
Posted By: Anno Re: Beta-[6.5] Paginate PMs - 06/25/2005 5:31 PM
Indeed it should
Posted By: Jest Re: Beta-[6.5] Paginate PMs - 07/25/2005 10:26 AM
Cool... it works fine...
© UBB.Developers