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

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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 4 Guests are viewing this topic.

Filmgirl

I can't seem to get the target=_blank aciton to work this is the code I'm using:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1, "","");
$objCpm->cpm_close();
?>

vuud

Quote from: Filmgirl on July 23, 2006, 02:37:59 AM
I can't seem to get the target=_blank aciton to work this is the code I'm using:

<?php
include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$options = array('windowtarget' => '_blank');
$objCpm->cpm_viewRandomMediaFromAlbum(1,1, "","");
$objCpm->cpm_close();
?>

You are not sending the $options array into the $objCpm. 

You also need to spec an album I think.

$objCpm->cpm_viewRandomMediaFromAlbum(1,1, 6,$options);

Would display 1 image from album #6




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

Filmgirl

So I can only have the target_blank to work for only one album... I can't have it for the whole gallery?

vuud

Quote from: Filmgirl on July 23, 2006, 06:02:29 PM
So I can only have the target_blank to work for only one album... I can't have it for the whole gallery?


Sorry, since you were using the function call to get from an album, I thought you wanted that.

Otherwise something like:

$objCpm->cpm_viewRandomMedia(1,1,$options);

Is what you want
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

Sorry does anyone have any ideas why I can't pull in last added images or a particular album.

It seems to want to default to the same folder all the time.

Currently I have

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


$objCpm->cpm_viewLastAddedMedia(4,1,);
$objCpm->cpm_close();


This is refusing to call in Last Added Media even though on the gallery itself there is different last added
On top of this, i've tried to call a particular album, but it's picking up the same images as with the other two.

$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")

This should be an album of screenshots.

I'm also having difficulties formatting the text that it returns for file name and author.

thanks again

Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 24, 2006, 04:10:26 PM
$objCpm->cpm_viewLastAddedMedia(1,1,"album=2")
This should be an album of screenshots.

No, this should generate an error, or at least ignore the album=2

Review the syntax of the command you are using at this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html

Your probably thinking of:
cpm_viewLastAddedMediaFrom

Syntax is at the above link also
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 just tried $objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=2"); and it's still showing wrong album lol, damn thing
Comptia A+ / Network + certified

udgang99

Hi ...

I'm a very new (novice) user of this whole php/mysql/gallery-thingy, so please bear with me...
I'm trying to install the Fetch, and I'm following the instructions here: http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

-when I go to the cftest.php, I get this error (http://udgang99.dk/cpmfetch/cftest.php)   :
QuoteUnknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/web/gb1157/cpmfetch/cpmfetch_dao.php on line 710
... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...

what do I do?

stuarta

That is down to something that is explained in the instructions.  Sorry not meaning to be awkward, but I had the same problem and I'm sat here scratching my head to think what I done to resolve it.

If I remember I'll post it back and in the meantime maybe someone else might be able to help
Comptia A+ / Network + certified

vuud

Quote from: udgang99 on July 25, 2006, 11:32:12 AM
Hi ...

I'm a very new (novice) user of this whole php/mysql/gallery-thingy, so please bear with me...
I'm trying to install the Fetch, and I'm following the instructions here: http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

-when I go to the cftest.php, I get this error (http://udgang99.dk/cpmfetch/cftest.php)   :... I'm pretty sure I'm using "standard prefixes" (novice, remember ... too scared to try and change anything!) ...

what do I do?

Read the instructions that came with the program.  Sometimes the README's there contain information to that specific release.

(It is in there).
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

vuud

Quote from: stuarta on July 25, 2006, 09:49:55 AM
ok just tried $objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=2"); and it's still showing wrong album lol, damn thing

Can you post your links again?  I dredged up the old ones and one gave me an error and the other could not be found.  Could be me though - its early here.
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

Yeah sorry renamed the installation folder earlier.

Gallery is installed here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/gallery/

Test page I have is here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Album 2 should be screenshots which obviously you'll be able to see from the main gallery page although now it doesn't seem to be displaying anything
Comptia A+ / Network + certified

udgang99

Quote from: vuud on July 25, 2006, 03:59:30 PM
Read the instructions that came with the program.  Sometimes the README's there contain information to that specific release.

(It is in there).


Arrghhh --- where??? I've been going over this (http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html), but I still can't find anything!!

vuud

Quote from: stuarta on July 25, 2006, 04:11:25 PM
Yeah sorry renamed the installation folder earlier.

Gallery is installed here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/gallery/

Test page I have is here  http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/pictest.php

Album 2 should be screenshots which obviously you'll be able to see from the main gallery page although now it doesn't seem to be displaying anything

album 2 is the "SAUK Flying club" according to your gallery, NOT screenshots
Screenshot competition is album 6.
But those are all really problems for another forum.

Not sure why your code would not produce anything at all though.   Please post the full code. 
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

vuud

Quote from: udgang99 on July 25, 2006, 04:18:19 PM
Arrghhh --- where??? I've been going over this (http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html), but I still can't find anything!!

Programs ofter contain release notes... things that only apply to that version of the program.  In this case it is in a file named "Releasenotes_ something (the something is the version number).  It was in the file you downloaded.

The most recent one is also online on the downloads page.
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt

Sorry for the confusion... I've been doing dev so long I forget that other people don't actually know this stuff.

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 sorry album 2 (flying club is the one I'm trying to pull out)

I'm sure it's something with my code

include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFrom (1,1,"album=2");
$objCpm->cpm_close();


I want to use Random images, last added images from all galleries and then individual pages to select random and last added from particular albums
Comptia A+ / Network + certified

udgang99

Quote from: vuud on July 25, 2006, 04:26:53 PM
Programs ofter contain release notes... things that only apply to that version of the program.  In this case it is in a file named "Releasenotes_ something (the something is the version number).  It was in the file you downloaded.
The most recent one is also online on the downloads page.
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.2.txt
Sorry for the confusion... I've been doing dev so long I forget that other people don't actually know this stuff.

Vuud - I'm so sorry for being an aparent moron ... but going over the releasenote has brought me nowhere nearer an answer! I have NO idea whatsoever what the information in that file is usefull for!?!?!   If the answer IS in there, could you please, please show it to me???
It is the newest Fetch I have downloaded, and I'm using CPM 1.4.8 ...

Nibbler

QuoteThe Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields.  So instead of user web site, you have a few placeholder fields you can define into anything you want.  This of course breaks a bit of my code and stops CpmFetch from working.  I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file.  There are two sections around line 54 and line 59.  You need to comment out the one at line 54, and uncomment the one at line 59.  Comment it by placing /* before it and */ after it.  Uncomment by removing the same from the other section.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.


vuud

Quote from: udgang99 on July 25, 2006, 04:36:14 PM
Vuud - I'm so sorry for being an aparent moron ... but going over the releasenote has brought me nowhere nearer an answer! I have NO idea whatsoever what the information in that file is usefull for!?!?!   If the answer IS in there, could you please, please show it to me???
It is the newest Fetch I have downloaded, and I'm using CPM 1.4.8 ...


I guess its mislabeled as its no longer the beta, but still applies:

Quote
CODE: QUICKFIX FOR PEOPLE WANTING TO USE CPG BETA 1.4.1
(SAME NOTE AS RELEASE 1.6.0)
========================================
The Coppermine Dev's have (in what I would would say was a logical move) changed some of the internal database structure, and replaced a few fields with generic fields.  So instead of user web site, you have a few placeholder fields you can define into anything you want.  This of course breaks a bit of my code and stops CpmFetch from working.  I am going to work out a permanent solution, but for the short term, if you really want to use CPG BETA 1.4.1 (and the dev's would appreciate you doing so, so would I) you must edit the top of the cpmfetch_dao.php file.  There are two sections around line 54 and line 59.  You need to comment out the one at line 54, and uncomment the one at line 59.  Comment it by placing /* before it and */ after it.  Uncomment by removing the same from the other section.  If you are on a version prior to 1.4 you DO NOT NEED TO DO ANYTHING.

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