CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 45 CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 45
 

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

CpmFetch 1.4 On... Displaying data and images from CPG on your website

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.


stuarta

I did try $objCpm = new cpm('/cpg148'); as well but that still gives same error
Comptia A+ / Network + certified

stuarta

cftest is giving the following errors


Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
5 You set your partial URL to /cpg148 PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS


but I'm getting thumbnails
Comptia A+ / Network + certified

stuarta

Sorry just wandering if any update on this. This is the last part I'm trying to get finished on a website before I go live.

latest is that on a test page I've made, I get


Fatal error: Cannot instantiate non-existent class: cpm in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\pictest.php on line 11


which is the line pointing it to the gallery.

Full code is

<?php
include "http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch/cpmfetch.php";
$objCpm = new cpm('http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close(); ?>


I've tried the paths with full URLS and without.

The php file is stored in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Gallery is stored in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpg148

and cpmfetch is installed in http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/cpmfetch

Really hope someone can help before I try a different gallery
Comptia A+ / Network + certified

Nibbler

Use a path not an URL.


include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');

vuud

Quote from: stuarta on July 19, 2006, 01:30:30 PM
cftest is giving the following errors


Notice: Undefined index: SCRIPT_FILENAME in e:\domains\s\simaviatorsuk.co.uk.streamlinenettrial.co.uk\user\htdocs\cpmfetch\cftest.php on line 214
35 Server OS = Windows NT IIS686 5.2 build 3790 INFO
40 WebServer = Microsoft-IIS/6.0 INFO
45 PHP Version = 4.3.2 INFO
55 DOCUMENT_ROOT: e:\\domains\\s\\simaviatorsuk.co.uk.streamlinenettrial.co.uk\\user\\htdocs INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: Not found BAD
75 DOCUMENT_ROOT is not a good match BAD


but I'm getting thumbnails

I don't really support windows for webservers with this... it does work, but they seem to be fast and loose with the environmental variables they set.  If your getting thumbnails though it is fine.

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stuarta

ok swapped over to linux database, assuming this is preferred to windows server.

got rid of that error now, just have another one which also shows up on the cftest.php.  Cftest.php is showing all ok for everything and nothing bad just the following error

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 20, 2006, 04:26:58 PM
ok swapped over to linux database, assuming this is preferred to windows server.

got rid of that error now, just have another one which also shows up on the cftest.php.  Cftest.php is showing all ok for everything and nothing bad just the following error

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/fhlinux205/s/simaviatorsuk.co.uk.streamlinenettrial.co.uk/user/htdocs/cpmfetch/cpmfetch_dao.php on line 710


Linux servers and nicer anyway. 

Read the readme that came with it... it explains what to do to get rid of that error.

Have a nice day

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stuarta

yep just found out I need to uncomment and comment stuff, working at last.  now I can play and get just images from certain albums
Comptia A+ / Network + certified

stuarta

Spoke too soon.  Managed to get one column showing random images but I can't get a second column to work showing last added.

I think it's got something to do with it already opening the connection.

Can someone quickly please paste the script I need. So far I have

Column 1 include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();


column 2 $objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();
Comptia A+ / Network + certified

vuud

[quote author=stuarta link=topic=19564.msg159269#msg159269 date=1153408851]
Spoke too soon.  Managed to get one column showing random images but I can't get a second column to work showing last added.

I think it's got something to do with it already opening the connection.

Can someone quickly please paste the script I need. So far I have

Column 1 [code]include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/cpg148');
$objCpm->cpm_viewRandomMedia (10,1);
$objCpm->cpm_close();


column 2 $objCpm = new cpm('/cpg148');
$objCpm->cpm_viewLastAddedMedia (10,1);
$objCpm->cpm_close();

[/quote]

You just need one new and one close...

At the start of your page (or at least before column 1)
$objCpm = new cpm('/cpg148');


1st column
$objCpm->cpm_viewRandomMedia (10,1);

2nd column
$objCpm->cpm_viewLastAddedMedia (10,1);


End of page (or at least after the 2nd column)
$objCpm->cpm_close();

[/code]

If you still get errors, please post what the error / problem is...

thanks




Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stuarta

Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 20, 2006, 08:15:00 PM
yep works thanks

Good.  Remember you can issue as many calls as you want between the "new" and the "close".  In fact, its most efficent this way.

Vuud
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stuarta

Comptia A+ / Network + certified

stuarta

Just uploaded some new pics to my gallery and they aren't showing up under the last added images using $objCpm->cpm_viewLastAddedMedia (10,1);

Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 20, 2006, 11:43:30 PM
Just uploaded some new pics to my gallery and they aren't showing up under the last added images using $objCpm->cpm_viewLastAddedMedia (10,1);

They should.  Did you upload them to a private album or something?  Whats the link?
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stuarta

nope album same as the other one.

home page is  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php

once on the gallery, the screenshots I added last night are showing as Last Added
Comptia A+ / Network + certified

stuarta

Sorry only me again.

Ok, got random media but for some reason last added still isn't working  ???

Just managed to pull out the author name but having problems styling the font.

I have a tag in my stylesheet called .copyright which I want to use.  I've applied the following code but it's not formatting.

$options = array('subtitle'=>'%t by %o',"cellstyle"=>".copyright");
$objCpm->cpm_viewRandomMedia (5,1,$options);
Comptia A+ / Network + certified

kronik

Hi

Is it possible to show last/random images in Flash using cpmfetch?

vuud

Quote from: kronik on July 21, 2006, 09:45:44 PM
Hi

Is it possible to show last/random images in Flash using cpmfetch?

If you can remotely retrieve an image (as in http://www.yourdomainname.com/imagename.jpg) from flash you can.  I don't know flash that well, but I suspect its possible
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco