Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
PM Message Order
Topic Started: May 25 2014, 09:54 AM (335 Views)
Auroris
Fresh out of the Asylum
[ *  * ]
In PMs at the moment, they always display opposite to the topics, with the most recent message at the top. If I'm reading through a conversation, I am scrolling up the page. I find this irritation and somewhat irrational. I've looked through all the settings I can think of. Is there any setting I'm missing, else is there any code or something that can make PMs display oldest first?
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
$('#pm_inbox tr[class*="row"]').each(function () {
$(this).prependTo($(this).parents('tbody'));
});

$('#pm_inbox tr[class*="row"]:last').next('tr').next('tr').andSelf().prependTo('#pm_inbox tbody');
</script>
Offline Profile Quote Post Goto Top
 
Auroris
Fresh out of the Asylum
[ *  * ]
That seems to have re-ordered the display order in the inbox, which could be very useful, but I am quite happy with how it is normally. What I am trying to do is to reorder the individual messages within each conversation, sort of as below.

Current

Message 100
Message 99
Message 98
Message 97
etc

Target

Message 1
Message 2
Message 3
Message 4
etc
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this instead:
Code:
 
<script type="text/javascript">
$('#conversation tr:not(tr:has(td.c_foot))').each(function () {
$(this).prependTo('#conversation');
});

$('#conversation tr:not(tr:has(td.c_foot))').has('td.c_postinfo').each(function () {
$(this).insertBefore($(this).prev('tr'));
});
</script>
Offline Profile Quote Post Goto Top
 
Auroris
Fresh out of the Asylum
[ *  * ]
OK. This seems to be almost working. :ermm:

The individual screens of messages seem to have sorted as desired, but it looks like the page select is still going backwards, as below.

Also, to pre-empt me asking this afterwards, can it also be made to go straight to the last page with the most recent post on?

Thanks so far in any case.



Page 1
Apr 21 2014, 09:03 PM
Apr 21 2014, 09:23 PM
...
May 11 2014, 03:24 PM

Page 2

Apr 12 2014, 05:37 PM
Apr 12 2014, 05:54 PM
...
Apr 20 2014, 12:06 AM
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'm not sure what you mean. The example you provided is going from oldest to newest, which is what you wanted, yes?

Making it go to the last page when multiple pages are visible would require too much AJAX.
Offline Profile Quote Post Goto Top
 
Auroris
Fresh out of the Asylum
[ *  * ]
OK then. Thanks very much. I think I just worked out why you are the intelligent and helpful coder and I am simply the one begging for help.

It comes down to my ability to order dates.

Thanks very much, in any case.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply