| 
Welcome, Guest

Administrator User Management Sort by Options
(1 viewing) (1) Guest

TOPIC: Administrator User Management Sort by Options

Re:Administrator User Management Sort by Options 3 years, 1 month ago #83706

  • Posts:
  • Karma:
Indeed, It would be nice to be able to sort the table under "CB User Manager".
The topic has been locked.

Re:Administrator User Management Sort by Options 3 years ago #86181

  • Posts:
  • Karma:
Yes - I need to be able to sort on the User Management columns. I will probably attempt this, so any pointers welcome Would be nice to have this in core...

Chris
The topic has been locked.

Re:Administrator User Management Sort by Options 3 years ago #86602

  • Posts:
  • Karma:
I'm interested on this feature too....
Seems curious that I can order users by name, username or email in the General User list of Joomla Backend and I can't in the User Management of CB....
Some hints?
The topic has been locked.

Re:Administrator User Management Sort by Options 2 years, 11 months ago #89747

  • Posts:
  • Karma:
Hello,

you have to edit Controler and View of the component :

(comments of my code are in french)

change administrator/components/com_profiler/admin.comprofiler.controller.php (at the line +- 1220):
/** 
modification pour ajouter un tri
____________________________________________________
OLD :
$query .= "\n WHERE aro.section_value = 'users' "
. (count( $where ) ? "\n AND " . implode( ' AND ', $where ) : ""«»)
. "\n LIMIT " . (int) $pageNav->limitstart . ", " . (int) $pageNav->limit
;
*/

//
// récupérer les paramètres
$order = trim( cbGetParam( $_REQUEST, 'order', null ) );
$by = trim( cbGetParam( $_REQUEST, 'orderby', null ) );
 
//
// défaut, protéger
if(empty($order) || is_null($order) || !is_string($order)) $order = 'asc';
if(empty($by) || is_null($by) || !is_string($by)) $by = 'name';
 
//
// controler
// on établit une liste de valeurs autorisées, et on regarde si la valeur est dans la liste. Par défaut, on utilisera le premier élément de la liste
$tAuthOrder = array ('ASC', 'DESC');
$tAuthBy = array ('name', 'email', 'username', 'id');
$order = strtoupper($order);
if(!in_array($order, $tAuthOrder)) $order = $tAuthOrder[0];
if(!in_array($by, $tAuthBy)) $by = $tAuthBy[0];
 
//
// ajouter le tri à la requete sql
$orderby = "\n ORDER BY a.$by $order";
 
$query .= "\n WHERE aro.section_value = 'users' "
. (count( $where ) ? "\n AND " . implode( ' AND ', $where ) : ""«»)
. $orderby
. "\n LIMIT " . (int) $pageNav->limitstart . ", " . (int) $pageNav->limit
;
 
/* end tri */


And administrator/components/com_profiler/admin.comprofiler.html.php (at the line +- 1640):
 
<?php
/**
modification tri des utilisateurs
______________________________________________________
OLD :
<th width="15%" class="title">Name</th>
*/

?>
<th width="15%" class="title">Name
(<a href="<?php echo $mosConfig_live_site; ?>index2.php?option=com_comprofiler&task=showusers&orderby=name&order=asc">asc</a>
/ <a href="<?php echo $mosConfig_live_site; ?>index2.php?option=com_comprofiler&task=showusers&orderby=name&order=desc">desc</a>«»)
</th>
you can do it for the other <th>...

Enjoy !

Post edited by: Halleck, at: 2009/02/24 17:52
The topic has been locked.

Re:Administrator User Management Sort by Options 2 years, 7 months ago #103731

  • Posts:
  • Karma:
Hi, have you found a plug or way to sort the CB User Manager table? I need to sort this table by Name.

Thanks
The topic has been locked.

Re:Administrator User Management Sort by Options 2 years, 7 months ago #103733

  • Posts:
  • Karma:
Hi, has anyone tried this?
I'm not a programmer and was not able to find the lines of code you mention the were the old code in the file.

Some more help would be appreciated.
The topic has been locked.
Time to create page: 0.81 seconds