[MOD] Approve all/Postpone all/Delete all radio buttons on upload approval page [MOD] Approve all/Postpone all/Delete all radio buttons on upload approval page
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[MOD] Approve all/Postpone all/Delete all radio buttons on upload approval page

Started by Ludo, July 11, 2009, 12:18:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ludo

This mod replaces standard (and useless) "Select/unselect all" checkboxes on top of upload approval page with 3 radio buttons you can check to approve, postpone or delete all files on the page in two clicks, without having to check the buttons under each file.

Files to edit: 2
editpics.php
lang/your_lang.php


OPEN
editpics.php

FIND (line 529)
for (i = 0; i < f.length; i++) {

AFTER, ADD
EOT;
if (UPLOAD_APPROVAL_MODE!=1) {
echo <<<EOT



FIND (line 531)
if (d.checked) {

AFTER, ADD
EOT;
} else {
echo <<<EOT
   if (f[i].type == "radio" && f[i].id.indexOf(box) >= 0) {
      if (f.checkAll[d].checked) {
EOT;
}
echo <<<EOT



FIND (line 580)
                           <b>{$lang_editpics_php['select_unselect']}:</b>
                       </td>


AFTER, ADD
EOT;
if (UPLOAD_APPROVAL_MODE!=1) {
echo <<<EOT



FIND (line 606)
                   </tr>
               </table>
           </td>
       </tr>
EOT;


BEFORE, ADD
EOT;
} else {
echo <<<EOT
                       <td width="26%" align="center">
                           <span class="admin_menu">
                               <input type="radio" name="checkAll" onclick="selectAll(0,'yes');" class="radio" id="approveAll" />
                               <label for="approveAll" class="clickable_option">{$lang_editpics_php['approve_all']}</label>
                           </span>
                       </td>
                       <td width="28%" align="center">
                           <span class="admin_menu">
                               <input type="radio" name="checkAll" onclick="selectAll(1,'no');" class="radio" id="postponeAll" checked="checked" />
                               <label for="postponeAll" class="clickable_option">{$lang_editpics_php['postpone_all']}</label>
                           </span>
                       </td>
                       <td width="26%" align="center">
                           <span class="admin_menu">
                               <input type="radio" name="checkAll" onclick="selectAll(2,'del');" class="radio" id="deleteAll" />
                               <label for="deleteAll" class="clickable_option">{$lang_editpics_php['del_all']}</label>
                           </span>
                       </td>
EOT;
}
echo <<<EOT



OPEN
lang/your_lang.php

FIND
);

// ------------------------------------------------------------------------- //
// File faq.php


BEFORE, ADD
  'approve_all' => 'Approve ALL files', // 'Approve ALL files' in your language
 'postpone_all' => 'Postpone approval for ALL files', // 'Postpone approval for ALL files' in your language



SAVE AND CLOSE ALL FILES

gianso

Non so niente di PHP, ma mi sembra, per logica, che manchi (nel file lang/your_lang.php) anche il caso della cancellazione dei files: mi sembra che ci sia la scritta solo per approvare e posticipare i files. Mi sbaglio?

Grazie  ;)

Ludo

gianso, you're not allowed to write in Italian here: to ask questions about this mod in Italian write in the topic you recently opened in the Italian section ;)
Anyway, no: no more addition to lang file is needed.