Advanced search  

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

Pages: [1]   Go Down

Author Topic: [MOD] Approve all/Postpone all/Delete all radio buttons on upload approval page  (Read 10128 times)

0 Members and 1 Guest are viewing this topic.

Ludo

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle

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)
Code: [Select]
for (i = 0; i < f.length; i++) {
AFTER, ADD
Code: [Select]
EOT;
if (UPLOAD_APPROVAL_MODE!=1) {
echo <<<EOT


FIND (line 531)
Code: [Select]
if (d.checked) {
AFTER, ADD
Code: [Select]
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)
Code: [Select]
                           <b>{$lang_editpics_php['select_unselect']}:</b>
                        </td>

AFTER, ADD
Code: [Select]
EOT;
if (UPLOAD_APPROVAL_MODE!=1) {
echo <<<EOT


FIND (line 606)
Code: [Select]
                   </tr>
                </table>
            </td>
        </tr>
EOT;

BEFORE, ADD
Code: [Select]
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
Code: [Select]
);

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

BEFORE, ADD
Code: [Select]
  '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
« Last Edit: July 11, 2009, 03:04:25 pm by Ludo »
Logged

gianso

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 43

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  ;)
Logged

Ludo

  • Contributor
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 706
    • E+GiElle

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.

Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.