Advanced search  

News:

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

Pages: 1 [2] 3 4 5 6 ... 10
 11 
 on: December 15, 2017, 03:58:32 pm 
Started by Ludger - Last post by Ludger
...forgot the link...

 12 
 on: December 15, 2017, 03:57:31 pm 
Started by Ludger - Last post by Ludger
The check for $main_version is probably not needed, if you use the database wrapper functions, e.g. cpg_db_num_rows instead of mysql_num_rows.
You are right. This saves me about 30 lines of code.

Quote
I haven't found any code to insert the EXIF timestamp for files that will be added after plugin installation.
My hook into CPGPluginAPI::action('add_file_data_success', $CURRENT_PIC_DATA) got lost somehow. Now it is in again.

Quote
It seems you insert all EXIF timestamps during plugin installation. This will probably fail on large galleries with a comparatively small timeout value. You should better do this in a loop and add just (let's say) 100 items a time, like we do in the admin tools.
The updates already take place in a loop as one query execution per loop. Here is the loop:

   while ($picture = single_picture($result2)) {
      $result = load_exif($picture);   
   };

And here is the function called:

function load_exif($picture) {
   global $CONFIG;
   $exifdata = exif_read_data($CONFIG['fullpath'].$picture['filepath'].$picture['filename']);
   if (isset($exifdata['DateTimeOriginal'])) {
         $datum = $exifdata['DateTimeOriginal'];
         $isexif = 1;
      } else {
         $datum = date('Y-m-d H:i:s:', filectime($CONFIG['fullpath'].$picture['filepath'].$picture['filename']));
         $isexif = 0;
      };
   $result = cpg_db_query("update {$CONFIG['TABLE_PICTURES']} set sbe_exif_date='{$datum}', sbe_source_is_exif='{$isexif}' where pid = {$picture['pid']}");
   return $result;
}

Just putting another big loop around my small one does not make sense for me, does it?

Quote
Maybe a separate button to update (missing) EXIF timestamps will to the trick.
I think, this is not needed, because EXIF is added after Upload. But still a button to re-EXIF (for example once you have exchanged some pictures) would be useful. I am just wondering about the right place for that button. I attached an updated version of the plugin...

 13 
 on: December 15, 2017, 03:13:36 pm 
Started by thenota2 - Last post by thenota2
i didnt have any money in my paypal to buy one, but i guess youre rite. i just started modifying this one, im obviously not good at making it look nice. ill try and figure the bold out and wait to get a theme. i sent 2 emails to coppermine specific theme makers but no reply

 14 
 on: December 15, 2017, 02:07:02 pm 
Started by thenota2 - Last post by ron4mac
Copy the $template_album_list section from include/themes.inc.php to your <theme>/theme.php file. Then make changes there as you desire.
http://documentation.coppermine-gallery.net/en/theme_theme_php.htm#theme_php_method

An aside:  You might want to reconsider using such an old theme as that ... have you viewed it on a mobile device?

 15 
 on: December 15, 2017, 12:16:17 pm 
Started by Ludger - Last post by Αndré
Some remarks. The check for $main_version is probably not needed, if you use the database wrapper functions, e.g. cpg_db_num_rows instead of mysql_num_rows.

I haven't found any code to insert the EXIF timestamp for files that will be added after plugin installation.

It seems you insert all EXIF timestamps during plugin installation. This will probably fail on large galleries with a comparatively small timeout value. You should better do this in a loop and add just (let's say) 100 items a time, like we do in the admin tools. Maybe a separate button to update (missing) EXIF timestamps will to the trick.

The plugin hooks themselves looks valid.

 16 
 on: December 15, 2017, 12:08:56 pm 
Started by diedhert - Last post by Αndré
I splitted your reply from the other thread, as it's not related to your plugin but this discussion. Maybe I should have said "Any further discussion regarding the plugin and its hooks can be found there".

What I had in mind was to overwrite the content of ctime with the EXIF timestamps, after the files have been added to the database.

 17 
 on: December 15, 2017, 09:32:26 am 
Started by diedhert - Last post by Ludger
It would be an abuse of the ctime field, of course ;) I'll have a look at your plugin and your proposed plugin hooks. Any further discussion can be found there.
I'm afraid this works exactly as designed:

In picmgmt.inc.php(183) the query is prepared for inserting the picture data:
$query = "INSERT INTO {$CONFIG['TABLE_PICTURES']} (aid, filepath, filename, filesize, total_filesize, pwidth, pheight, ctime, owner_id, title, caption, keywords, approved, user1, user2, user3, user4, pic_raw_ip, pic_hdr_ip, position, guest_token) VALUES ('{$CURRENT_PIC_DATA['aid']}', '" . addslashes($CURRENT_PIC_DATA['filepath']) . "', '" . addslashes($CURRENT_PIC_DATA['filename']) . "', '{$CURRENT_PIC_DATA['filesize']}', '{$CURRENT_PIC_DATA['total_filesize']}', '{$CURRENT_PIC_DATA['pwidth']}', '{$CURRENT_PIC_DATA['pheight']}', '" . time() . "', '{$CURRENT_PIC_DATA['owner_id']}', '{$CURRENT_PIC_DATA['title']}', '{$CURRENT_PIC_DATA['caption']}', '{$CURRENT_PIC_DATA['keywords']}', '{$CURRENT_PIC_DATA['approved']}', '{$CURRENT_PIC_DATA['user1']}', '{$CURRENT_PIC_DATA['user2']}', '{$CURRENT_PIC_DATA['user3']}', '{$CURRENT_PIC_DATA['user4']}', '{$CURRENT_PIC_DATA['pic_raw_ip']}', '{$CURRENT_PIC_DATA['pic_hdr_ip']}', '{$CURRENT_PIC_DATA['position']}', '{$CURRENT_PIC_DATA['guest_token']}')";

...and in fuinctions.inc.php the column is offered as one of the sort-by-options:$sort_array = array(
            'na' => "filename $ASC, pid $ASC",
            'nd' => "filename $DESC, pid $DESC",
            'ta' => "title $ASC, pid $ASC",
            'td' => "title $DESC, pid $DESC",
            'da' => "ctime $ASC, pid $ASC",
            'dd' => "ctime $DESC, pid $DESC",
            'pa' => "position $ASC, pid $ASC",
            'pd' => "position $DESC, pid $DESC",
        );

So, if there is no misuse in between (like mine;-), we can only sort by the date of upload to coppermine.

 18 
 on: December 15, 2017, 09:10:01 am 
Started by diedhert - Last post by Αndré
It would be an abuse of the ctime field, of course ;) I'll have a look at your plugin and your proposed plugin hooks. Any further discussion can be found there.

 19 
 on: December 15, 2017, 09:01:03 am 
Started by diedhert - Last post by Ludger
The first solution that comes to my mind for that question is to just update the "uploaded" timestamp with the Exif data, either during upload or as a cronjob.
Off course, I tried this, but it did not work as exspected. The 4 sort options are the table columns filename, title, ctime and position. Ctime is the time of upload, not of the file...

 20 
 on: December 15, 2017, 08:40:47 am 
Started by thenota2 - Last post by thenota2
could you show me how to bold just the description. all there is is <p> which bolds everything in a <p>. in case it would be needed, ive attached my theme

Pages: 1 [2] 3 4 5 6 ... 10

Page created in 0.031 seconds with 17 queries.