(Andreas09) Fixed other problems, now Displayimage dont display anything? (Andreas09) Fixed other problems, now Displayimage dont display anything?
 

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

Main Menu

(Andreas09) Fixed other problems, now Displayimage dont display anything?

Started by Schryvers, November 14, 2012, 07:19:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Schryvers

 :-\ this really really sucks.

I did something to fixx other problems, and mabye i did too much.

But DisplayImage doesnt work..

When im logged in as admin: Fatal error: Call to undefined function cpg_picture_dimension_exceeds_intermediate_limit() in /var/www/g47991/schryvers.nl/HTML/v3/themes/andreas09/theme.php on line 272

My theme.php line 307:
if ($CONFIG['make_intermediate'] && cpg_picture_dimension_exceeds_intermediate_limit($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'])) {

link Schryvers.nl



Schryvers


Jeff Bailey

Check if cpg_picture_dimension_exceeds_intermediate_limit exists in your include/functions.inc.php file.

You chould have post this in the other thread as it happened after the change.
Link for reference: http://forum.coppermine-gallery.net/index.php/topic,75649.0.html
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Schryvers

It doesn't exist in it

I saw andre post something on another topic about adding the following code in functionsinc

function cpg_picture_dimension_exceeds_intermediate_limit($pwidth, $pheight) {
    global $CONFIG;

    $resize_method = $CONFIG['picture_use'] == "thumb" ? ($CONFIG['thumb_use'] == "ex" ? "any" : $CONFIG['thumb_use']) : $CONFIG['picture_use'];
    if ($resize_method == 'ht' && $pheight > $CONFIG['picture_width']) {
        return true;
    } elseif ($resize_method == 'wd' && $pwidth > $CONFIG['picture_width']) {
        return true;
    } elseif ($resize_method == 'any' && max($pwidth, $pheight) > $CONFIG['picture_width']) {
        return true;
    } else {
        return false;
    }
}


This will help?

Schryvers

Problem fixed by the code above adding to include/functions_inc.php

Jeff Bailey

Yes, adding it will help but since it doesn't already exist you probably had a problem upgrading to 1.5.20 or some files got corrupt.
Run a version check and make sure your files are up to date.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Schryvers

Thats strange...

When i version check then it says over 300 files are corrupt..

Jeff Bailey

Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Schryvers

I run update.php and all files are updated.


Thankyou for your info.

SOLVED

Jeff Bailey

Upgrading and update.php are not the same thing. Are you sure all your files are up to date and working now?
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Schryvers

I quess... where i can find that?

When i run Check Versions, there are 328 potential problems, most of them are 326 /DOCS/ problems (.txt and .htm files from docs/)

And 2 files maybe incorrupt of changed (i changed them) Theme.inc.php and Template.html

What i need to do or to check? i really dont understand the update thing and everything. 1 month ago i download the latest coppermine en installed it, thats it! Now im changing sum things.

Jeff Bailey

If all the problems are from documentation files then you should be fine.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford


ΑndrĂ©

The function cpg_picture_dimension_exceeds_intermediate_limit has been added after the release of cpg1.5.20. As developers usually don't work with the latest release, but with the latest SVN snapshot you probably got "too new" code from Jeff which already uses that new function. It's fine to just add it to your include/functions.inc.php file, as it is included in cpg1.5.22 anyway.