forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: Schryvers on November 14, 2012, 07:19:41 am

Title: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 07:19:41 am
 :-\ 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:
Code: [Select]
if ($CONFIG['make_intermediate'] && cpg_picture_dimension_exceeds_intermediate_limit($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'])) {
link Schryvers.nl


Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 07:23:19 am
its on line 307 now... that code is above.
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Jeff Bailey on November 14, 2012, 07:27:19 am
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
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 07:29:27 am
It doesn't exist in it

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

Code: [Select]
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?
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 07:31:11 am
Problem fixed by the code above adding to include/functions_inc.php
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Jeff Bailey on November 14, 2012, 07:31:22 am
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.
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 07:36:19 am
Thats strange...

When i version check then it says over 300 files are corrupt..
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Jeff Bailey on November 14, 2012, 07:38:24 am
Try performing an Upgrade
http://documentation.coppermine-gallery.net/en/upgrading.htm#upgrade_any
https://sourceforge.net/projects/coppermine/files/

I'm off for the night.
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 14, 2012, 08:21:54 am
I run update.php and all files are updated.


Thankyou for your info.

SOLVED
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Jeff Bailey on November 14, 2012, 09:30:51 pm
Upgrading and update.php are not the same thing. Are you sure all your files are up to date and working now?
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 15, 2012, 01:55:38 am
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.
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Jeff Bailey on November 15, 2012, 02:22:27 am
If all the problems are from documentation files then you should be fine.
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Schryvers on November 15, 2012, 02:27:46 am
Nice thanks alot mate
Title: Re: (Andreas09) Fixed other problems, now Displayimage dont display anything?
Post by: Αndré on November 20, 2012, 10:54:57 am
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.