Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
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.
Attachments
128450-paginate_PMs_6.5_1.0.txt (0 Bytes, 153 downloads)

Last edited by Anno; 06/25/2005 2:22 PM.
Sponsored Links
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
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.

Joined: Sep 2004
Posts: 8
Lurker
Lurker
Offline
Joined: Sep 2004
Posts: 8
Hmm, this looks familiar...

Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
Indeed it should

Joined: Feb 2005
Posts: 7
Lurker
Lurker
Offline
Joined: Feb 2005
Posts: 7
Cool... it works fine...

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,834
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1336
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 3
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)