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

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 1 Guest are viewing this topic.

udgang99

Ahhhh ...
I UNcommented something at line 62 (!!!)

var $sqlPictureAlbumSelect = ' p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';


But I couldn't find anything to COMMENT around line 54 ... but it LOOKS like it works now! :)
http://udgang99.dk/cpmfetch/cftest.php

-Thanks !!!

stuarta

Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 25, 2006, 04:32:05 PM
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

Add in the debug line I inserted below, then point me at the page it is on.


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




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

oooh and the other thing if you can please, I'm struggling to finf the correct format for pulling out the filename and author and using a particular css style to format the text.  Would be grateful if you could include that on your reply.
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 25, 2006, 06:07:20 PM
oooh and the other thing if you can please, I'm struggling to finf the correct format for pulling out the filename and author and using a particular css style to format the text.  Would be grateful if you could include that on your reply.

I am not sure on the original problem... the SQL call looks okay.  Something strange is going on somewhere - afaik your the only one with this problem.  I may be able to look into it more later, but I have lots to do right now.

Anyway, the info for pulling that all out is in the documentation online.  If you get stuck, post - but I am not going to copy and paste it into the forum for ya :)

There is also examples on the website for CSS (some anyway)

Good luck
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

well I am stuck with it as it's refusing to use the css style's I've created and the instructions on fistfullofcode aren't unfortunately the easiest to follow, or maybe it's just me being thick
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 25, 2006, 06:14:47 PM
well I am stuck with it as it's refusing to use the css style's I've created and the instructions on fistfullofcode aren't unfortunately the easiest to follow, or maybe it's just me being thick

Feel free to submit updated documentation - I will be happy to post it.  I hate writing doc's and in the beginning had no real intention to write them at all.  I'd welcome examples, rewritten for clarification, updates, etc...   Many people like using cpmfetch, I can count on one hand how many submissions I have gotten back to help out.  Which is fine - opensource is generally like that.  I wrote this for myself and posted it so other people can benefit from it.  Other than it is definately code of some sort, I make no warrenties or anything.  On the bright side - its free!

As for the CSS, if you are having a problem - post what you are doing.  I can't see what you are doing wrong from 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 thankyou.  not meaning to have a go.  If I get this working then maybe it could be added to the docs.

Great system and really want to fully get it working
Comptia A+ / Network + certified

stuarta

This is what I was using for grabbing the filename and author and formatting

$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 25, 2006, 06:29:39 PM
yeah thankyou.  not meaning to have a go.  If I get this working then maybe it could be added to the docs.

Great system and really want to fully get it working

In short for CSS...

Here is the list of option array entries... 
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

Make sure that you have the option array passed into the function you are calling.  That's probably the biggest mistake.

And make sure it matches your CSS definition

Then look at the source and make sure its including the class="" on the generated cpmfetch 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

vuud

Quote from: stuarta on July 25, 2006, 06:31:29 PM
This is what I was using for grabbing the filename and author and formatting

$options = array('subtitle'=>'%t by %o');
$objCpm->cpm_viewLastAddedMedia(4,1,$options,array("imagestyle" => "quote"));


Yeah, thats botched up in the coding.  Either of these two would work:


$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);

[/quote]

or


$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));

[/quote]

The way you were doing it would cause the imagestyle thing to either be ignored or confuse the program at worst.



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 thanks Vuud.

Changed the code to

include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));


on one column and

$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();


on the other.  Using the 'quote' class though the text under the picture should be red but it isn't

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 26, 2006, 10:01:02 AM
ok thanks Vuud.

Changed the code to

include "cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia(4,1,array('subtitle'=>'%t by %o',"imagestyle" => "quote" ));


on one column and

$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();


on the other.  Using the 'quote' class though the text under the picture should be red but it isn't

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


Good.  Well be careful with them.  Check your outputted code to see where it is setting the css class... for example imagestyle will only set it on the img tag itself.  Cpmfetch allows you a lot of fine control over what is what css.




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 26, 2006, 03:17:07 PM
so "imagestyle" won't change the text?

Why would it?  Its to change the css for the image.

I won't go into lots of detail, since that is more of a basic html question than a cpmfetch.

But on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s02.html

You probably want to play with the cellstyle setting.  That will assign a css to the cell, which contains the text.

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

thought as much, cellstyle was the one i wanted and got that sorted.

Just need to get to the bottom of why it isn't picking up the correct albums or last added pictures
Comptia A+ / Network + certified

stuarta

Sorry Vuud did you manage to get chance to look at the SQL or no?  I know you said you were busy. 

My final problem now  ;)
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 26, 2006, 06:05:26 PM
Sorry Vuud did you manage to get chance to look at the SQL or no?  I know you said you were busy. 

My final problem now  ;)

I took a quick look and it looks okay...  its drawing the right album id and submitting it. 

Next step would be looking at the tables...  If you want to export your SQL tables for it, I can load it up here and see what is up with the photos.   Otherwise I am not sure what to do.  You can PM a download location for the export if you want.

Other than that - I am not sure what I can check

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