More Info from New Members

Divinum Fiat

Well-known member
I'm trying to give my community the feel of it being a private community. All members are currently manually approved. What I'd like to add is a field where people have to give an explanation as to why they think they would make a good fit for our community when they register rather than just adding a screen name and email address. Can this area be customized some?
 
Jake, while the added on fields were easy to implement, they are not showing up in the "users to be manually approved." The whole point of the extra fields is for them to state who referred them or tell us more about why they want to join. These answers are there in their profile but only after I approve them, which is too late. Is there any way I can have these answers show up in the "users awaiting approval" page?
 
Jake, while the added on fields were easy to implement, they are not showing up in the "users to be manually approved." The whole point of the extra fields is for them to state who referred them or tell us more about why they want to join. These answers are there in their profile but only after I approve them, which is too late. Is there any way I can have these answers show up in the "users awaiting approval" page?

Edit this file:

library/XenForo/ControllerAdmin/User.php

Add the red code:

Rich (BB code):
	public function actionModerated()
	{
		$users = $this->_getUserModel()->getUsers(array(
			'user_state' => 'moderated'
		), array('join' => XenForo_Model_User::FETCH_USER_PROFILE | XenForo_Model_User::FETCH_USER_OPTION));
		if (!$users)
		{
			return $this->responseMessage(new XenForo_Phrase('no_users_awaiting_approval'));
		}

		$users = $this->_getUserModel()->prepareUserCards($users);

		$viewParams = array(
			'users' => $users
		);

		return $this->responseView('XenForo_ViewAdmin_User_Moderated', 'user_moderated', $viewParams);
	}

Edit this template:

Admin CP -> Development -> Admin Templates -> user_moderated

Add the red code:

Rich (BB code):
<xen:title>{xen:phrase users_awaiting_approval}</xen:title>

<xen:form action="{xen:adminlink 'users/moderated/update'}">
	<xen:foreach loop="$users" value="$user">
		<fieldset>
			<xen:controlunit label="{xen:phrase user}:"><a href="{xen:adminlink users/edit, $user}" target="_blank">{$user.username}</a> ({$user.email}) ({$user.customFields.fieldid})</xen:controlunit>
			<xen:radiounit label="{xen:phrase action}:" name="users[{$user.user_id}][action]">
				<xen:option value="none" selected="true">{xen:phrase do_nothing}</xen:option>
				<xen:option value="approve">{xen:phrase approve}</xen:option>
				<xen:option value="reject">
					<xen:label>{xen:phrase reject_and_delete_with_rejection_reason}:</xen:label>
					<xen:textbox placeholder="{xen:phrase optional}" name="users[{$user.user_id}][reject_reason]" size="45" />
				</xen:option>
			</xen:radiounit>
			<xen:checkboxunit label="">
				<xen:option name="users[{$user.user_id}][notify]" selected="true">{xen:phrase notify_user_if_action_was_taken}</xen:option>
			</xen:checkboxunit>
		</fieldset>
	</xen:foreach>
	
	<xen:submitunit save="{xen:phrase process_users}" />
</xen:form>

That will show the value of that custom field on the moderation page, like so:

Screen shot 2013-01-27 at 4.25.41 PM.webp
 
It didn't work. I did a test registration and it tell me that I have 1 "user awaiting approval." I got the following. I'm assuming it's because I added the "field ID" exactly how you added it in blue above. Wasn't quite sure if that needed to be amended and if so, to what

Server Error

Undefined index: show_dob_date
  1. XenForo_Application::handlePhpError() in XenForo/Model/UserProfile.php at line 56
  2. XenForo_Model_UserProfile->getUserAge() in XenForo/Model/User.php at line 1189
  3. XenForo_Model_User->prepareUserCard() in XenForo/Model/User.php at line 1206
  4. XenForo_Model_User->prepareUserCards() in XenForo/ControllerAdmin/User.php at line 605
  5. XenForo_ControllerAdmin_User->actionModerated() in XenForo/FrontController.php at line 310
  6. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  7. XenForo_FrontController->run() in /home/corefree/public_html/admin.php at line 13

On another note, after I confirmed the website link (as the test user) I got to a place where it asks me to introduce myself and add my gender. But when I click on it I get a message that I have no permission to do so. This is probably because as the admin I had not approved this person yet. Not to confuse the people it would be nice to have a message somewhere on this page where they're also told that they are awaiting manual approval before they can post any changes. Where do I do that?
 
by the way, Jake, the approval process is asking them to explain in a few sentences why they are right for the forum. Is the place behind their email address the right place for all this information to show up? Any way we can make it can show under the 'user' field but before the 'action' field?
 
Okay, I tried adding the following to the user_moderated template:

I changed this:

({$user.customFields.fieldid})

to this:

({$user.customFields.who_referred_you.more_about_you})
 
It didn't work. I did a test registration and it tell me that I have 1 "user awaiting approval." I got the following. I'm assuming it's because I added the "field ID" exactly how you added it in blue above. Wasn't quite sure if that needed to be amended and if so, to what

Server Error

Undefined index: show_dob_date
  1. XenForo_Application::handlePhpError() in XenForo/Model/UserProfile.php at line 56
  2. XenForo_Model_UserProfile->getUserAge() in XenForo/Model/User.php at line 1189
  3. XenForo_Model_User->prepareUserCard() in XenForo/Model/User.php at line 1206
  4. XenForo_Model_User->prepareUserCards() in XenForo/ControllerAdmin/User.php at line 605
  5. XenForo_ControllerAdmin_User->actionModerated() in XenForo/FrontController.php at line 310
  6. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  7. XenForo_FrontController->run() in /home/corefree/public_html/admin.php at line 13

On another note, after I confirmed the website link (as the test user) I got to a place where it asks me to introduce myself and add my gender. But when I click on it I get a message that I have no permission to do so. This is probably because as the admin I had not approved this person yet. Not to confuse the people it would be nice to have a message somewhere on this page where they're also told that they are awaiting manual approval before they can post any changes. Where do I do that?

Looks like you didn't do the file edit correctly. Review my instructions again.
 
by the way, Jake, the approval process is asking them to explain in a few sentences why they are right for the forum. Is the place behind their email address the right place for all this information to show up? Any way we can make it can show under the 'user' field but before the 'action' field?

Yes you can move it to anywhere in that template.
 
It's still not working, still getting this:

Server Error

Undefined index: show_dob_date
  1. XenForo_Application::handlePhpError() in XenForo/Model/UserProfile.php at line 56
  2. XenForo_Model_UserProfile->getUserAge() in XenForo/Model/User.php at line 1189
  3. XenForo_Model_User->prepareUserCard() in XenForo/Model/User.php at line 1206
  4. XenForo_Model_User->prepareUserCards() in XenForo/ControllerAdmin/User.php at line 605
  5. XenForo_ControllerAdmin_User->actionModerated() in XenForo/FrontController.php at line 310
  6. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  7. XenForo_FrontController->run() in /home/corefree/public_html/admin.php at line 13
 
I am also looking for something like this.

I would like to add several "Custom Profile Fields" and also the Avatar-image-uploader onto the Register-Form.
And then approve members manually.

However, it should be possible to see the field-input in the ACP. Wondering why this data is not showing in ACP as "Blueprint4Love" is reporting it... or if this is just a feature which has not been implemented yet ?

Is this an idea for an Add-on ?
 
Jake, I really need help with this. I have user awaiting approval and I can't approve them because I get this silly error message. I've reviewed the code and can't figure out where I went wrong. Does it have to do with the code (below) or could it be because of the php form change?

({$user.email})<xen:title>{xen:phrase users_awaiting_approval}</xen:title>

<xen:form action="{xen:adminlink 'users/moderated/update'}">
<xen:foreach loop="$users" value="$user">
<fieldset>
<xen:controlunit label="{xen:phrase user}:"><a href="{xen:adminlink users/edit, $user}" target="_blank">{$user.username}</a> ({$user.email})({$user.customFields.who_referred_you})
({$user.customFields.more_about_you})</xen:controlunit>
<xen:radiounit label="{xen:phrase action}:" name="users[{$user.user_id}][action]">
<xen:option value="none">{xen:phrase do_nothing}</xen:option>
<xen:option value="approve">{xen:phrase approve}</xen:option>
<xen:option value="reject" selected="true">
<xen:label>{xen:phrase reject_and_delete_with_rejection_reason}:</xen:label>
<xen:textbox placeholder="{xen:phrase optional}" name="users[{$user.user_id}][reject_reason]" size="45" />
</xen:option>
</xen:radiounit>
<xen:checkboxunit label="">
<xen:option name="users[{$user.user_id}][notify]">{xen:phrase notify_user_if_action_was_taken}</xen:option>
</xen:checkboxunit>
</fieldset>
</xen:foreach>

<xen:submitunit save="{xen:phrase process_users}" />
</xen:form>
 
Back
Top Bottom