Advanced search  

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

Pages: 1 ... 33 34 35 36 [37] 38 39 40 41 ... 54   Go Down

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

0 Members and 1 Guest are viewing this topic.

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #720 on: April 01, 2006, 07:03:05 pm »

After reading gmc's tip i found the /* */ on a different location (between the beta part)
I switched the position but got a parsing error.

After deleting the two /* */ i had no problems at all and the image from my gallery was there ;)
Just my two cents
Because of the way its coded - two variable assignment statements - removing all the comment tags (/* */) happens to work as well... It first assigns the old (pre 1.4) values - then reassigns the new (1.4+) values...
The intent was comment out the old - and uncomment the new - but as you said - it works with no comments as well...

Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
having error plz help
« Reply #721 on: April 01, 2006, 08:28:49 pm »

Hi Friends,
   When i try to fatch CPG i got 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/bollyin/public_html/fatch/cpmfetch_dao.php on line 710

See the cftest.php page...

http://www.bollywoodplus.co.in/fatch/cftest.php

Thanks
I hope some one will help me...
Nishant
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: having error plz help
« Reply #722 on: April 01, 2006, 08:43:35 pm »

Hi Friends,
...

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/bollyin/public_html/fatch/cpmfetch_dao.php on line 710
...

Thanks
I hope some one will help me...
Nishant

Please scroll down to post 717... or any number of others below that address this problem...
Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #723 on: April 01, 2006, 10:17:42 pm »

hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5

how could i can get that


I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>



and below image its Tital

What code i need to made

Niks...

Logged

doktor k

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #724 on: April 01, 2006, 11:51:15 pm »

Thank MDKai,

I removed the tags and it did the trick
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #725 on: April 02, 2006, 04:19:21 am »

Still not able to display images at all in one of my installations, an empty table is produced...
Added "$objCpm->cpm_setDebugMode('true');" to the script, and appears it is finding 0 rows....

Some further testing and some progress...
In disecting and testing the SQL returning 0 rows:
Code: [Select]
SELECT  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 FROM  sk_cpg_pictures as p, sk_cpg_albums as a, sk_cpg_users AS u  WHERE a.aid = p.aid AND p.owner_id = u.user_id AND p.approved='YES'   and a.visibility = 0  ORDER BY rand(836697) LIMIT 6
The WHERE clause eliminating all the rows was "p.owner_id = u.user_id"
For some reason all my pics had an owner_id of '0'... and the only user defined is the admin with a user_id of '1'...
No idea how or why that happened (and not a CPMFETCH problem - maybe something to do with the 1.2.2 to 1.4.3 upgrade....)
After reviewing my other sites, and backing up the database (gallery has NO USER PICS) - issued following SQL:
Code: [Select]
UPDATE `sk_cpg_pictures` SET `owner_id` = '1';

and now at least something appears....  and appeared to cause no other problems....
Have to see what happens on next batch load of pics...

Next post for the remaining problem....
Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #726 on: April 02, 2006, 04:35:43 am »

OK... slugged through the last one... now down to a problem with generated pic urls...
Generated source code from cftest.php:
Code: [Select]
<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p>
<table  >
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-422"  class="photoclip" ><img  src="//albums/pictures/2005events/thumb_D05_1976.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-49"  class="photoclip" ><img  src="//albums/pictures/2001/thumb_slootto.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>2.8 views</td><td class="photoclip"><a href="/displayimage.php?pos=-574"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_2443.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td>
</tr>
<tr>
<td class="photoclip"><a href="/displayimage.php?pos=-318"  class="photoclip" ><img  src="//albums/pictures/2005meetings/thumb_D05_0098.jpg" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-261"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_1615.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>0 views</td><td class="photoclip"><a href="/displayimage.php?pos=-682"  class="photoclip" ><img  src="//albums/pictures/2004events/thumb_DSC_2699.JPG" class="photoclip" alt="One of the last photos submitted" title="One of the last photos submitted" width="100"   /></a><br /><br />skymasters<br>2 views</td>
</tr>
</table>
Notice the "src=//albums/pictures/..."
Can't get the correct src to appear with anything I've tried (short of capturing output buffer and manipulating before display).

Gallery is at the root of a subdomain:  http://gallery.skymasters.org
Test script is at http://gallery.skymasters.org/cpmfetch/cftest.php
Partial URL variable in cftest.php is set to:  $ChangeThisToYourPartialUrlToCPG = "/";   

cfimageget.php and cfig_random.php both work fine...  but prefer the features and flexibility of generating the full table of info.

Suggestions on how to tackle this one are welcome....
Thanks!
Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #727 on: April 02, 2006, 06:29:36 am »

hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5

how could i can get that


I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5

Code:
Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/wallpapers');
$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
$objCpm->cpm_close();
?>


and below image its Tital

What code i need to made

Niks...
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #728 on: April 02, 2006, 05:43:39 pm »


Generated source code from cftest.php:
Code: [Select]
...
<img  src="//albums/pictures/2005events/thumb_D05_1976.JPG"
Notice the "src=//albums/pictures/..."
Can't get the correct src to appear with anything I've tried (short of capturing output buffer and manipulating before display).

Well... some RTFC (since the manual didn't have this one...) found a function cpm_OverridePathToAlbums in cpmfetch.php....
Added:
Code: [Select]
$objCpm->cpm_OverridePathToAlbums('/albums');
to cftest.php - and it shows pics now from the same subdomain....
Not sure why I would need to do that... but it works...

Haven't gotten the right combo yet for crossing subdomains... but trying...


mcm - between this function and cpm_OverrideUrlToCoppermine ... I think you can get yours to work....

Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #729 on: April 02, 2006, 05:57:30 pm »

hi....
       The CF is working but i want following

To get pics from last updated three albums from cat=5
...
I am using follwing code but it is returing images from last updated album. and i want pics from last three updated albums from cat=5

Code:
Code: [Select]
<?php
...
$objCpm->cpm_viewLastAddedMediaFrom (1,4, "cat=5");
...
?>
...
Niks...

Niks,
It can take much longer than 8 hours to get a reply...  Not an expert - but I don't see a single call way to get what you ask....

The cpm_viewLastAddedMediaFrom function will give the last media in the category as you have it coded... regardless of what album or how many are from each album....
Don't know how many albums you have in the category... but to get a pic from each, you would need to call cpm_viewLastAddedMediaFrom once for each album:
Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom (1,1, "album=x");
Put a table around the calls to format it nicely - since cf willl return a table for each call...

If you have more albums than you want pics - well then you need some data from the tables to get the most recent pics... idenitfy the albums they are in.... and then make the calls or just format it yourself...

You didn't give me enough time to try to figure out code for that...  and still trying to figure out my last issue....
Greg
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

rtpHarry

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • Run Tings Proper

I am making a website which will show photo's from music events, they are broken into different categories for nights run by different people, each event (a single night / date) gets its own album. I need to display the last album added over any category on the front page. There are lots of functions but I dont seem to be able to do this particular task.

What I intend to do is make a call to the code for
Code: [Select]
function cpm_viewLastAddedMediaFrom($rows, $columns, $source, $options="") and pass through the id of the last album added to the system, ie:

Code: [Select]
$objCpm->cpm_viewLastAddedMediaFrom (2,4, "album=AVARIABLECONTAININGLASTADDEDALBUMID");
So as u may have guessed by now my question is does anybody know a snippet of code that will extract the id of the last added album? Would just finding the highest album ID work or is there a possiblity that lower numbers may be re-used if for example an old album has been deleted?
Logged
Matthew Harris
www.runtings.com

TroutSlayer

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #731 on: April 04, 2006, 12:24:39 am »

Hi!

I'm still trying to get a firm grip using all the different functions, options, source variables included with cpmfetch, but so far I like it.  Thank you.  I tried searching the forums for this, but couldn't come up with anything.  The problem I'm having is getting the functions to work on albums numbers greater than 36.

This code works fine:
Code: [Select]
<?
 include "./cpmfetch/cpmfetch.php";
 $objCpm = new cpm("/Gallery");
 $picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
 $picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");

   // THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=36");


This almost identicle code does not work:

Code: [Select]
// THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=38");
?>

The pieces of code are on the same page.  Top piece works, bottom one doesn't.  Any help or explanation would be greatly appreciated.  Thank you...
Logged

stuarta

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 88
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #732 on: April 04, 2006, 10:35:21 am »

sorry to ask again, but how would I go about using this with my gallery on one host with a database but display the last added on another host.
Logged
Comptia A+ / Network + certified

Daworm

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #733 on: April 04, 2006, 04:39:44 pm »

Ok - i've browsed through a lot of posts on here - but I can't seem to find the specific answer to my issue.

I have resolved a few other issues, for exampe that funny "call to non-function" or whatever it was, among other things.
But as yet - I can't get it to generate HTML and display my gallery.

I've tried editing a few files suchs as "cfimageget.php" and changing the urltocpm value, and ... there was one other change - but I can't quite remember it (it's 12:30AM here and I'm dead tired)

If you could even point me to a post that addresses this exact issue I'd be most grateful.

Using the latest "stable" release from the CpmFetch website - I've got it 'mostly' working. Just can't get the turn in part.  :(
Logged

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 #734 on: April 04, 2006, 04:48:48 pm »

sorry to ask again, but how would I go about using this with my gallery on one host with a database but display the last added on another host.

You could either use cfimageget (that comes with it) or you could use a php include to run a php file on the host from the remote server (which may or may not work depending on php permissions). 

Should be something in the docs about that.
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 #735 on: April 04, 2006, 04:55:04 pm »

Hi!

I'm still trying to get a firm grip using all the different functions, options, source variables included with cpmfetch, but so far I like it.  Thank you.  I tried searching the forums for this, but couldn't come up with anything.  The problem I'm having is getting the functions to work on albums numbers greater than 36.

This code works fine:
Code: [Select]
<?
 include "./cpmfetch/cpmfetch.php";
 $objCpm = new cpm("/Gallery");
 $picOptions = array("imagestyle" => "cpg", "imagelink" => "album", "alttag" => "%a");
 $picDesc = array("noimage" => "", "subtitle" => "%d", "tablestyle" => "tableGen");

   // THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=36", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=36", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=36");


This almost identicle code does not work:

Code: [Select]
// THUMBNAIL
   $objCpm->cpm_viewRandomMediaFrom(1,1, "album=38", $picOptions);

   // DESCRIPTION
   $objCpm->cpm_viewRandomMediaFrom(1, 1, "album=38", $picDesc);

   // PICTURE COUNT
   $objCpm->cpm_listMediaCountFrom("album=38");
?>

The pieces of code are on the same page.  Top piece works, bottom one doesn't.  Any help or explanation would be greatly appreciated.  Thank you...


Hmmm, Someone else mentioned this awhile back - I thought they were nutz.  I will check it out a later hopefully.  Its been crazy busy lately so I've not had time for support or finishing the new release.


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 #736 on: April 04, 2006, 04:57:53 pm »

Ok - i've browsed through a lot of posts on here - but I can't seem to find the specific answer to my issue.

I have resolved a few other issues, for exampe that funny "call to non-function" or whatever it was, among other things.
But as yet - I can't get it to generate HTML and display my gallery.

I've tried editing a few files suchs as "cfimageget.php" and changing the urltocpm value, and ... there was one other change - but I can't quite remember it (it's 12:30AM here and I'm dead tired)

If you could even point me to a post that addresses this exact issue I'd be most grateful.

Using the latest "stable" release from the CpmFetch website - I've got it 'mostly' working. Just can't get the turn in part.  :(


Sorry, what was the original issue?  I went back a few pages and could not find other posts.

Thanks

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

dsnodgrass

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #737 on: April 04, 2006, 10:30:01 pm »

Still looking for a way to display a specific album (in a non-randomized fashion) on another website using CpmFetch. Can it do this?
Logged

Daworm

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #738 on: April 05, 2006, 01:26:55 am »


Sorry, what was the original issue?  I went back a few pages and could not find other posts.

Thanks


Ah whoops - sorry. 
Posted that about 5 minutes before I went to bed.

The issue is, I can't get it to pull any images from my gallery.

I'm advanced at computer knowledge, beginner when it comes to coding php - I know what code is doing when I look at it, but writing it from scratch?  I need to learn.

Here is my file

http://www.ariseguild.net/default.php

My Gallery

http://www.ariseguild.net/gallery

If you look at the coding of default.php you won't see any output of html coding or anything to display images from my gallery.
But the php coding is there in the file itself.
I've used the default example that was shown on another part of your site, and I edited it to show only 1 image.

--
There were people with other issues at the start of the thread which I used to resolve my other issues (that being errors) but can't find a specific post about it NOT generating any images.
Logged

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 #739 on: April 05, 2006, 04:20:35 am »

Still looking for a way to display a specific album (in a non-randomized fashion) on another website using CpmFetch. Can it do this?

"non-randomized fashon"

Can you word this differently.  What do you want?

Thanks
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
Pages: 1 ... 33 34 35 36 [37] 38 39 40 41 ... 54   Go Up
 

Page created in 0.033 seconds with 19 queries.