this is what i'm looking for.
Quote:
I was thinking of porting that as a XOOPS module
I would be very amused if you could do this
I was thinking of porting that as a XOOPS module
<?php
$xoopsOption['pagetype'] = "pmsg";
include_once "mainfile.php";
if ( !$xoopsUser ) {
$errormessage = _PM_SORRY."<br />"._PM_PLZREG."";
redirect_header("user.php",2,$errormessage);
} else {
include XOOPS_ROOT_PATH.'/header.php';
$pm_handler =& xoops_gethandler('privmessage');
[b]// $pm_arr =& $pm_handler->getObjects(new Criteria('from_userid', $xoopsUser->getVar('uid')));
// Modification to swap sort order
$criteria = new CriteriaCompo(new Criteria('from_userid', $xoopsUser->getVar('uid')));
$criteria->setSort('msg_time');
$criteria->setOrder('desc');
$pm_arr =& $pm_handler->getObjects($criteria);
// End Modification[/b]
include XOOPS_ROOT_PATH.'/header.php';
$criteria = new Criteria('from_userid', $xoopsUser->getVar('uid'));
$criteria->setLimit(1);
$criteria->setStart($start);
$criteria->setSort('msg_time');
[b] $criteria->setOrder('desc');[/b]
$pm_arr =& $pm_handler->getObjects($criteria);