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: CPG 1.3.2 Bulk Image Rotate  (Read 27570 times)

0 Members and 1 Guest are viewing this topic.

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
CPG 1.3.2 Bulk Image Rotate
« on: August 27, 2004, 11:57:25 pm »

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:
Code: [Select]
require('include/init.inc.php');
ADD:
Code: [Select]
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:
Code: [Select]
if (count($HTTP_POST_VARS)) process_post_data();
Replace with:
Code: [Select]
if (count($HTTP_POST_VARS)) {
process_post_data();
header("location: " . $_SERVER['REQUEST_URI']);
}

FIND:
Code: [Select]
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:
Code: [Select]
//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:
Code: [Select]
$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:
Code: [Select]
array($lang_editpics_php['angle'], 'angle',5),

FIND:
Code: [Select]
                            case 4 :
                                    form_options();
                                    break;
ADD:
Code: [Select]
case 5 :
form_rotate($element[0],$element[1]);
break;

FIND:
Code: [Select]
function create_form(&$data)
ADD above:
Code: [Select]
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:
Code: [Select]
                $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:
Code: [Select]
$angle       = get_post_var('angle', $pid);

FIND:
Code: [Select]
                $update .= ", user2 = '".addslashes($user2)."'";
                $update .= ", user3 = '".addslashes($user3)."'";
                $update .= ", user4 = '".addslashes($user4)."'";
ADD:
Code: [Select]
//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:
Code: [Select]
                        <a href="$thumb_link" target="_blank"><img src="$thumb_url" class="image" border="0"><br /></a>
Replace with:
Code: [Select]
                        <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:
Code: [Select]
if (defined('EDITPICS_PHP')) $lang_editpics_php = array(
ADD:
Code: [Select]
  '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:
Code: [Select]
ALTER TABLE `cpg132_usergroups` ADD `can_rotate_images` TINYINT( 4 ) DEFAULT '0' NOT NULL ;

groupmgr.php
FIND:
Code: [Select]
    $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:
Code: [Select]
    $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:
Code: [Select]
    $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:
Code: [Select]
    $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:
Code: [Select]
        <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:
Code: [Select]
<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):
Code: [Select]
colspan="15"
Replace with:
Code: [Select]
colspan="16"

lang/english.php
FIND:
Code: [Select]
if (defined('GROUPMGR_PHP')) $lang_groupmgr_php = array(
ADD:
Code: [Select]
  'can_rotate_images' => 'Can rotate images',  //Mark Stralka

include/init.inc.php
FIND:
Code: [Select]
$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:
Code: [Select]
"MAX(can_rotate_images) as can_rotate_images " .

FIND (2 times in file):
Code: [Select]
        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:
Code: [Select]
define('USER_CAN_ROTATE_IMAGES',(int)$USER_DATA['can_rotate_images']);

editpics.php:
FIND:
Code: [Select]
$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:
Code: [Select]
$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:
Code: [Select]
$angle       = (int) get_post_var('angle', $pid);
Replace with:
Code: [Select]
if (USER_CAN_ROTATE_IMAGES) {
$angle       = (int) get_post_var('angle', $pid);
}
« Last Edit: August 28, 2004, 04:12:53 pm by mstralka »
Logged
GO IRISH

Dannisk

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 18
Re: [MOD] CPG 1.3.2 Bulk Image Rotate
« Reply #1 on: August 28, 2004, 01:29:52 am »

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  :)
Logged
Dannisk

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: [MOD] CPG 1.3.2 Bulk Image Rotate
« Reply #2 on: August 28, 2004, 02:00:56 am »

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?
Logged
GO IRISH

Dannisk

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 18
Re: [MOD] CPG 1.3.2 Bulk Image Rotate
« Reply #3 on: August 28, 2004, 03:44:42 am »

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 :

Code: [Select]
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.
Logged
Dannisk

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: [MOD] CPG 1.3.2 Bulk Image Rotate
« Reply #4 on: August 28, 2004, 04:41:43 am »

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.
Logged
GO IRISH

Dannisk

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 18
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #5 on: August 28, 2004, 11:44:48 am »


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).
Logged
Dannisk

mstralka

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 178
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #6 on: August 28, 2004, 04:11:20 pm »

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:
Code: [Select]

//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:
Code: [Select]
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:
Code: [Select]
//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);
Logged
GO IRISH

SCaRaB

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #7 on: November 09, 2004, 01:48:34 pm »

great thing, i needed this! :)

only sadly enough i got this:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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
« Last Edit: November 09, 2004, 01:55:53 pm by SCaRaB »
Logged

olly69

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #8 on: July 13, 2006, 01:20:57 am »

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.
Logged

Nibbler

  • Guest
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #9 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #10 on: July 13, 2006, 07:24:48 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.
Logged

olly69

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: CPG 1.3.2 Bulk Image Rotate
« Reply #11 on: July 18, 2006, 01:56:47 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
.
.
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.