CPG 1.3.2 Bulk Image Rotate CPG 1.3.2 Bulk Image Rotate
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CPG 1.3.2 Bulk Image Rotate

Started by mstralka, August 27, 2004, 11:57:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mstralka

This mod will allow users to rotate some/all of the images in an album at once, without editing each picture.
The site admin can decide which user groups will be allowed to rotate the images in an album (See disclaimer below)
See screenshot below

DISCLAIMER: Rotating multiple images at once may stress the server.  Your web host company may warn you not to do this.

Edited 8/28.  If you already applied this mod, see my additions below, or reapply the whole thing here.
editPics.php
FIND:

require('include/init.inc.php');

ADD:

require('include/picmgmt.inc.php');

//ADDED 8/28
if($CONFIG['read_exif_data'] ){
        include("include/exif_php.inc.php");
}
if($CONFIG['read_iptc_data'] ){
        include("include/iptc.inc.php");
}

define('IMG_DIR', $CONFIG['fullpath'].'edit/');



FIND:

if (count($HTTP_POST_VARS)) process_post_data();

Replace with:

if (count($HTTP_POST_VARS)) {
process_post_data();
header("location: " . $_SERVER['REQUEST_URI']);
}


FIND:

if (isset($HTTP_GET_VARS['album'])) {
        $album_id = (int)$HTTP_GET_VARS['album'];
} elseif (isset($HTTP_GET_VARS['album'])) {
        $album_id = (int)$HTTP_POST_VARS['album'];
} else {
        $album_id = -1;
}

ADD:

//Garbage collection run at an probability of 25% and delete all files older than one hour
if (rand(1,100) < 25){
$d = opendir(IMG_DIR);

        while ($file = readdir($d)){
                if (is_file(IMG_DIR.$file) && ((time() - filemtime(IMG_DIR.$file))/60) > 60 && $file !="index.html" ){
                        @unlink(IMG_DIR.$file);
                }

        }
}

//Include the proper class for image Object
if ($CONFIG['thumb_method']=="gd2"){
           require("include/imageObjectGD.class.php");
}elseif ($CONFIG['thumb_method']=="im"){
        require("include/imageObjectIM.class.php");
}else{
        die ("Editor class for your resize method not implemented");
}


FIND:

$data = array(
        array($lang_editpics_php['pic_info'], '', 3),
        array($lang_editpics_php['album'], 'aid', 1),
        array($lang_editpics_php['title'], 'title', 0, 255),

Add:

array($lang_editpics_php['angle'], 'angle',5),


FIND:

                            case 4 :
                                    form_options();
                                    break;

ADD:

case 5 :
form_rotate($element[0],$element[1]);
break;


FIND:

function create_form(&$data)

ADD above:

function form_rotate($text, $name) {
global $CURRENT_PIC;

    $name .= $CURRENT_PIC['pid'];

echo <<<EOT
<tr>
<td class="tableb" valign="top" style="white-space: nowrap;">
$text
</td>
<td class="tableb" valign="top">
  <select name="$name" class="listbox">
  <option value="0" selected>$text
  <option value="90">CW 90&#176;
  <option value="180">180&#176;
  <option value="270">CCW 90&#176;
  </select>
</td>
</tr>
EOT;
}


FIND:

                $aid         = (int)get_post_var('aid', $pid);
                $title       = get_post_var('title', $pid);
                $caption     = get_post_var('caption', $pid);
                $keywords    = get_post_var('keywords', $pid);
                $user1       = get_post_var('user1', $pid);
                $user2       = get_post_var('user2', $pid);
                $user3       = get_post_var('user3', $pid);
                $user4       = get_post_var('user4', $pid);

ADD:

$angle       = get_post_var('angle', $pid);


FIND:

                $update .= ", user2 = '".addslashes($user2)."'";
                $update .= ", user3 = '".addslashes($user3)."'";
                $update .= ", user4 = '".addslashes($user4)."'";

ADD:

//Only rotate the image if the user specified
if ($angle != 0) {
if (is_array($pic)) {
if (!is_movie($pic['filename'])) {
if (!$img_dir) $img_dir = IMG_DIR;
//Copy the Image file to the editing directory
if (copy($CONFIG['fullpath'].$pic['filepath'].$pic['filename'],$img_dir.$pic['filename']))

//ADDED 8/28 put the exif and iptc data in the table if it's not already there
$path_to_pic = $CONFIG['fullpath'] . $pic['filepath'] . $pic['filename'];
if ($CONFIG['read_exif_data']) $exif = exif_parse_file($path_to_pic);
if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($path_to_pic);

//rotate the image
$newimage = $pic['filename'];
$imgObj = new imageObject($img_dir,$newimage);
$imgObj->quality = 100;
$imgObj = $imgObj->rotateImage($angle);

//save the new image
$width=$imgObj->width;
$height=$imgObj->height;
$normal = $CONFIG['fullpath'] . $pic['filepath'] . $CONFIG['normal_pfx'] . $pic['filename'];
$thumbnail = $CONFIG['fullpath'] . $pic['filepath'] . $CONFIG['thumb_pfx'] . $pic['filename'];
$filesize = @filesize($img_dir.$newimage);

//Full image replace
copy($img_dir.$newimage,$CONFIG['fullpath'].$pic['filepath'].$pic['filename']);

// Normal image resized and replace, use the CPG resize method instead of the object resizeImage
// as using the object resizeImage will make the final display of image to be a thumbnail in the editor

if (max($width, $height) > $CONFIG['picture_width'] && $CONFIG['make_intermediate']) {
resize_image($img_dir.$newimage, $normal, $CONFIG['picture_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
} else {
@unlink($normal);
}

//thumbnail resized and replace
resize_image($img_dir.$newimage, $thumbnail, $CONFIG['thumb_width'], $CONFIG['thumb_method'], $CONFIG['thumb_use']);
$total_filesize = $filesize + (file_exists($normal) ? filesize($normal) : 0) + filesize($thumbnail);

//Update the image size in the DB
db_query("UPDATE {$CONFIG['TABLE_PICTURES']}
SET pheight = $height,
pwidth = $width,
filesize = $filesize,
total_filesize = $total_filesize
WHERE pid = '$pid'");

}
}
}


FIND:

                        <a href="$thumb_link" target="_blank"><img src="$thumb_url" class="image" border="0"><br /></a>

Replace with:

                        <a href="$thumb_link" target="_blank"><img src="$thumb_url" id="img_{$CURRENT_PIC['pid']}" class="image" border="0"><br /></a>



lang/english.php
FIND:

if (defined('EDITPICS_PHP')) $lang_editpics_php = array(

ADD:

  'angle' => 'Rotate', //Mark Stralka 8/27/04



To make this group-configurable (Turn it on or off for each group in groupmgr.php), do the following.

Database modification:

ALTER TABLE `cpg132_usergroups` ADD `can_rotate_images` TINYINT( 4 ) DEFAULT '0' NOT NULL ;


groupmgr.php
FIND:

    $field_list = array('can_rate_pictures', 'can_send_ecards', 'can_post_comments', 'can_upload_pictures', 'pub_upl_need_approval', 'can_create_albums', 'priv_upl_need_approval');

Replace with:

    $field_list = array('can_rate_pictures', 'can_send_ecards', 'can_post_comments', 'can_upload_pictures', 'pub_upl_need_approval', 'can_create_albums', 'priv_upl_need_approval', 'can_rotate_images');


FIND:

    $field_list = array('group_name', 'group_quota', 'can_rate_pictures', 'can_send_ecards', 'can_post_comments', 'can_upload_pictures', 'pub_upl_need_approval', 'can_create_albums', 'priv_upl_need_approval', 'upload_form_config', 'custom_user_upload', 'num_file_upload', 'num_URI_upload');

Replace with:

    $field_list = array('group_name', 'group_quota', 'can_rate_pictures', 'can_send_ecards', 'can_post_comments', 'can_upload_pictures', 'pub_upl_need_approval', 'can_create_albums', 'priv_upl_need_approval', 'can_rotate_images', 'upload_form_config', 'custom_user_upload', 'num_file_upload', 'num_URI_upload');


FIND:

        <tr>
                <td class="tableh1" colspan="2"><b><span class="statlink">{$lang_groupmgr_php['group_name']}</span></b></td>
                <td class="tableh1"><b><span class="statlink">{$lang_groupmgr_php['disk_quota']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_rate']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_send_ecards']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_post_com']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_upload']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_1']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_have_gallery']}</span></b></td>
                <td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['approval_2']}</span></b></td>

Add:

<td class="tableh1" align="center"><b><span class="statlink">{$lang_groupmgr_php['can_rotate_images']}</span></b></td>


FIND all instances (your number may vary):

colspan="15"

Replace with:

colspan="16"


lang/english.php
FIND:

if (defined('GROUPMGR_PHP')) $lang_groupmgr_php = array(

ADD:

  'can_rotate_images' => 'Can rotate images',  //Mark Stralka


include/init.inc.php
FIND:

$result = db_query("SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, " .
                        "MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, " .
                        "MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, " .
                        "MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, " .
                        "MAX(num_URI_upload) as num_URI_upload, " .
                        "MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, " .
                        "MAX(can_create_albums) as can_create_albums, " .
                        "MAX(has_admin_access) as has_admin_access, " .
                        "MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval, ".

ADD:

"MAX(can_rotate_images) as can_rotate_images " .


FIND (2 times in file):

        define('CUSTOMIZE_UPLOAD_FORM', (int)$USER_DATA['custom_user_upload']);
        define('NUM_FILE_BOXES', (int)$USER_DATA['num_file_upload']);
        define('NUM_URI_BOXES', (int)$USER_DATA['num_URI_upload']);

ADD:

define('USER_CAN_ROTATE_IMAGES',(int)$USER_DATA['can_rotate_images']);


editpics.php:
FIND:

$data = array(
        array($lang_editpics_php['pic_info'], '', 3),
        array($lang_editpics_php['album'], 'aid', 1),
        array($lang_editpics_php['title'], 'title', 0, 255),
array($lang_editpics_php['angle'], 'angle',5),
        array($captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']),
        array($lang_editpics_php['keywords'], 'keywords', 0, 255),
        array($CONFIG['user_field1_name'], 'user1', 0, 255),
        array($CONFIG['user_field2_name'], 'user2', 0, 255),
        array($CONFIG['user_field3_name'], 'user3', 0, 255),
        array($CONFIG['user_field4_name'], 'user4', 0, 255),
        array('', '', 4)
);

Replace with:

$data = array(
        array($lang_editpics_php['pic_info'], '', 3),
        array($lang_editpics_php['album'], 'aid', 1),
        array($lang_editpics_php['title'], 'title', 0, 255)
);
if (USER_CAN_ROTATE_IMAGES) {
$data[] = array($lang_editpics_php['angle'], 'angle',5);
}
$data[] = array($captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']);
$data[] = array($lang_editpics_php['keywords'], 'keywords', 0, 255);
$data[] = array($CONFIG['user_field1_name'], 'user1', 0, 255);
$data[] = array($CONFIG['user_field2_name'], 'user2', 0, 255);
$data[] = array($CONFIG['user_field3_name'], 'user3', 0, 255);
$data[] = array($CONFIG['user_field4_name'], 'user4', 0, 255);
$data[] = array('', '', 4);


FIND:

$angle       = (int) get_post_var('angle', $pid);

Replace with:

if (USER_CAN_ROTATE_IMAGES) {
$angle       = (int) get_post_var('angle', $pid);
}
GO IRISH

Dannisk

Hi mstralka,

Looks like a nice MOD and a great feature for cpg1.4.

I just wanted to let you know that if people want to have the EXIF data they won't be able to have it as the exif data is generated only once the picture is viewed. One solution would be to generate the EXIF data before doing the actual rotation.

My 2 canadian cents  :)
Dannisk

mstralka

Thanks Dannisk,

I know you've been working on the EXIF stuff, do you know how (or if it's possible) to maintain EXIF if the picture is manipulated with ImageMagick?
GO IRISH

Dannisk

mstralka,

For now it's not possible to keep the exif data when manipulating the image but I'm currently checking the possibilities. In the mean while, what I was suggesting was to generate the exif data to the database before manipulating the image. The way it works now is that you upload the image and the exif data is store in the database only when you display the picture in the gallery (I think it was implemented like that for server overload purposes). But with your MOD people will probably rotate the picture before viewing them, so to make sure the exif data is store in the database you should call this function :


if ($CONFIG['read_exif_data']) $exif = exif_parse_file($image);


This will check if the data is store in the database or else it will store it. This is a bit of hack 'cause it should be called at the same time as the upload and not after. Note that if the MOD Exif sorting date is installed you don't need this hack ;D.
Dannisk

mstralka

Thanks,

However, since they have already uploaded the photos to the site by the time they rotate the image (and EXIF data is entered in the DB on upload), shouldn't the EXIF data already be in the database?  I don't know if we really need to do it again.  I just tested it by rotating an image that already had EXIF data, and it didn't disappear.  Let me know if you get different results.
GO IRISH

Dannisk


Try uploading a new file without viewing it and then rotate it with your MOD. The exif shouldn't be in the database 'cause it's only stored once you view the image. If the image has already been viewed then you can rotate it without losing the exif data 'cause it already in the database (but it not stored in the image anymore).
Dannisk

mstralka

I understand now, thanks Dannisk.  I've updated the MOD above by adding the folllowing lines (If you've already applied the mod, just do these lines.  If you are applying it for the first time, see above post for the full mod, which now include these lines):

near the top of editpics.php:


//ADDED 8/28
if($CONFIG['read_exif_data'] ){
        include("include/exif_php.inc.php");
}
if($CONFIG['read_iptc_data'] ){
        include("include/iptc.inc.php");
}



FIND:

if ($angle != 0) {
if (is_array($pic)) {
if (!is_movie($pic['filename'])) {
if (!$img_dir) $img_dir = IMG_DIR;
//Copy the Image file to the editing directory
if (copy($CONFIG['fullpath'].$pic['filepath'].$pic['filename'],$img_dir.$pic['filename']))

Add this below that:

//ADDED 8/28 put the exif data in the table if it's not already there
$path_to_pic = $CONFIG['fullpath'] . $pic['filepath'] . $pic['filename'];
if ($CONFIG['read_exif_data']) $exif = exif_parse_file($image);
if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($path_to_pic);
GO IRISH

SCaRaB

#7
great thing, i needed this! :)

only sadly enough i got this:

While executing query "UPDATE pictures
SET pheight = 1184,
pwidth = 888,
filesize = ,
total_filesize = 102299
WHERE pid = '349'" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '
total_filesize = 102299
WHERE pid = '349'' at line 4

and the debug:

USER:
------------------
Array
(
    [ID] => 4948827841bd1ef22c4be15d685e3274
    [am] => 1
    [theme] => hardwired
    [liv] => Array
        (
            [0] => 483
            [1] => 485
            [2] => 10
            [3] => 11
            [4] => 9
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_group] => 1
    [user_active] => YES
    [user_name] => SCaRaB
    [user_password] => ********
    [user_lastvisit] => 2004-11-08 16:15:51
    [user_regdate] => 2004-11-08 15:57:13
    [user_group_list] =>
    [user_email] =>
    [user_website] =>
    [user_location] =>
    [user_interests] =>
    [user_occupation] =>
    [user_actkey] =>
    [user_favpics] =>
    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [groups] => Array
        (
            [1] => 1
        )

)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content FROM filetypes;
    [1] => SELECT * FROM users WHERE user_id='1'AND user_active = 'YES' AND user_password != '' AND BINARY MD5(user_password) = 'a1256438cfa466be7c3af49f9c66f665'
    [2] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM usergroups WHERE group_id in (1)
    [3] => SELECT group_name FROM  usergroups WHERE group_id= 1
    [4] => DELETE FROM banned WHERE expiry < 1100004301
    [5] => SELECT * FROM banned WHERE ip_addr='192.168.1.1' OR ip_addr='192.168.1.1' OR user_id=1
    [6] => SELECT title, category FROM albums WHERE aid = '9'
    [7] => SELECT DISTINCT aid, title, IF(category = 0, CONCAT('> ', title), CONCAT(name,' < ',title)) AS cat_title FROM albums, categories WHERE category < '10000' AND (category = 0 OR category = cid) ORDER BY cat_title
    [8] => SELECT aid, title FROM albums WHERE category='10001' ORDER BY title
    [9] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='327'
    [10] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='327' LIMIT 1
    [11] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='328'
    [12] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='328' LIMIT 1
    [13] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='329'
    [14] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='329' LIMIT 1
    [15] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='330'
    [16] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='330' LIMIT 1
    [17] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='331'
    [18] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='331' LIMIT 1
    [19] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='332'
    [20] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='332' LIMIT 1
    [21] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='333'
    [22] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='333' LIMIT 1
    [23] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='334'
    [24] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='334' LIMIT 1
    [25] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='335'
    [26] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='335' LIMIT 1
    [27] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='336'
    [28] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='336' LIMIT 1
    [29] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='337'
    [30] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='337' LIMIT 1
    [31] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='338'
    [32] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='338' LIMIT 1
    [33] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='339'
    [34] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='339' LIMIT 1
    [35] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='340'
    [36] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='340' LIMIT 1
    [37] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='341'
    [38] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='341' LIMIT 1
    [39] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='342'
    [40] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='342' LIMIT 1
    [41] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='343'
    [42] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='343' LIMIT 1
    [43] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='344'
    [44] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='344' LIMIT 1
    [45] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='345'
    [46] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='345' LIMIT 1
    [47] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='346'
    [48] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='346' LIMIT 1
    [49] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='347'
    [50] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='347' LIMIT 1
    [51] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='348'
    [52] => UPDATE pictures SET aid = '9', title = '', caption = '', keywords = '', user1 = '', user2 = '', user3 = '', user4 = '' WHERE pid='348' LIMIT 1
    [53] => SELECT category, filepath, filename FROM pictures, albums WHERE pictures.aid = albums.aid AND pid='349'
    [54] => SELECT * FROM exif WHERE filename = "albums/wpw-20041108/Six Flags holland 023.jpg"
    [55] => UPDATE pictures
SET pheight = 1184,
pwidth = 888,
filesize = ,
total_filesize = 102299
WHERE pid = '349'
)

==========================
GET :
------------------
Array
(
    [album] => 9
    [start] => 0
    [count] => 25
)

==========================
POST :
------------------
Array
(
    [count] => 25
    [pid] => Array
        (
            [0] => 327
            [1] => 328
            [2] => 329
            [3] => 330
            [4] => 331
            [5] => 332
            [6] => 333
            [7] => 334
            [8] => 335
            [9] => 336
            [10] => 337
            [11] => 338
            [12] => 339
            [13] => 340
            [14] => 341
            [15] => 342
            [16] => 343
            [17] => 344
            [18] => 345
            [19] => 346
            [20] => 347
            [21] => 348
            [22] => 349
        )

    [aid327] => 9
    [title327] =>
    [angle327] => 0
    [caption327] =>
    [keywords327] =>
    [user1327] =>
    [user2327] =>
    [user3327] =>
    [user4327] =>
    [aid328] => 9
    [title328] =>
    [angle328] => 0
    [caption328] =>
    [keywords328] =>
    [user1328] =>
    [user2328] =>
    [user3328] =>
    [user4328] =>
    [aid329] => 9
    [title329] =>
    [angle329] => 0
    [caption329] =>
    [keywords329] =>
    [user1329] =>
    [user2329] =>
    [user3329] =>
    [user4329] =>
    [aid330] => 9
    [title330] =>
    [angle330] => 0
    [caption330] =>
    [keywords330] =>
    [user1330] =>
    [user2330] =>
    [user3330] =>
    [user4330] =>
    [aid331] => 9
    [title331] =>
    [angle331] => 0
    [caption331] =>
    [keywords331] =>
    [user1331] =>
    [user2331] =>
    [user3331] =>
    [user4331] =>
    [aid332] => 9
    [title332] =>
    [angle332] => 0
    [caption332] =>
    [keywords332] =>
    [user1332] =>
    [user2332] =>
    [user3332] =>
    [user4332] =>
    [aid333] => 9
    [title333] =>
    [angle333] => 0
    [caption333] =>
    [keywords333] =>
    [user1333] =>
    [user2333] =>
    [user3333] =>
    [user4333] =>
    [aid334] => 9
    [title334] =>
    [angle334] => 0
    [caption334] =>
    [keywords334] =>
    [user1334] =>
    [user2334] =>
    [user3334] =>
    [user4334] =>
    [aid335] => 9
    [title335] =>
    [angle335] => 0
    [caption335] =>
    [keywords335] =>
    [user1335] =>
    [user2335] =>
    [user3335] =>
    [user4335] =>
    [aid336] => 9
    [title336] =>
    [angle336] => 0
    [caption336] =>
    [keywords336] =>
    [user1336] =>
    [user2336] =>
    [user3336] =>
    [user4336] =>
    [aid337] => 9
    [title337] =>
    [angle337] => 0
    [caption337] =>
    [keywords337] =>
    [user1337] =>
    [user2337] =>
    [user3337] =>
    [user4337] =>
    [aid338] => 9
    [title338] =>
    [angle338] => 0
    [caption338] =>
    [keywords338] =>
    [user1338] =>
    [user2338] =>
    [user3338] =>
    [user4338] =>
    [aid339] => 9
    [title339] =>
    [angle339] => 0
    [caption339] =>
    [keywords339] =>
    [user1339] =>
    [user2339] =>
    [user3339] =>
    [user4339] =>
    [aid340] => 9
    [title340] =>
    [angle340] => 0
    [caption340] =>
    [keywords340] =>
    [user1340] =>
    [user2340] =>
    [user3340] =>
    [user4340] =>
    [aid341] => 9
    [title341] =>
    [angle341] => 0
    [caption341] =>
    [keywords341] =>
    [user1341] =>
    [user2341] =>
    [user3341] =>
    [user4341] =>
    [aid342] => 9
    [title342] =>
    [angle342] => 0
    [caption342] =>
    [keywords342] =>
    [user1342] =>
    [user2342] =>
    [user3342] =>
    [user4342] =>
    [aid343] => 9
    [title343] =>
    [angle343] => 0
    [caption343] =>
    [keywords343] =>
    [user1343] =>
    [user2343] =>
    [user3343] =>
    [user4343] =>
    [aid344] => 9
    [title344] =>
    [angle344] => 0
    [caption344] =>
    [keywords344] =>
    [user1344] =>
    [user2344] =>
    [user3344] =>
    [user4344] =>
    [aid345] => 9
    [title345] =>
    [angle345] => 0
    [caption345] =>
    [keywords345] =>
    [user1345] =>
    [user2345] =>
    [user3345] =>
    [user4345] =>
    [aid346] => 9
    [title346] =>
    [angle346] => 0
    [caption346] =>
    [keywords346] =>
    [user1346] =>
    [user2346] =>
    [user3346] =>
    [user4346] =>
    [aid347] => 9
    [title347] =>
    [angle347] => 0
    [caption347] =>
    [keywords347] =>
    [user1347] =>
    [user2347] =>
    [user3347] =>
    [user4347] =>
    [aid348] => 9
    [title348] =>
    [angle348] => 0
    [caption348] =>
    [keywords348] =>
    [user1348] =>
    [user2348] =>
    [user3348] =>
    [user4348] =>
    [aid349] => 9
    [title349] =>
    [angle349] => 90
    [caption349] =>
    [keywords349] =>
    [user1349] =>
    [user2349] =>
    [user3349] =>
    [user4349] =>
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.9 - OK
------------------
mySQL version: 4.0.22-log
------------------
Coppermine version: 1.3.2
==========================
Module: gd
------------------
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
==========================
Module: mysql
------------------
Active Persistent Links 1
Active Links 2
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/local/lib/php | .:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 12M | 12M
post_max_size | 8M | 8M
==========================
Page generated in 1.917 seconds - 56 queries in 0.024 seconds - Album set :


Also there are more stuff from the debug on the page:

File: /home/webserver/webalbum/html/include/functions.inc.php - Line: 105


Notice: Undefined variable: img_dir in /home/webserver/webalbum/html/editpics.php on line 169

Notice: Undefined variable: IPTC_data in /home/webserver/webalbum/html/include/iptc.inc.php on line 49

Warning: copy(albums/edit/Six Flags holland 023.jpg): failed to open stream: No such file or directory in /home/webserver/webalbum/html/editpics.php on line 192

Warning: getimagesize(albums/edit/Six Flags holland 023.jpg): failed to open stream: No such file or directory in /home/webserver/webalbum/html/include/picmgmt.inc.php on line 118

Warning: getimagesize(albums/edit/Six Flags holland 023.jpg): failed to open stream: No such file or directory in /home/webserver/webalbum/html/include/picmgmt.inc.php on line 118


offcourse i dont know what it allmeans..

gonna test it out with another theme....

nope wont work either

olly69

Hmm, although I realise this code is for 1.3.2, I thought I'd have a go at adapting for 1.4.8

By substituting vars I got as far as init.inc.php which has clearly radically changed. :-\

Has anyone updated this mod, or is there a plugin for bulk rotation ?  I already use the "auto rotate on exif orientation data" mod which is great, but I have a pile of images with no orientation data so bulk rotation would be very useful.  I am using a dedicated coppermine server so I am not worried about load.

Thanks

Olly.

Nibbler

That code has been moved to bridge/udb_base.inc.php. Once you have converted the mod for 1.4 it would be appreciated if you could share your updated version with the community.

Joachim Müller

Quote from: Nibbler on July 13, 2006, 01:30:06 AM
That code has been moved to bridge/udb_base.inc.php. Once you have converted the mod for 1.4 it would be appreciated if you could share your updated version with the community.
Start a new thread on the support board for that purpose that contains reference to this one.

olly69

Quote from: GauGau on July 13, 2006, 07:24:48 AM
Start a new thread on the support board for that purpose that contains reference to this one.

AS requested...

http://forum.coppermine-gallery.net/index.php?topic=33982.0

Thanks

Olly
.
.