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 ... 30 31 32 33 [34]   Go Down

Author Topic: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG  (Read 324499 times)

0 Members and 1 Guest are viewing this topic.

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #660 on: July 08, 2005, 02:22:13 am »

Hi all,

I'm so very close (I think) to doing what I really want this mod to do.  Here's the URL in question:
http://www.fogpeople.org/test/test.php

Basically, the current background is a random image puller script from a directory of non-coppermine photos for testing.  The thumbs in the box on the page are a currently working install of CPMFetch.  On the right is a static block of what I want to be some stats about the random image pull.

I would like to able to have CPMFetch pull a single, random, full-size image and use it in the "background" declaration for the page, replacing the current random image rotator.  (ultimately I'll replace the coppermine gallery with full size background images)  THEN, I want to include some info about said image in the div on the page, namely the name of the uploader linked to their home page. 

Is there a way to isolate the random pulls so I can just drop the particular info as a variable or something where I want?  Combing the forums currently looking for an answer. 

Thanks!!!
-m


Yes, if the page you are pulling it with is a PHP page and you are using the lastest dev version you can.  I have to run out now, but when I get back I will post an example here for you.  Its slightly more involved than the existing ways, but not by much.

Install 1.3.9 and we will take it from there...  (1.3.9 is pretty much the next stable release, so don't worry) ... also coppermine.php is now cpmfetch.php - so remove the old one.

Talk to you soon


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

stez

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #661 on: July 08, 2005, 02:45:54 am »

hi vuud...

1.39 has fixed the filename problems as you predicted... I must buy your crystal ball...  ;)

Just have to start porting over the website to the new server soon in between yet more interviews...

Cheers,
Kyle
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #662 on: July 08, 2005, 06:05:07 am »

I would like to able to have CPMFetch pull a single, random, full-size image and use it in the "background" declaration for the page, replacing the current random image rotator.  (ultimately I'll replace the coppermine gallery with full size background images)  THEN, I want to include some info about said image in the div on the page, namely the name of the uploader linked to their home page. 

Is there a way to isolate the random pulls so I can just drop the particular info as a variable or something where I want?  Combing the forums currently looking for an answer. 

Here is how you can use 1.3.9 or better to accomplish this:  The comments are inserted for educational purposes

Code: [Select]
<?php

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data $objCpm->cpm_viewRandomMediaFrom (11""); 

// This gets the image to display...
$imagename $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print 
"<img src='$imagename'>";

?>


You have to take the next step and figure out how to get $imagename into your background tag :)



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: Error message
« Reply #663 on: July 08, 2005, 06:14:27 am »


Do yourself a favor and download the latest dev version instead.  It will save you time later as the filenames have changed and the install works a bit better...

I think its 1.3.9 and its at http://cpmfetch.fistfullofcode.com

It will be a stable release in about a week so its fine for use..., unless this other program kills me first.

I have done that and changed line 5, but I still have 1 Fail
80   CPG Config file not found: /home/bymnews/public_html/public_html/photos/include/config.inc.php   FAIL
I have tried various changes to the script, but I still get the error message with public_html in twice.
My latest change was to:
$testnumber = 80;
$cpgconfigfile = $_SERVER['DOCUMENT_ROOT'] . $ChangeThisToYourPartialUrlToCPG . '/photos/include/config.inc.php';
 if (file_exists($cpgconfigfile)) {
   OutputTestRow($testnumber, "Found CPG config file", "PASS");
Sorry to have to ask, I did try to fix it myself.

Quote

I think I just completely missed this post... sorry about that.

There should not be a "/photos"  on the line above the if statement.

What did you put in for line 5 in the cftest file?  I suspect you put /public_html/photos...

if that is the case, change it to just "/photos"


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
This thread has been continued elsewhere...
« Reply #664 on: July 08, 2005, 06:45:28 am »

Due to the size of this thread, and the fact that much of the information is from older releases and not really applicable anymore, I have started a new thread at:

http://forum.coppermine-gallery.net/index.php?topic=19564.0

Sorry for the inconvience, but it had to be done.

And with 1.4.0 STABLE coming out I figured what better time could there possibly be!!!!!!

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 ... 30 31 32 33 [34]   Go Up
 

Page created in 0.02 seconds with 21 queries.