Issue with sorting forum by Last Post
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #1
Issue with sorting forum by Last Post
http://harajuju.net/Forum-Haralooks?date...http://harajuju.net/Forum-Haralooks?datecut=0&sortby=lastpost&

When you try to go to the next page, the sorting will be reset to the forum default, which is by thread creation date. I suspect this is because MyBB does not think it needs to append the sorting options to the next page button because it is the board default, even though we are using a different default sorting option with xThreads.
07-11-2012 05:07 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Issue with sorting forum by Last Post
lastpost sorting is stock MyBB behaviour.  I suspect you're using a custom link rather than the multipage setup, so you need to stick the variables in yourself.
I believe {$page_url} should do it.  Not sure if different with Google SEO URLs.

If you use XThreads filtering, it currently doesn't really expose a nice way to append those in.  You may be able to work out something with

Code:
<func htmlspecialchars>{$xthreads_forum_filter_args}</func>

though it's a ilttle dodgy.


My Blog
07-11-2012 10:00 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #3
RE: Issue with sorting forum by Last Post
I am using {$page_url} actually. Works for all sorting except when sorting by Last Post.
07-11-2012 11:37 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Issue with sorting forum by Last Post
Maybe because MyBB uses the sortby url only if the sortby is not by the lastpost? So, when you sort threads by the lastpost, the sortby url won't be appended to the $page_url.
forumdisplay.php

PHP Code:
596
597
598
599
600
601
if($sortby != "lastpost")
{
	$page_url .= "{$q}{$and}sortby={$sortby}";
	$q = '';
	$and = "&";
}


07-12-2012 03:19 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #5
RE: Issue with sorting forum by Last Post
Yes, that must be the issue. What should I change it to?
07-12-2012 06:50 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #6
RE: Issue with sorting forum by Last Post
Try from:

PHP Code:
if($sortby != "lastpost")


to:

PHP Code:
if($sortby)


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
07-12-2012 07:57 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: Issue with sorting forum by Last Post
. . . . . . . . .

PHP Code:
1
2
3
4
5
6
if(($foruminfo['defaultsortby'] != "" && $sortby != $foruminfo['defaultsortby']) || ($foruminfo['defaultsortby'] == "" && $sortby != "lastpost"))
{
	$page_url .= "{$q}{$and}sortby={$sortby}";
	$q = '';
	$and = "&";
}


07-12-2012 08:04 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #8
RE: Issue with sorting forum by Last Post
That looks better Tongue

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
07-12-2012 08:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #9
RE: Issue with sorting forum by Last Post
If you're feeling generous, you can report it as a MyBB bug.

My Blog
07-12-2012 08:06 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #10
RE: Issue with sorting forum by Last Post
Yeah, I definitely will. Thanks.
07-13-2012 12:32 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: