miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Toggle all checkboxes (to mass-move or mass-delete messages)

 
Author tom322
Active Member
#1 | Posted: 11 Apr 2014 00:11 
For heavy forum users (especially moderators/admins;), here is a little script you can add to your Mass Move link (or as a separate link) to create a checkbox and set/unset all checkboxes with one click. It can be useful not only for mass moving but also mass deleting of posts. All you have to do is to open bb_plugins.php, find: $massMoveLink and extend it to the code in bold:

$massMoveLink="{$l_sepr} <a href=\"JavaScript:massMove();\">{$l_moveMass}</a> <script>function toggle(source){checkboxes = document.getElementsByName('deleteAll[]');for(var i=0, n=checkboxes.length;i<n;i++) {checkboxes[i].checked = source.checked;}}</script><label><input type=\"checkbox\" onClick=\"toggle(this);\" />Toggle All</label>";

Author Jaime
Partaker
#2 | Posted: 12 Apr 2014 08:39 
Thanks Tom, it works! But in the first line of the original code at the end, you have to make sure the signs "; to delete. Not that anybody now the code just expanded ... it is then expected when calling the forum a blank page :)

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Toggle all checkboxes (to mass-move or mass-delete messages)
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑