Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

User Manager - Extra Columns

17 years 5 months ago #40407 by marcpsummers
User Manager - Extra Columns was created by marcpsummers
I need to add a column in my user manager (admin area) of community builder.

a field from jos_comprofiler.

I have added new column and added this code...

<?php echo $row->cb_priority; ?>

but its not working

there must be a quick fix i can use to add this column data.

Please Log in or Create an account to join the conversation.

  • ziel
  • ziel
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
16 years 7 months ago #62641 by ziel
Replied by ziel on topic Re:User Manager - Extra Columns
it's not enough to ad this code: <?php echo $row->cb_priority; ?>


OPen the file admin.comprofiler.controller.php and insert: (row 1190)

if (checkJversion() <= 0) {
$query = "SELECT DISTINCT a.*, g.name AS groupname, ue.approved, ue.confirmed, ue.cb_extracolumn"
. "\n FROM #__users AS a"
. "\n LEFT JOIN #__comprofiler AS ue ON a.id = ue.id"
. "\n INNER JOIN #__core_acl_aro AS aro ON aro.value = a.id" // map user to aro
. "\n INNER JOIN #__core_acl_groups_aro_map AS gm ON gm.aro_id = aro.aro_id" // map aro to group
. "\n INNER JOIN #__core_acl_aro_groups AS g ON g.group_id = gm.group_id";


To search, insert this ( row 1123)

if (isset( $search ) && $search!= "") {
$where[] = "(a.username LIKE '%$search%' OR a.email LIKE '%$search%' OR a.name LIKE '%$search%' OR ue.cb_extracolumn LIKE '%$search%')";

Please Log in or Create an account to join the conversation.

  • Dorgo
  • Dorgo
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
16 years 4 months ago #71142 by Dorgo
Replied by Dorgo on topic Re:User Manager - Extra Columns
FYI

1.2 RC 2

/administrator/components/com_profiler/admin.comprofiler.controller.php
line: 1605
[code:1]$query = "SELECT DISTINCT u.*, g.name AS groupname, ue.approved,ue.confirmed"[/code:1]
change to:
[code:1]$query = "SELECT DISTINCT u.*, g.name AS groupname, ue.approved,ue.confirmed,ue.cb_NEWFIELDNAME[/code:1]
do the same with line: 1614

/administrator/components/com_profiler/admin.comprofiler.html.php
line: 1981
add a new line after (to add column last in table)
[code:1]<th width="5%" class="title">NEW COLUMN HEADING FOR FIELD</th>[/code:1]
... you should remove 5% of width from other columns

line: 2041 (after above line addition)
add a new line after
[code:1]<td><?php echo $row->cb_NEWFIELDNAME; ?></td>[/code:1]

Please Log in or Create an account to join the conversation.

  • famq23
  • famq23
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
14 years 5 months ago #137256 by famq23
Replied by famq23 on topic Re:User Manager - Extra Columns
Community Builder Version 1.2.1

In the file: /administrator/components/com_profiler/admin.comprofiler.controller.php

In the Line 1667

[code:1]
$query ="SELECT DISTINCT u.*, g.name AS groupname, ue.approved, ue.confirmed"

.$queryFrom ."\n LIMIT " . (int) $pageNav->limitstart . ", " . (int) $pageNav->limit;
[/code:1]

Change

[code:1]
$query ="SELECT DISTINCT u.*, g.name AS groupname, ue.approved, ue.confirmed, ue.cb_NAME_FIELD"

.$queryFrom ."\n LIMIT " . (int) $pageNav->limitstart . ", " . (int) $pageNav->limit;
[/code:1]

Please Log in or Create an account to join the conversation.

  • gdan
  • gdan
  • OFFLINE
  • Posts: 7
  • Thanks: 0
  • Karma: 0
14 years 2 months ago #142846 by gdan
Replied by gdan on topic Re:User Manager - Extra Columns
I have open the file admin.comprofiler.controller.php but it doesn't have line 1667, it only goes up to 667. I am running CB 1.2.3. Besides, your code discussion is way over my head. Is there an easier way to add a column to the CB User Manager? Attached is my admin.comprofiler.controller.php file.

Please Log in or Create an account to join the conversation.

  • antaraflo
  • antaraflo
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
13 years 4 months ago #173964 by antaraflo
Replied by antaraflo on topic Re: User Manager - Extra Columns
Hello!
I need to add an extra field for "Company" in the User Manager.
I´m using CB 1.4.
I´ve already added this in the Tab Manager, but I need it to appear under the User Manager.
How can i do that?
Thanks!!!

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum