Memberlist mod
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #11
RE: Memberlist mod
vbulletin has it set so there's a button to sort the memberlist back to before you originally sorted it.

if you look at this memberlist:
http://forum.pafoa.org/memberlist.html?o...http://forum.pafoa.org/memberlist.html?order=DESC&sort=p

I sorted it by the users with the most posts, but there's a V or some sort of arrow next to the word 'posts' to reverse the order.
05-06-2010 08:18 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #12
RE: Memberlist mod
Just request this as a feature to MyBB.
None of the column headers sort, and it wasn't designed with that in mind.

My Blog
05-06-2010 08:29 AM
Find all posts by this user Quote this message in a reply
Simon Offline
Junior Member
**
Posts: 2
Joined: Aug 2010
Post: #13
RE: Memberlist mod
Please pardon this necrophilia / threadjacking but I think the OP is done with this thread, and it's exactly what I'm interested in.

(04-19-2010 07:20 AM)RateU Wrote:  
(04-17-2010 09:56 AM)Shemo Wrote:  =(  ok..I just like to be able to click the titles and sort it.

I think you can use sorting url like this in your memberlist template:

(Example sorting url for most posts)

HTML Code
<a href="memberlist.php?sort=postnum&amp;order=desc&amp;perpage={$mybb->input['perpage']}">{$lang->posts}</a>


I tried that--it worked perfectly.

But I also tried it on the "Style" column (which I've added to the memberlist because I'm trying to find a way to find all users of the different styles I have installed) and it simply does not sort.

This is what I've tried:

HTML Code
<a href="memberlist.php?sort=style&amp;order=asc&amp;perpage={$mybb->input['perpage']}">Style</a>


Any idea why?

08-31-2010 10:11 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #14
RE: Memberlist mod
You'll need to make a code edit because the underlying code doesn't sort by style.

Find the following code in memberlist.php:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	switch($mybb->input['sort'])
	{
		case "regdate":
			$sort_field = "u.regdate";
			break;
		case "lastvisit":
			$sort_field = "u.lastactive";
			break;
		case "reputation":
			$sort_field = "u.reputation";
			break;
		case "postnum":
			$sort_field = "u.postnum";
			break;
		default:
			$sort_field = "u.username";
			$mybb->input['sort'] = 'username';
			break;
	}

Use your intuition to stick in your style sorting.  It's probably something like this:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
	switch($mybb->input['sort'])
	{
		case "regdate":
			$sort_field = "u.regdate";
			break;
		case "lastvisit":
			$sort_field = "u.lastactive";
			break;
		case "reputation":
			$sort_field = "u.reputation";
			break;
		case "postnum":
			$sort_field = "u.postnum";
			break;
		case "style":
			$sort_field = "u.style";
			break;
		default:
			$sort_field = "u.username";
			$mybb->input['sort'] = 'username';
			break;
	}


Haven't tried, but hopefully it works.


My Blog
(This post was last modified: 08-31-2010 10:24 AM by ZiNgA BuRgA.)
08-31-2010 10:23 AM
Find all posts by this user Quote this message in a reply
Simon Offline
Junior Member
**
Posts: 2
Joined: Aug 2010
Post: #15
RE: Memberlist mod
Ahhhhh.

Actually, I'd originally wanted to add a search field but when that didn't work I'd decided to try sorting (and manually finding the specific rows I wanted).

But looking memberlist.php I can see now why the searching didn't work, so I'll go back and take a crack at that.

Cheers bud, you're a star.
08-31-2010 11:44 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: