View Full Version : Mark all images in admin area
syntaxmonster
10-25-2006, 11:45 AM
Hi @all,
itīs realy a pain to mark all images in the admin area if you have a lot of them.
So here are a few lines of code which can help mark all images simultaneous:
<script language="JavaScript" type="text/javascript">
<!--
function CheckAll() {
for (var i = 0; i < document.manageposts.elements.length; i++) {
if(document.manageposts.elements[i].type == 'checkbox'){
document.manageposts.elements[i].checked = !(document.manageposts.elements[i].checked);
}
}
}
//-->
</script><a href="javascript:void(0)" onClick="CheckAll();">Check all</a>
Just put thes few lines after ?> at the bottom of admin/images_edit.php
Chris
klimin_a_s
11-15-2006, 10:30 AM
Thanks! I have just update my Pixelpost from 1.4.2 to 1.5, and this modification is very useful!
taquinade
11-16-2006, 08:50 AM
Hello,
This javascript is in the admin folder : script.js
no need to copy the javascript code a the "admin/images_edit.php" bottom file.
In "admin/images_edit.php"
Search this:
<form method="post" name="manageposts" id="manageposts" accept-charset="UTF-8" action="">
And Paste this after:
<input class="cmnt-buttons" type="button" onclick="checkAll(document.getElementById('manageposts')); return false; " value="check all" name="chechallbox" />
<input class='cmnt-buttons' type='button' onclick="clearAll(document.getElementById('manageposts')); return false; " value='uncheck all' name='clearallbox' />
<input class="cmnt-buttons" type="button" onclick="invertselection(document.getElementById('managepos ts')); return false; " value="Invert selection" name="invcheckbox" />
++
Thierry
klimin_a_s
11-16-2006, 09:09 AM
Thank you, but I had to make some modification:
<input class=\"cmnt-buttons\" type=\"button\" onclick=\"checkAll(document.getElementById('manageposts')); return false; \" value=\"check all\" name=\"chechallbox\" />
<input class='cmnt-buttons' type='button' onclick=\"clearAll(document.getElementById('manageposts')); return false; \" value='uncheck all' name='clearallbox' />
<input class=\"cmnt-buttons\" type=\"button\" onclick=\"invertselection(document.getElementById('managepos ts')); return false; \" value=\"Invert selection\" name=\"invcheckbox\" />
Dennis
11-18-2006, 12:34 PM
I added this feature to the SVN version today and extended it with a delete all selected images and publish all selected images feature.
klimin_a_s
11-18-2006, 12:37 PM
Thanks! What is the 'SVN' version?
Dennis
11-18-2006, 01:02 PM
The SVN is the development version we are currently working on as a team. This code isn't public since we're still making changes and test each others code.
In time a snapshot of the SVN version will be frozen and released as version 1.6.
@Dennis: SVN code is public (but non of us gave a link to it on the forum) :P
BTW This slowly comming version (as slowly as all previous) should be huge step in PP development :)
Dennis
11-20-2006, 05:36 AM
@Piotr: wouldn't that make SVN not available to the general public? So in a way public access is restricted :P
Public SVN access is restricted but everyone can come by WWW and look into the code :P
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.