MyBB Community Forums

Full Version: Change Moderation's selects with input buttons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm running MyBB 1.6.8 and I would like to change how moderation is actually handled. I would like to separe options put all together in a select in forumdisplay_inlinemoderation template, splitting them in single inputs or "buttons". Basically it allows me to click only once on a button instead of selecting from a drop down and hit the "Go" button. Is this possible, and if so, how can I achieve this? I'm available to do some core editing if necessary.

Hope you understand my request, I'm italian and I can't speak english properly.
You can change the input type to radio buttons:
<input type="radio" name="action" value="multiclosethreads" />{$lang->close_threads}
This is not what I was searching for. I'm trying to make every option a single button to click once, with radio buttons I have to select the action and hit the "Go" button as well as I would do with the default select element.
You can skip the Go button hit by using a simple javascript. Assign an id to the form.
What do I have to do in particular?
Here is an example:
<form action="moderation.php" method="post" id="forumdisplay_inline_mods">
..........
..........
<input type="radio" name="action" value="multiclosethreads" onclick="$('forumdisplay_inline_mods').submit();" />{$lang->close_threads}

If you only need to skip the Go button hit, you can do that also with the default dropdown menu.
Thank you Mei Chan, this solved my issue with a nice workaround. Whereas I'm not able to create a button directly, I can style radio buttons with some javascript code and make them seem like real buttons.

Actually this can be achieved also by specifying type="button", wrapping the input in a div and styling it with CSS text-indent and position:absolute to make it looks like a button with custom text.