coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: sonic393 on April 06, 2007, 01:32:38 PM

Title: Fatal error: Cannot instantiate non-existent class (SMF forum)
Post by: sonic393 on April 06, 2007, 01:32:38 PM
Hi, i'm trying to get the cpmfetch to work together with the SMF forum. My forum and the gallery are both in the root of my server.

When i do a standalone test of the plugin, it works like a charm, producing the 4 thumbs like it's supposed to do.

When i want to intgrate this part into the BoardIndex.template.php file from SMF, just below the actual forum posts, but above the info center i get the following error :

Fatal error: Cannot instantiate non-existent class: cpm in /var/www/html/forum/Sources/Load.php(1726) : eval()'d code on line 234

The code i'm inserting :

   include_once("../../../gallery/cpmfetch/cpmfetch.php");
   $objCpm = new cpm('/gallery');
   $objCpm->cpm_viewLastAddedMedia (1,4);
   $objCpm->cpm_close();


It'is pointing to the load.php file from the SMF source directory, but i haven't got a clue why...

The line of code on line 1726 of load.php if it helps :

$file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;

I hope someone can help me here.. thanx !
Title: Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
Post by: Nibbler on April 06, 2007, 05:20:20 PM
Means the path is wrong. It should be the path as seen from Load.php so you have one ../ too many I think.
Title: Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
Post by: sonic393 on April 06, 2007, 10:28:47 PM
same error, but i used a workaround with an auto resizing iframe that contains the code, that also get's the job done...
Title: Re: Fatal error: Cannot instantiate non-existent class (SMF forum)
Post by: vuud on April 08, 2007, 06:26:55 AM
Quote from: sonic393 on April 06, 2007, 10:28:47 PM
same error, but i used a workaround with an auto resizing iframe that contains the code, that also get's the job done...

You can try the path from the index.php's location.