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 ... 17 18 19 20 [21] 22 23 24 25 ... 54   Go Down

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

0 Members and 2 Guests are viewing this topic.

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: show the 4 last updated albums (1 pic + tittle)
« Reply #400 on: November 07, 2005, 07:10:09 pm »


Can someone explain me how I can use the print_r($row) function?
The problem explain above is certainly not very complicated to solve. But for me, it's not possible as long as I not a php specialist.
Can someone help me with the final solution or with the print_r($row) function?

The print_r function is not to solve your problem, but to teach you something.  It will help you see what data you have at your disposal, which will then help you to solve your problem.

http://www.php.net has the print_r in the documentation !

Its not on the "php specialist" level, or I would not be sending you that way.  A little effort and thought and you can do it.  Really.


Thanks everybody for your help. php as realy no limit and is a big system. But it's not so easy to learn.
I've find an other solution (a friend rewrite a part of the code to do what I need)

Seb

I hope the code rewrite was to the examples, and not to the actual cpmfetch code itself.  Its of course completely okay for you to do it, but it will make upgrades a pain for you. 

Glad to hear one way or another its doing some good for you



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

Feydakin

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #401 on: November 08, 2005, 06:25:29 pm »

I went ahead and rewrote most of the site away from Mason and in PHP so that I could get this to work.. Anyway, I have two questions if I may..

1. After much searching I still haven't figured out how to set the border around the image to 0.. Apparently I'm blind..

2. Can I pull the comments with the images?? Maybe just the last comment posted if there is one?? I found this function but I don't think it applies..

Code: [Select]
cpm_viewLastCommentedImages($rows,$columns, [ array $options=""])

I'm assuming that it just pulls from the images that have comments..

Thanks -
Logged

falarious

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #402 on: November 09, 2005, 06:21:29 am »

Hello.

I am gonig to use cpm fetch on my site.

This is the url to it http://falarious.com/index2.php

as you can see, the thumbnails are not all the same size. Also, the thumbnails arent inside the table.
How do I get the thumbnails to all be 100*100, and how do i get the thubnails inside the table?

Code: [Select]
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/");

$styleguide = array(

"subtitle" => "</div>
<p>
</p>
<table id='table2' style='border-collapse: collapse;' border='1' bordercolor='#7aabd3' cellpadding='0' cellspacing='0' width='575'>
        <tbody>
        <tr>
          <td bordercolor='#7AABD3' align='center' bgcolor='#103d6a'>
  <strong> <font color='#ffffff' face='Comic Sans MS' size='2'> %t</font></strong></td>
        </tr>
        <tr>
          <td bordercolor='#000033' align='center' bgcolor='#000033' height='59' valign='top'>
  <p>
<font color='#ffffff' face='Comic Sans MS' size='2'>

<strong style='font-weight: 400;'>
%c<br>
<br>
</strong>

</p>
        </tr>
      </tbody></table>    
<p>&nbsp;


 "
,

        

"imagestyle" => "photoclip",
"imagesize" => 'thumb');


$objCpm->cpm_viewLastAddedMedia(20,1,$styleguide);
$objCpm->cpm_close();
?>



« Last Edit: November 09, 2005, 06:29:53 am by falarious »
Logged

tlove

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #403 on: November 12, 2005, 06:12:57 pm »

Noticed a slight problem with my image links. I'm using CpmFetch for rss feeds and an image on my main page.

my site

My image links come out with an extra '/' between gallery and album folders. eg http://mysite.com/cpm-dir//albulms/1001/thepic.gif. I'm assuming i used '/gallery/' where i should have used '/gallery' somewhere. I just have no idea where. If i'm right, can somebody point me in the right direction. Otherwise, does anybody know what i need to change to get this corrected.
The output form my feed.xml is( i used some carriage returns to make it easier to read):
Code: [Select]
Tongo's Photo Shop Recent updates to gallery http://www.tongsondub.com 2005-11-12T10:30:02+01:00 Tongsondub.com
http://www.tongsondub.com http://www.tongsondub.com/images/sitelogo.gif text/html 2005-11-09T01:08:25+01:00
http://www.tongsondub.com admin Personal :: RB.........
 http://www.tongsondub.com/tgallery/displayimage.php?pos=-3
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-3">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20003.jpg" align="right" /></a>
Car Stuff 003.jpg from album Personal<br/>Filesize 74.5 kb<br/>
I can not say what engine that is or whose car its in. That's about all i got to say about that<br/>Rated 0 / 5 stars (0 votes total)
text/html 2005-11-09T01:07:18+01:00 http://www.tongsondub.com admin
Personal :: My new K-sport Coilovers http://www.tongsondub.com/tgallery/displayimage.php?pos=-2
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-2">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_Car%20Stuff%20022.jpg" align="right" />
</a>Car Stuff 022.jpg from album Personal<br/>Filesize 68.6 kb<br/>
Not the most well-known coilovers but they have not let me down.
Most importantly, the price was more than right<br/>Rated 0 / 5 stars (0 votes total) text/html 2005-11-09T01:05:37+01:00
http://www.tongsondub.com admin Personal :: Skyline R34 GTR
 http://www.tongsondub.com/tgallery/displayimage.php?pos=-1
<a href="http://www.tongsondub.com/tgallery/displayimage.php?pos=-1">
<img border = "0" src="http://www.tongsondub.com/tgallery//albums/userpics/10001/thumb_gtr.jpg" align="right" /></a>
gtr.jpg from album Personal<br/>Filesize 137.7 kb<br/>The car i will by when i win the Lottery.<br/>Rated 5 / 5 stars (1 votes total)
if you look at the links for the images, they have two '/'s

Thanks all
Logged

tlove

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #404 on: November 12, 2005, 06:49:58 pm »

found the source of the problem. In the cpmfetch.php file, there is a line that appends '/' to the path to coppermine if its not there and then in the ....._dao.php file, the albums folder is declared as '/albums' so you end up with /coppermine/ and /albums

in cpmfetch(around line 138):

Code: [Select]
if (substr($urltocpm_,-1) != '/') $urltocpm_ .= '/';

in the dao.php file(around line 170):

Code: [Select]
$this->fullpathtocpm = $this->partialUrltocpm;

}



$this->OverridePathToAlbums($this->fullpathtocpm . "/albums", $this->partialUrltocpm . "/albums");





$this->setPrivateLockOn(true);

$this->dateFormatString = $this->defaultDateFormatString;

I hope i didn't just screw something up, so far its working fine.
Logged

smoke10010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #405 on: November 14, 2005, 06:25:25 am »

Is there a way to display the thumbs of the last X number of albums updated. much like the cpm_showAlbumsUpdatedOverLastDays except no date and a set number.
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 #406 on: November 14, 2005, 10:01:00 pm »

Is there a way to display the thumbs of the last X number of albums updated. much like the cpm_showAlbumsUpdatedOverLastDays except no date and a set number.

Would that mean one thumb from each of the X last updated albums?  Or do you mean the thumb assigned to the album and not the most recent upload?


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

smoke10010

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #407 on: November 14, 2005, 11:14:30 pm »

both if possible. Right now i'm not really sure how it works it seems like it takes the last picture of the last album thats been updated.

but i'd like it so that it shows one thumb from each of the X last updated albums preferrably the thumb assigned.
Logged

ksshane

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #408 on: November 15, 2005, 01:02:09 am »

Not exactly sure where I went wrong.

Test page shows everything working, but when I add this code

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


To my portal page I get this

Code: [Select]
cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>

Instead of random photos.

Can someone tell me what I did wrong?

Here is a link to my site if that helps

http://www.aircapitalconstrictors.com/forum/portal1.php

Thanks
Shane
Logged

mona87

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #409 on: November 15, 2005, 03:44:48 am »

Im a bit confused.   

this is the code i have to show the last images i uploaded

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


i want the images though to resized down to about 50 for the width.  so i added the option array

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>



this is the error i got when i went to my broswer.


Quote
Parse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4


any help would be greatly appreciated!
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 #410 on: November 15, 2005, 05:30:32 am »

Not exactly sure where I went wrong.

Test page shows everything working, but when I add this code

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/accgallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


To my portal page I get this

Code: [Select]
cpm_viewRandomMedia(3,3); $objCpm->cpm_close(); ?>

Instead of random photos.

Can someone tell me what I did wrong?

Here is a link to my site if that helps

http://www.aircapitalconstrictors.com/forum/portal1.php

Thanks
Shane

Looks as if your portal is processing or stripping part of the code out.  You can bring it up in the embedding thread, maybe someone else has a problem.  Be worth noting what portal you are using.


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 #411 on: November 15, 2005, 05:32:12 am »

Im a bit confused.   

this is the code i have to show the last images i uploaded

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


i want the images though to resized down to about 50 for the width.  so i added the option array

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/visual');
$objCpm->cpm_viewLastCommentedImages(1,4, [ array imagewidth="50"])
$objCpm->cpm_close();
?>

this is the error i got when i went to my broswer.
Quote
Parse error: parse error, unexpected '[' in /home/***/public_html/cpmfetch/test2.php on line 4
any help would be greatly appreciated!

It looks as though you are following the docs too literally.  Typically the [ ] around something means that parameter is optional... 

Try something like this:

$objCpm->cpm_viewLastCommentedImages(1,4, array( imagewidth => "50"));


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

pyimaung

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #412 on: November 15, 2005, 01:50:45 pm »

I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching? My code is below:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide); 
$objCpm->cpm_close();
?>


Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks
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 #413 on: November 15, 2005, 07:59:20 pm »

I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching? My code is below:

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array();
$styleguide['imagelink'] = "none";
$styleguide['windowtarget'] = "_blank-cfshow";
$objCpm->cpm_viewLastAddedMedia(1,5,$styleguide); 
$objCpm->cpm_close();
?>


Can anyone spot the problem?? Could it be a database error? How can I fix this? Thanks


You can add in $objCpm->setDebugMode(true);

This will add in a bunch of comments into your html showing the queiers and results and such.  Might help


Also, try adding

<?php
error_reporting (E_ALL);
ini_set('display_errors',1);
?>

That will display a lot more than normal







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

pyimaung

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #414 on: November 16, 2005, 06:38:52 pm »

Hi Vuud,
Thanks for your reply. I've tried both your suggestions but still not working.
I found out another thing today. I'm the admin and all the photos I upload are fetched but the pics that my users upload which I have to approve do not get fetched. I tried registering as a normal user and tried uploading and approved the files with my admin account. It appears in CPG but CPMFetch does not fetch. I tried uploading again as an admin and the photos were fetched just fine. Please help..Thanks.
Logged

Ralphfolkes

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #415 on: November 18, 2005, 09:54:43 am »

I was unable to start a new topic so I am replyng to this one in hopes of an answer.

I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.

                     
I am using the following code
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

Which gets me    http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics.  The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0

Is there something I am missing or doing wrong?
Logged

jphahn

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
    • Jason Hahn Nature Photography
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #416 on: November 18, 2005, 01:11:55 pm »

I've used CpmFetch for my site and it was working fine. But all of a sudden, it has stopped fetching pics. I uploaded new photos but it's not showing the latest uploaded pics. Why has it stopped fetching?

I was having exactly the same problem.  It worked fine up until a few days ago.  I was using the SSI method to include the latest photos on an html page.  I changed it to use this method: http://forum.coppermine-gallery.net/index.php?topic=23537.0 and it works fine now.

Jason
« Last Edit: November 18, 2005, 01:58:20 pm by jphahn »
Logged

guytoon

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch 1.4 On... Displaying data and images from CPG on your website
« Reply #417 on: November 18, 2005, 06:55:08 pm »

Hi,

CPMFetch is doing exactly what I'd like to. Unfortunately i tried to install it on 2 servers and it doesnt works. Averything is successfull on the test page but no thumbnail is displayed.

Link to my public cftest http://www.breizhskiff.com/galerie/cpmfetch/cftest.php
Coppermine is there : http://www.breizhskiff.com/galerie/

Note that my directory "albums" has no pictures at the root but in subdirectories (anyway I tried with ome at the root and it didn't change anything).

Thanks for your knid help.

Ghislain
« Last Edit: November 18, 2005, 07:06:03 pm by guytoon »
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 #418 on: November 18, 2005, 10:36:32 pm »

Hi Vuud,
Thanks for your reply. I've tried both your suggestions but still not working.
I found out another thing today. I'm the admin and all the photos I upload are fetched but the pics that my users upload which I have to approve do not get fetched. I tried registering as a normal user and tried uploading and approved the files with my admin account. It appears in CPG but CPMFetch does not fetch. I tried uploading again as an admin and the photos were fetched just fine. Please help..Thanks.

Sorry, my time has been very limited lately so I have not been able to hang out on the board much.

CpmFetch will not grab photos that require logins to see, or ones that are awaiting approval.  So that could be a problem. 

This will help if they are just restricted

cpm_unlockPrivate($bool)

This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.

I do not think there is a way around the "needing approval" state at this time - that is intentional though - as if you dont want them showing up in your gallery till you see them, you probably don't want them anywhere else.




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 #419 on: November 18, 2005, 10:45:48 pm »

I was unable to start a new topic so I am replyng to this one in hopes of an answer.

I have installed cpmfetch on my website and it is functioning for the most part except that when I try to use the last added media command I don't get the last added media.

                     
I am using the following code
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/Gallery");
$objCpm->cpm_viewLastaddedMedia(5,1);
$objCpm->cpm_viewRandomMedia(5,1);
$objCpm->cpm_close();
?>

Which gets me    http://isaiahfolkes.com/isaiah_folkes__index.php
It should have a single coluum with 5 pics of last added and then 5 random pics.  The problem I am having is the last added pics don't match coppermine http://isaiahfolkes.com/Gallery/thumbnails.php?album=lastup&cat=0

Is there something I am missing or doing wrong?

Well, its good you were not able to start a new topic - posts go here.

Second, amazingly enough Isaiah and I have the same head circumferance...  Wierd. :p

What you are doing looks correct, but your right, something is busted in there.

A few things:

What version of CPG?

Are the other ones uploaded any differently than the ones its showing?









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 ... 17 18 19 20 [21] 22 23 24 25 ... 54   Go Up
 

Page created in 0.037 seconds with 20 queries.