bugIgloo; the free Interest group social networking and collaboration platform! - Bugs: bug #15661, Sort order of membership directory...

 
 

bug #15661: Sort order of membership directory isn't convienient/flexible

Submitter:  None
Submitted:  Wed 08 Feb 2006 03:29:36 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Feb 2006 03:29:36 PM UTC, original submission:  

Charles McGonegal

I wished to be able to sort the membership list under 'Structure' by other fields.:

I added a switch:case statement to the node_user.php file
and 2 lines to the menu block of node_user.tpl.php
Note: I hard coded the display strings in the template, rather than using a language element - but it's for my own site.

In node_user.php (sorry, wordpad doesn't count lines:-)
$display = "view_user";
}
else {
if (isset($_REQUEST['order_by'])) {
switch($_REQUEST['order_by']){
case 'online':
$user->order_by = "u.active_time DESC";
break;
case 'id':
$user->order_by = "u.user_id";
break;
case 'role':
$user->order_by = "u.role_id";
break;
default:
$user->order_by = "p.profile_nic";
}
}
else {
$user->order_by = "u.user_firstname";
}

$user->order_by = "u.user_firstname";
$output_users = $user->selUsers();
}


And in the template:
<a href="node_user.php?order_by=id"><?php echo "list by user id"; ?></a> <br />
<a href="node_user.php?order_by=role"><?php echo "list by user role"; ?></a> <br />

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code