Makes it quicker to get rid of spam messages.
Frankly, I'm just too lazy to click so many times and scroll around banning emails and deleting posts.. so having a single button that does both just makes sense!
Anyway, to "install"
Open /scp/tickets.php:
search for:
case 'process':
switch(strtolower($_POST)):
Add directly beneath:
case 'bandemail' :
if(!$thisstaff->canBanEmails() or !$thisstaff->canDeleteTickets()) {
$errors='Perm. Denied. You are not allowed to ban & delete emails';
} elseif(BanList:($ticket->getEmail())) {
$errors='Email already in banlist';
} elseif(Banlist:($ticket->getEmail(),$thisstaff->getName()) && $ticket->delete()) {
$msg='Email ('.$ticket->getEmail().') added to banlist & ' .
'Ticket #'.$ticket->getNumber().' deleted successfully';
$ost->logDebug('Ticket #'.$ticket->getNumber().' deleted',sprintf('Ticket #%s deleted by %s',$ticket->getNumber(), $thisstaff->getName()));
$ticket=null; //clear the object.
} else {
$errors='Unable to add the email to banlist or delete post.. try individually?';
}
break;
Then open /include/staff/ticket-view.inc.php
Find: <li><a id="ticket-banemail" href="#banemail"><i class="icon-ban-circle"></i> Ban Email (<?php echo $ticket->getEmail(); ?>)</a></li>
Add beneath:
<li><a id="ticket-bandemail" href="#bandemail"><i class="icon-ban-circle"></i> Ban & Delete (<?php echo $ticket->getEmail(); ?>)</a></li>
Find:
<p class="confirm-action" style="display;" id="banemail-confirm">
Are you sure want to <b>ban</b> <?php echo $ticket->getEmail(); ?>? <br><br>
New tickets from the email address will be auto-rejected.
</p>
and add beneath:
<p class="confirm-action" style="display;" id="bandemail-confirm">
Are you sure want to <b>ban and delete</b> <?php echo $ticket->getEmail(); ?>? <br><br>
New tickets from the email address will be auto-rejected, this post will be deleted!
<br /><br />Deleted tickets CANNOT be recovered, including any associated attachments.
</p>
I'm pretty sure that was the simplest MOD in the history of MOD's.. no database changes etc required.. just a few simple tweaks.. but it makes the Ban and Delete workflow so much quicker!