Advanced search  

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]

Pages: 1 ... 43 44 45 46 [47] 48 49 50 51 ... 54   Go Down

Author Topic: CpmFetch 1.4 On... Displaying data and images from CPG on your website  (Read 971010 times)

0 Members and 2 Guests are viewing this topic.

udgang99

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 78
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #920 on: July 25, 2006, 04:57:26 pm »

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

Code: [Select]
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 !!!
Logged

stuarta

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #921 on: July 25, 2006, 05:02:11 pm »

yep looks good, you should be cruising now
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #922 on: July 25, 2006, 05:06:45 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

Code: [Select]
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.

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



Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #923 on: July 25, 2006, 05:12:03 pm »

ok done, and in the same location

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

I see there is a whole heap of info in the source now
Logged
Comptia A+ / Network + certified

stuarta

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #924 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.
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #925 on: July 25, 2006, 06:11:56 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
Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #926 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
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #927 on: July 25, 2006, 06:20:23 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. 


Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #928 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
Logged
Comptia A+ / Network + certified

stuarta

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #929 on: July 25, 2006, 06:31:29 pm »

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

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #930 on: July 25, 2006, 06:33:10 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.



Logged
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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #931 on: July 25, 2006, 06:37:34 pm »

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

Code: [Select]
$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:

Code: [Select]
$options = array('subtitle'=>'%t by %o',"imagestyle" => "quote" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
[/quote]

or

Code: [Select]
$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.



Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #932 on: July 26, 2006, 10:01:02 am »

ok thanks Vuud.

Changed the code to

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

on one column and

Code: [Select]
$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
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #933 on: July 26, 2006, 03:10:00 pm »

ok thanks Vuud.

Changed the code to

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

on one column and

Code: [Select]
$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.




Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #934 on: July 26, 2006, 03:17:07 pm »

so "imagestyle" won't change the text?
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #935 on: July 26, 2006, 03:23:16 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.

Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #936 on: July 26, 2006, 03:37:27 pm »

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
Logged
Comptia A+ / Network + certified

stuarta

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #937 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  ;)
Logged
Comptia A+ / Network + certified

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #938 on: July 26, 2006, 06:15:42 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

Logged
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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #939 on: July 26, 2006, 06:23:36 pm »

ok pm'd u.
Logged
Comptia A+ / Network + certified
Pages: 1 ... 43 44 45 46 [47] 48 49 50 51 ... 54   Go Up
 

Page created in 0.025 seconds with 19 queries.