Today we are going to discuss how to add a warning message to users who are reporting other users. This could be helpful in reducing the amount of spam reports or invalid reports that you receive in Xenforo. It’s quite simple to use and I will show you how to!
First we are going to log into our admin cp and go to Extras.css. It’s located at:
Appearance->templates->extras.css
This is what it looks like:
We are going to edit some CSS here so make sure that you put the following code at the end of your Extras.css:
form.xenForm > ul.reportNotices > li.warningNotice { background: linear-gradient(rgb(240, 80, 80), rgb(224, 48, 48)) repeat scroll 0% 0% transparent; border: 1px solid rgb(51, 51, 51); color: #eee; }
It looks like this once you put it in:
Make sure you click save and we will move on to the next step of this tutorial.
Now we are going to create a new template named: report_abuse_warning
So in the top right corner of the template section you will see Create New Template like so:
Once you click that page you will see this page:
in the Template name we are going to put report_abuse_warning in the bottom part we will put the following code:
<ul class="messageNotices reportNotices"><li class="warningNotice"><span class="icon Tooltip" data-tipclass="iconTip flipped"></span>Please only report rule-breaking posts!</li></ul>
Once you do that it will look like this:
Make sure that you save it and we can move on.
Now we have to include it into our existing template that we use for xenforo. You need to do this for all existing templates that you use.
Navigate to: Appearance and on the right side of the page you will see Styles then Search like so:
So we are going to search for: report_reason. It will bring up this page:
Select the one that you want to edit (you can edit them all if you want) and you will see this page ( selected profile_post_report):
Now directly under the following code <form action=”{xen:link ‘post/report’, $post} method=post class=”xenForm formOverlay AutoValidator”>
You are going to put the following code:
<xen:include template="report_abuse_warning" />
It should look like the following image:
make sure that you click save and when you go and test it you should see this:
You have done it! You can make the same edit to all of the other report styles and you will see the same thing!
You have done it!
If you have any questions please feel free to ask away!
Looking for quality XenForo hosting? Check out Arvixe Web Solutions