Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Hacks and Modifications (http://www.pixelpost.org/forum/forumdisplay.php?f=16)
-   -   Mark all images in admin area (http://www.pixelpost.org/forum/showthread.php?t=5361)

syntaxmonster 10-25-2006 11:45 AM

Mark all images in admin area
 
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:

Code:

<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:
PHP Code:

<form method="post" name="manageposts" id="manageposts"  accept-charset="UTF-8" action=""

And Paste this after:
PHP Code:

<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('manageposts')); 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:

PHP Code:

<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('manageposts')); 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.

GeoS 11-19-2006 09:04 PM

@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

GeoS 11-20-2006 10:14 PM

Public SVN access is restricted but everyone can come by WWW and look into the code :P


All times are GMT. The time now is 08:39 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.