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