REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Drop-Down List Report vs Textbox Report
#1
If you're running myBB with it's default templates for reporting then a report box should look something like this.

[Image: 0ArwM.png]

When it could look more like this -

[Image: hXXPP.png]

personally I believe this to be superior to a textbox method for more then one reason. For once it could eliminate the possibility of a user spamming reports which would be a waste of his time, and very uncommon, but it's gone Cool. I also believe it makes the sight more professional, and the reports are easier to manage, this is simply a personal belief. But why not take a look for yourself, just read this tutorial and you will have this on your site in no time Wink.



We're going to start out by navigating to your admin panel, logging in and doing the following.

Admin CP > Templates & Style > Templates > Expanding Your Current Template > Report Templates > Expand > Report > Full Edit

Do a search for
Code:
<input type="text" class="textbox" name="reason" size="40" maxlength="250" />
and replace it with the following
PHP Code:
<SELECT NAME="reason">
<
OPTION VALUE="Leeching" >Leeching
<OPTION VALUE="Low Quality" >Low Quality
<OPTION VALUE="Spamming" >Spamming
<OPTION VALUE="Hacking" >Hacking
</SELECT
Also using this method you can display a different reason as the text displayed to the users, sounds confusing? Let me explain more. Using the
PHP Code:
<OPTION VALUE="Low Quality" >Low Quality 
method, we can edit what's in quotes to be posted to the report, and leave the [php>Low Quality[/php] as is and it would be displayed as such to the user. So we could do
PHP Code:
<OPTION VALUE="Leech (If valid then delete, do not trash)"  >Leeching 
so users see -
[Image: VtUVf.png]
but our staff sees -
[Image: iQqNb.png]
hmm a pretty simple way to give pretty simple instructions.

Now if you want some more tips, look up what all you can do with drop-down boxes! w3schools is a good resource I'm assuming or just stick to google! For example one thing I learned is you can set the box to automatically select whichever report you want, without switching the order. This could be used for example, to auto-select the most popular report reason, without having to change any orders. Take your code, for example -
PHP Code:
<OPTION VALUE="Spamming" >Spamming 
and between the text in quotes, and the ">", add the word, without quotes, "SELECTED". So your code would become
PHP Code:
<OPTION VALUE="Spamming" SELECTED >Spamming 
[Image: pFwp8.png]
Purrfect.

Let me know if you have any questions guys. Also I would like to say as a little in before, I'm well aware none of the code is php, but I think the colors for it are awesome Tongue, also I'm sure this has been posted but I'm trying to go in depth and show all aspects of this option. Enjoy enjoy and let me know if you want me to add some more tips like making a certain choice auto-selected!

I also posted this on mybb.com's forum but nobody replied which made me feel like writing the whole thing was useless lol, but unfortunately this site has seen MUCH better days so I may not even get any replies hereSad.

Reply
#2
Lol I was searching this 2 days ago and found it too. I first thought I needed a plugin but it was a simple template edit.

Thanks for this.

Do you know how to make the mod reason text bold?

For Example:

In the image below I want the word "Leech" bold and the other reason normal.

[Image: iQqNb.png]
Reply
#3
(Feb 22, 2012, 12:06 AM)kamz89 Wrote: Lol I was searching this 2 days ago and found it too. I first thought I needed a plugin but it was a simple template edit.

Thanks for this.

Do you know how to make the mod reason text bold?

For Example:

In the image below I want the word "Leech" bold and the other reason normal.

[Image: iQqNb.png]
Try making it post the word in bold using HTML and MyCode.

Reply
#4
Nice tutorial, thanks.
Reply
#5
@Kaleb : That was a wonderful tutorial.
I wish to modify it a bit : Suppose for one of the options named "Any other", I wish to add a textbox which should only appear when this option is selected from the dropdown box, where in the user can enter the additional custom information and submit.
Reply
#6
(Feb 23, 2012, 10:43 PM)Kaleb Wrote:
(Feb 22, 2012, 12:06 AM)kamz89 Wrote: Lol I was searching this 2 days ago and found it too. I first thought I needed a plugin but it was a simple template edit.

Thanks for this.

Do you know how to make the mod reason text bold?

For Example:

In the image below I want the word "Leech" bold and the other reason normal.

[Image: iQqNb.png]
Try making it post the word in bold using HTML and MyCode.

I tried HTML and also CSS but it didn't work. Can you provide me with the Mycode please?
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Smile [tut]Create a Drop Down Menu in Welcome block Header envira 2 3,835 Nov 09, 2013, 12:50 PM
Last Post: Eto'o

Forum Jump:


Users browsing this thread: 1 Guest(s)