MyBB Community Forums

Full Version: Adding custom field to approve user page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi Guys,

As the title says, I would like to add a custom field to show below the 'Post Count' in the approve user page. My site requires all users to be activated by admins, and what is entered into the custom field determines whether they are activated. It is a pain in the lime having to edit the user to find the info before activating it.

[attachment=13164]

Maybe I'm looking too far into it, and there is probably an easier way to do it but I tried adding
 . $post['fid4']
after
$card .= "<div class=\"user_details\">".implode("<br />", $user_details)
in admin/modules/user/users.php but it doesn't work. However, when I also tried putting
. "test"
there that showed?

[attachment=13165]

I would appreciate any help.

Thanks!
LTC
You can create a custom view to do what you want - there is no need to edit MyBB core files.

In your ACP, go to Users & Groups. On the right side, you'll see "Views". Click on this, then go to "Manage Views" => "Create New View".

Run through the options with what you want, but set visibility as public, default view to no, display results as business cards, and make sure the "Fields to Show" has the Post Count option enabled. To only show the people waiting activation, just select this group from the usergroup option, and leave the rest blank.

When you save the view, it can be accessed again by clicking the "View" menu in Users & Groups.
Yep that's great, thanks for that. However what I need to do is add a custom profile field to the view user page to enable for easy activation. I don't see that in the fields to show.

Cheers,
LTC
When people need activation, you just click the link on the ACP home for members awaiting activation, and there's then an option to activate them...
Yep, however I need a custom profile field to show on that activation page. My site requires all users to be activated by admins, and what is entered into the custom field determines whether they are activated. It is a pain in the lime having to edit the user to find the info before activating it. So I would like that custom profile field to be shown on the activation page.

Cheers,
LTC
Would appreciate any help.

Cheers,
LTC
So, a new registered user, must be approved by ALL admins before becoming a registered approved member?

Cohen
No, I think they want the entry of a custom profile field to show on the activation page. I'm quite sure this will require a mod of some kind as I can't find any way to do this by default so I'll move this to where it might get better attention.

Doesn't sound like a terrible idea to suggest for a future release though. Makes sense why you want to do it.
I am so close, Lol. I've found in the php files where the users page is, and I've managed to add "Test" there. However {$post['fid4']} doesn't.

IMO the Admin CP pages should be templated, not hard coded but that's just my opinion Smile
Try {$user['fid4']} or {$mybb->user['fid4']}

Complete guess but might work.
Pages: 1 2