• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 forced to input Custom Profile for old/new members

Mike

XenForo developer
Staff member
#2
Required fields are only forced if they go to edit their profile (where those fields are shown).
 

Digital Doctor

Well-known member
#3
hi
how can i forced all my users to input the new custom profile ive just enabled?
thanks
Would it be possible to setup a Xenforo NOTICE ... for those with missing information ?
A percentage of your members with missing information would probably voluntarily add the information if they knew it was required.

Make the notice nag them for a while until they do it !
:)
Display offensive images in the notice until they fill in the data ! :)
 

swatme

Well-known member
#4
agree digittal doctor,

to provide targeted xenforo notice to specific users,
we need members to be forced to input the required field.
maybe after they login, they cannot post unless they input
something in that field...
 

Jake Bunce

XenForo moderator
Staff member
#5
Would it be possible to setup a Xenforo NOTICE ... for those with missing information ?
The notice system doesn't have criteria for that. But you can edit the templates:

Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

Add the red code:

Code:
			<xen:if is="{$sidebar}">
				<div class="mainContainer">
					<div class="mainContent"></xen:if>
						
						<xen:include template="ad_above_top_breadcrumb" />

						<xen:if is="!{$visitor.customFields.field_id}">
							<p class="importantMessage">
								YOU NEED TO FILL OUT THIS THING
							</p>
						</xen:if>

						<xen:hook name="page_container_breadcrumb_top">
						<div class="breadBoxTop">
							<xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
							<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
						</div>
						</xen:hook>
 

AndreaMarucci

Well-known member
#10
Can I do that?
Code:
<xen:if is="!{$visitor.customFields.field_id1}">
                            <p class="importantMessage">
                                YOU NEED TO FILL OUT THIS THING
                            </p>
                        </xen:if>
<xen:if is="!{$visitor.customFields.field_id2}">
<p class="importantMessage">
YOU NEED TO FILL OUT THIS THING
</p>
</xen:if>
<xen:if is="!{$visitor.customFields.field_id3}">
<p class="importantMessage">
YOU NEED TO FILL OUT THIS THING
</p>
</xen:if>
 

Jake Bunce

XenForo moderator
Staff member
#13
Surround all of them with this condition:

Code:
<xen:if is="{$visitor.user_id}">

</xen:if>
That will make them not show for guests.
 
#17
Can I do that?
Code:
<xen:if is="!{$visitor.customFields.field_id1}">
                            <p class="importantMessage">
                                YOU NEED TO FILL OUT THIS THING
                            </p>
                        </xen:if>
<xen:if is="!{$visitor.customFields.field_id2}">
<p class="importantMessage">
YOU NEED TO FILL OUT THIS THING
</p>
</xen:if>
<xen:if is="!{$visitor.customFields.field_id3}">
<p class="importantMessage">
YOU NEED TO FILL OUT THIS THING
</p>
</xen:if>
With this code you will get 3 box notifications, I use this to get only one notification, maybe this could be useful to other members
Code:
                       <xen:if is="{$visitor.user_id}">
                            <xen:if is="!{$visitor.customFields.regione} OR !{$visitor.customFields.provincia} OR !{$visitor.customFields.city}">
                            <p class="importantMessage">
                                we added some custom fields to profiles, once inserted  this notification will disapear.  Click <a href="{xen:link account/personal-details}"> here </a>to update your profile
                            </p>
                        </xen:if>
                        </xen:if>