1
El_Jordo
Hack request: Private message sorting
  • 2003/8/29 15:25

  • El_Jordo

  • Just popping in

  • Posts: 64

  • Since: 2003/4/23


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?

2
ackbarr
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);

3
El_Jordo
Re: Hack request: Private message sorting
  • 2003/8/29 17:21

  • El_Jordo

  • Just popping in

  • Posts: 64

  • Since: 2003/4/23


That worked. Thanks very much!

4
El_Jordo
Re: Hack request: Private message sorting
  • 2003/9/3 23:47

  • El_Jordo

  • Just popping in

  • Posts: 64

  • Since: 2003/4/23


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?

5
ackbarr
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

6
ackbarr
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/modules/mydownloads/singlefile.php?lid=13

7
El_Jordo
Re: Hack request: Private message sorting
  • 2003/9/5 2:51

  • El_Jordo

  • Just popping in

  • Posts: 64

  • Since: 2003/4/23


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

8
Shine
Re: Hack request: Private message sorting
  • 2003/9/5 8:30

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


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


9
ackbarr
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.

10
Catzwolf
Re: Hack request: Private message sorting
  • 2003/9/5 13:12

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


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

Login

Who's Online

340 user(s) are online (240 user(s) are browsing Support Forums)


Members: 0


Guests: 340


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits