Intermediate sizes lost scince install modpack and update Intermediate sizes lost scince install modpack and update
 

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

Intermediate sizes lost scince install modpack and update

Started by regenboogmama, January 26, 2008, 03:59:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

regenboogmama

I installed the modpack today to make square thumbs. I did update.php, and with the admin tool resized the thumbs to squared ones, but now, when I view an image on the intermediate page, it only shows the full size pic. I tried with a new uploaded pic, but no intermediate size pic is shown. Create intermediate is on. So now in my Wordpress weblog (I use a plugin obviously), the pics are as well full size instead intermediate.
This is the url of my gallery: http://www.vlijtigelis.nl/gallery/

Stramm

Theme issue... remove functions from your theme.php that haven't been modified (compared to themes/sample/theme.php) - here most probably theme_html_picture() ... other functions that are in your theme.php and are just an unmodified copy from the sample theme.php will overwrite other modpack functionality

regenboogmama

Indeed a theme thing, thanx!
When I use Classic theme, everything is normal. To retrieve my old customized theme, do I need to customize Classic theme again or is there another possibility?

Stramm

Quote from: Stramm on January 26, 2008, 04:43:02 PM
Theme issue... remove functions from your theme.php that haven't been modified (compared to themes/sample/theme.php) - here most probably theme_html_picture() ... other functions that are in your theme.php and are just an unmodified copy from the sample theme.php will overwrite other modpack functionality

regenboogmama

Yes you said so, but I am afraid I don't understand. The theme.php look like code soup for me and when I compare the one in my theme with the sample themes' theme.php, they look like to be the same, but there is so much code in it, it is hard to find any differences... And I am not sure whether you mean this really. My themes' theme.php is copied from the sample theme.php.

Stramm

zip it and attach it to your next post, then I can have a look

regenboogmama

Okay, this is the theme.php
The only thing I saw was different from the sample theme.php is the version, but when I changed both themes, so used the sampels' theme.php instead my themes' theme.php it still worked the same. Do you need that theme.php as well??

Stramm

your theme.php is just a copy of the sample theme.php with one exception (some stuff in the filmstrip template). This isn't recommended at all. As said you should remove everything except the modified parts.

replace the contents of your theme.php with the following:
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.12
  $Source$
  $Revision: 3657 $
  $Author: gaugau $
  $Date: 2007-07-02 15:49:13 +0200 (Mo, 02 Jul 2007) $
**********************************************/

// HTML template for filmstrip display
$template_film_strip = <<<EOT

        <tr>
         <td valign="top" style="background-image: url({TILE1});"><img src="{TILE1}" alt="" border="0" /></td>
        </tr>
        <tr>
        <td valign="bottom" class="thumbnails" align="center">
          <table width="100%" cellspacing="0" cellpadding="3" border="0">
              <tr>
                 <td width="50%"></td>
                 {THUMB_STRIP}
                 <td width="50%"></td>
              </tr>
          </table>
        </td>
        </tr>
        <tr>
         <td valign="top" style="background-image: url({TILE2});"><img src="{TILE2}" alt="" border="0" /></td>
        </tr>
<!-- BEGIN thumb_cell -->
                <td valign="top" align="center">
                                        <a href="{LINK_TGT}">{THUMB}</a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                </td>
<!-- END thumb_cell -->
<!-- BEGIN empty_cell -->
                <td valign="top" align="center" >&nbsp;</td>
<!-- END empty_cell -->

EOT;

?>

regenboogmama

Thanx, now it works. I understood I had to remove the unmodified parts, but I didn't know which parts that are and which not, I am a real newbe to these things, and english is not my mothertongue, obviously:-)
But I think you guys are great doing this stuff, building, helping etc!!

regenboogmama

here again... I just found out that everything in the gallery seems fine, but in my Wordpress blog, where I use the cpg plugin, the pics are full size still. intead of intermediate as they used to be. Do you know how that can be? thumbs are not square as in the gallery...

Stramm

Probably you need to change the plugin to reflect the new dimensions...
ONly guessing cause I do not use Wordpress  and I do not know that plugin you're talking about

regenboogmama

Here you can find the plugin I am talking about: http://blog.artworkz.net/?p=283
I posted the question in that blog as well, because I have no clue where, what and how to change the plugin unfortunatly, but didn't get an answer yet:-(
Is there a way to uninstall the modpack to see whether the plugin works normally (using the intermediate pics insteas of the full size original) than?

Stramm

I had a look at the code of that plugin and function _cpg_get_image_uri (in the file coppermine.php needs to be changed)

try it that way... but untested cause I neither use wordpress nor I know it or that plugin.

function _cpg_get_image_uri($image)
{
global $CPG_CONFIG;
global $cpg_uri;

// The weird comparison is because only picture_width is stored
    if($CPG_CONFIG['thumb_use']=='ht' && $image->pheight > $CPG_CONFIG['picture_width'] ){
      $usenormal = true;
    }elseif($CPG_CONFIG['thumb_use']=='wd' && $image->pwidth > $CPG_CONFIG['picture_width']){
      $usenormal = true;
    }elseif($CPG_CONFIG['thumb_use']=='any' && max($image->pwidth, $image->pheight) > $CPG_CONFIG['picture_width']){
      $usenormal = true;
//thumb cropping
    }elseif($CPG_CONFIG['thumb_use']=='ex' && max($image->pwidth, $image->pheight) > $CPG_CONFIG['picture_width']){
      $usenormal = true;
    }else{
     $usenormal = false;
    }

    if ($CPG_CONFIG['make_intermediate'] && $usenormal ) {
$uri = $cpg_uri.$image->filepath.'normal_'.$image->filename;
    } else {
$uri = $cpg_uri.$image->filepath.$image->filename;
    }

return cpg_urlencode($uri);
}

regenboogmama

You are awesome, it all seems to work now, thanx a lot!