forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Cove on May 13, 2008, 09:54:31 pm
-
Hi, everybody. I have the following trouble:
Code:
<?php
include "http://forum.hromov.net/photo/cpmfetch/cpmfetch.php";
$objCpm = new cpm("http://forum.hromov.net/photo/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>Error:
Fatal error: Cannot instantiate non-existent class: cpm in /usr/home/cove/domains/hromov.net/public_html/forum/cpmfetch.php on line 3
All pathes are right. I really don't understand, what is the reason of this trouble. When i run cpmfetch install.php i see the images, located in my gallery and when i click them, i go to the right page. Can anybody help me to solve this problem?
System:
CPG - v1.4.18;
Copperminefetch - 2.0.0;
CPG Integration - vBulletin 3.6.4;
Server - FreeBSD 6.2 and Apache/1.3.34;
PHP -4.3.11;
MySQL - 4.1.14.
-
Use a path not an URL.
-
Use a path not an URL.
Thanks's a lot, now all works perfect!
p.s. If it's to be fair, i don't understand why an URL doesn't work :'(
-
If you use an URL PHP will see the same thing you see if you go to the URL with your browser; a blank page. You need PHP to load the source code of the file instead so you have to use a path.
-
If you use an URL PHP will see the same thing you see if you go to the URL with your browser; a blank page. You need PHP to load the source code of the file instead so you have to use a path.
Ok, i understand, thanks.
But now i have another one trouble (all pathes are right at this time) with the code from Cpgfetch documentation, which makes a random images representation:
Code
<?php
include_once "photo/cpmfetch/cpmfetch.php";
$objCpm = new cpm("photo/cpmfetch/cpmfetch_config.php");
$options = array(?subtitle? => ?File name : {{pFilename}}?);
$objCpm->cpm_viewLastAddedMedia(1, 4, $options);
$objCpm->cpm_viewRandomMediaFrom(?cat=1?,1, 4, $options);
$objCpm->cpm_close();
?>
Error:
Parse error: parse error, unexpected '?', expecting ')' in /usr/home/cove/domains/hromov.net/public_html/forum/cpmfetch.php on line 18
-
Change all the question marks to quotes, ie.
<?php
include_once "photo/cpmfetch/cpmfetch.php";
$objCpm = new cpm("photo/cpmfetch/cpmfetch_config.php");
$options = array('subtitle' => 'File name : {{pFilename}}');
$objCpm->cpm_viewLastAddedMedia(1, 4, $options);
$objCpm->cpm_viewRandomMediaFrom('cat=1',1, 4, $options);
$objCpm->cpm_close();
?>
Please try to keep to one issue per thread; it's the rule.
-
Please try to keep to one issue per thread; it's the rule.
Ok. It seems to me that i've solved all my problems now. Thank you very much!