xoops forums

El_Jordo

Just popping in
Posted on: 2003/8/29 15:25
El_Jordo
El_Jordo (Show more)
Just popping in
Posts: 64
Since: 2003/4/23
#1

Hack request: Private message sorting

I would like a hack to make the private message list sort by date, with newest messages at the top and oldest at the bottom. Currently, the messages are sorted with oldest at the top and newest at the bottom.

I can't imagine that this hack would be too difficult. The current sort order only needs to be reversed. But I can't seem to find where that sorting is done.

Can anybody help me out here?
Posted on: 2003/8/29 16:23
ackbarr
ackbarr (Show more)
Posts: 1449
Since: 2002/10/2
#2

Re: Hack request: Private message sorting

sure. Try this mod for XOOPS 2.0.3 (w/o the IPB module):

On ~line 50:
$pm_arr =& $pm_handler->getObjects(new Criteria('to_userid'$xoopsUser->getVar('uid')));

can be replaced with:
$criteria = new CriteriaCompo(new Criteria('to_userid'$xoopsUser->getVar('uid')));
$criteria->setSort('msg_time');
$criteria->setOrder('desc');
$pm_arr =& $pm_handler->getObjects($criteria);

El_Jordo

Just popping in
Posted on: 2003/8/29 17:21
El_Jordo
El_Jordo (Show more)
Just popping in
Posts: 64
Since: 2003/4/23
#3

Re: Hack request: Private message sorting

That worked. Thanks very much!

El_Jordo

Just popping in
Posted on: 2003/9/3 23:47
El_Jordo
El_Jordo (Show more)
Just popping in
Posts: 64
Since: 2003/4/23
#4

Re: Hack request: Private message sorting

Small problem: When I click on the links to view a private message, I get the wrong message. It seems the message names are sorted right, but the links aren't. Any suggestions?
Posted on: 2003/9/4 0:14
ackbarr
ackbarr (Show more)
Posts: 1449
Since: 2002/10/2
#5

Re: Hack request: Private message sorting

well that makes absolutely no sense I'll have to dig into the code a little deeper tonight and see what I can find
Posted on: 2003/9/5 1:04
ackbarr
ackbarr (Show more)
Posts: 1449
Since: 2002/10/2
#6

Re: Hack request: Private message sorting

Ok, I took a look at the problem and have a solution. However since that solution is not easy to explain, I packaged my modified file up as a download on my website. To get the updated version of this hack, please follow the link below:

http://ackbarr.greatweb.com/xoops2/mo ... ads/singlefile.php?lid=13

El_Jordo

Just popping in
Posted on: 2003/9/5 2:51
El_Jordo
El_Jordo (Show more)
Just popping in
Posts: 64
Since: 2003/4/23
#7

Re: Hack request: Private message sorting

Perfect! Next time you come up north, I'll buy you a drink.

Shine

Just can't stay away
Posted on: 2003/9/5 8:30
Shine
Shine (Show more)
Just can't stay away
Posts: 822
Since: 2002/7/22
#8

Re: Hack request: Private message sorting

The possibility I am missing concerning the Private messages part is an admin limitation setting.
Notifications are default send as a PM, and if users are also frequently using this PM-option without cleaning their in-outbox up, it will take a lot of unneccesary DB-space.

It would be nice if this admin feature is gonna be build in within the XOOPS version, or somebody creates a hack to realise this.

Grtz., SHine

Posted on: 2003/9/5 11:53
ackbarr
ackbarr (Show more)
Posts: 1449
Since: 2002/10/2
#9

Re: Hack request: Private message sorting

agreed - I like how vbulliten handles the private msg system. If you are sent a pm and your box is over the limit, it sends you an email stating that you missed a pm and that you need to clean out your box.

Catzwolf

Home away from home
Posted on: 2003/9/5 13:12
Catzwolf
Catzwolf (Show more)
Home away from home
Posts: 1392
Since: 2007/9/30
#10

Re: Hack request: Private message sorting

Quote:

ackbarr wrote:
agreed - I like how vbulliten handles the private msg system. If you are sent a pm and your box is over the limit, it sends you an email stating that you missed a pm and that you need to clean out your box.


Hi

The module development team is working on this at the moment.

So there will be a new PM system (module) out within the next few weeks and this should have most of the features requested here.

This should replace the current PM system with min changes to the core files