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

XF 1.1 Set defaults in Warning System - Lock Convo etc

Cooper

Active member
#1
Hi

I'd like to check some boxes by default in the warning system, so when for example a user is warned without the moderator remembering to tick "lock conversation" it will be checked by default. Also "delete the content" checked by default with the Reason for deletion being the same as the warning type.

What is possible and how?

Many thanks
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> member_warn

Add the red code:

Code:
		<li>
			<dl class="ctrlUnit">
				<dt>{xen:phrase member_notification}:</dt>
				<dd>
					<ul>
						<li><label><input type="checkbox" id="startConversation" class="Disabler" checked="checked" /> {xen:phrase start_conversation_with_x, 'name={$user.username}'}:</label>
							<ul id="startConversation_Disabler">
								<li><input type="text" name="conversation_title" value="" class="textCtrl" id="ctrl_conversation_title" placeholder="{xen:phrase conversation_title}" /></li>
								<li><label for="ctrl_conversation_message">{xen:phrase message}:</label>
									<textarea name="conversation_message" class="textCtrl Elastic" id="ctrl_conversation_message" rows="2"></textarea>
									<p class="explain">{xen:phrase this_will_be_visible_only_to_you_and_this_member}</p></li>
								<li><label><input type="checkbox" name="open_invite" value="1" /> {xen:phrase allow_x_to_invite_others_to_this_conversation, 'user={$user.username}'}</label></li>
								<li><label><input type="checkbox" name="conversation_locked" value="1" checked="checked" /> {xen:phrase lock_conversation_no_responses_will_be_allowed}</label></li>
							</ul>
						</li>
					</ul>
				</dd>
			</dl>
		</li>
And move the red piece as indicated:

Code:
		<xen:if hascontent="true">
		<li>
			<dl class="ctrlUnit">
				<dt>{xen:phrase content_action}:</dt>
				<dd>
					<ul>
						<li><label><input type="radio" name="content_action" value="" checked="checked" /> {xen:phrase do_nothing}</label></li>
						<xen:contentcheck>
						<xen:if is="{$canDeleteContent}">
						<li><label><input type="radio" name="content_action" value="delete_content" id="deleteContent" class="Disabler" MOVE RED CODE HERE /> {xen:phrase delete_the_content}</label>
							<ul id="deleteContent_Disabler">
								<li><input type="text" name="delete_reason" placeholder="{xen:phrase reason_for_deletion}" class="textCtrl" />
									<p class="explain">{xen:phrase item_will_remain_viewable_by_moderators_and_may_be_restored_at_later}</p></li>
							</ul>
						</li>
						</xen:if>
						<xen:if is="{$canWarnPublicly}">
						<li><label><input type="radio" name="content_action" value="public_warning" id="publicWarning" class="Disabler" /> {xen:phrase post_public_warning}:</label>
							<ul id="publicWarning_Disabler">
								<li><input type="text" name="public_warning" class="textCtrl" id="ctrl_public_warning" placeholder="{xen:phrase public_warning_text}" />
									<p class="explain">{xen:phrase this_will_be_visible_to_anyone_who_can_see_content_for_warning}</p></li>
							</ul>
						</li>
						</xen:if>
						</xen:contentcheck>
					</ul>
				</dd>
			</dl>
		</li>
		</xen:if>
But I don't have a simple way to automatically fill in the deletion reason.