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

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

0 Members and 1 Guest are viewing this topic.

unknown_girl

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 23
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #640 on: July 05, 2005, 05:05:30 pm »

Hi!
How do I use the cfimageget to get the 2 last photos uploaded?
Like for example the code:

Code: [Select]
$urltocpm = "/photos/";
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setSourceString("cat=7");           
$cpmfetch->getRandom();

What do I change in this case, to display the 2 last images upload in the gallery?
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 #641 on: July 05, 2005, 07:00:19 pm »

Hi!
How do I use the cfimageget to get the 2 last photos uploaded?
Like for example the code:

Code: [Select]
$urltocpm = "/photos/";
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setSourceString("cat=7");           
$cpmfetch->getRandom();

What do I change in this case, to display the 2 last images upload in the gallery?

Cfimageget can only get one photo at a time.

Are you putting this into a PHP page on the same site as the gallery?  cfimageget is for avatars, other web sites, etc...






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

unknown_girl

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 23
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #642 on: July 05, 2005, 07:22:05 pm »

I'm puting like for example my site is: http://hilaryduff.hostingportugal.com , and the gallery is in http://hilaryduff.hostingportugal.com/fotos
so how can I show in my frontpage site the last uploaded photos...
I don't mind if is only one ... pls give me the code for one
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 #643 on: July 05, 2005, 08:55:10 pm »

I'm puting like for example my site is: http://hilaryduff.hostingportugal.com , and the gallery is in http://hilaryduff.hostingportugal.com/fotos
so how can I show in my frontpage site the last uploaded photos...
I don't mind if is only one ... pls give me the code for one

Is your top page a .php file?
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

unknown_girl

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 23
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #644 on: July 05, 2005, 10:27:18 pm »

its htm... but I have no problem in creating my site in php :)
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 #645 on: July 05, 2005, 10:46:01 pm »

its htm... but I have no problem in creating my site in php :)

If want to do interesting things with cpmfetch, make your top page a php page

Then insert this

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/fotos");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>

The above assumes you are using the latest dev version 1.3.9
The above assumes you put the program into a directory named cpmfetch under the root of the web site (change line 1 if this is not the case)

Once you get that working, poke through the example pages at this link for creative things to do

http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php
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

unknown_girl

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 23
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #646 on: July 05, 2005, 11:10:27 pm »

thanks
stez sorted it ...
Thanks again Stez...
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 #647 on: July 06, 2005, 05:13:03 am »

thanks
stez sorted it ...
Thanks again Stez...

Ah damnit.  I guess now stez is gonna expect his feature to be added...  ;)


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 #648 on: July 06, 2005, 03:58:16 pm »

Haha.   ;D  No, was online last night, noticed she was online too, so I thought why not?  As for the "feature" - it's not something I need atm, but I can see uses for it elsewhere/in future.  ;)

Sorry I haven't replied regarding your fix on the filename in 1.3 - been up and down the country for job interviews so haven't had a chance to play with it. 
Logged

kroberson

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #649 on: July 06, 2005, 11:39:37 pm »

Hello!

Great Mod! However, Im trying to use the RandomMedia function and it keeps pulling only one image from my gallery (of only 3). Currently I have it set for LastAddedMedia but Id like to use the random one. Any suggestions? http://www.myspecialdog.com

Also, above this random image, Id like to say "Today's Special Dog is (nameofdog)"... how would I pull that from the database... I have nameofdog as File Title...

Kevin
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 #650 on: July 06, 2005, 11:51:26 pm »

Hello!

Great Mod! However, Im trying to use the RandomMedia function and it keeps pulling only one image from my gallery (of only 3). Currently I have it set for LastAddedMedia but Id like to use the random one. Any suggestions? http://www.myspecialdog.com

Also, above this random image, Id like to say "Today's Special Dog is (nameofdog)"... how would I pull that from the database... I have nameofdog as File Title...

Kevin


First, go to the latest dev version if you are not... the 1.4 stable release is imminent and will be exactly the same unless we find some bugs (which is just not possible)

Subtitle above is not possible... would you settle for for below the image?

$styleguide = array("subtitle" => "Today's special dog is %w");
$objCpm->cpm_viewRandomMediaFrom(1,1,"",$styleguide);

You also end up with the file extension on it though... I can probably fix that after the stable release (allow the basename)

Does that help?

Somewhere along the line I improved (with help) the randomization of things...  Forget if that was before the last stable or not.

Does that help?

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

kroberson

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #651 on: July 07, 2005, 01:08:54 am »

well, kinda... Im using CPMFetch v. 1.2.2. Is there a newer version than that? I am using CPG 1.3.3.

Unfortuantely the people's dog's names are attached to "File Title" and not the File Name. I didnt see any tags that allow for title... only name.

is this the reason its not randomizing?
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 #652 on: July 07, 2005, 01:51:35 am »

well, kinda... Im using CPMFetch v. 1.2.2. Is there a newer version than that? I am using CPG 1.3.3.

Unfortuantely the people's dog's names are attached to "File Title" and not the File Name. I didnt see any tags that allow for title... only name.

is this the reason its not randomizing?

Ah try super-secret-not-for-just-anyone-if-you-tell-anyone-you-will-pay    %t = picture title

I guess I just never added it into the docs... I suck at docs.  I just dont have any desire - although I am re-writing them into what will hopefully be something useful.  Sorry about the ommission

http://cpmfetch.fistfullofcode.com <- see the downloads section for 1.3.9
(Its got 100's of new things over 1.2.x)

Vuud




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

kroberson

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #653 on: July 07, 2005, 05:18:21 pm »

Great! I'll give that a shot!

Thanks
Logged

kroberson

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #654 on: July 07, 2005, 06:06:30 pm »

hmmm... well I upgraded to the new 1.3.9 version (which, by the way, you changed the coppermine.php to cpmfetch.php... caused some havoc on some pages but I figured it out  ;D)... the random is still having the "unrandom" features... check it out
http://www.myspecialdog.com on the spotlight at the right... keep refreshing and it pulls up the same every time. This is how Ive invoked the code. Do you see any mistakes?

Code: [Select]
<?php
include "/home/httpd/vhosts/myspecialdog.com/httpdocs/spotlight/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/spotlight');
$objCpm->cpm_viewRandomMedia ( 1, 1);
$objCpm->cpm_close();
?>

Thanks again for all your help!
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 #655 on: July 07, 2005, 10:15:36 pm »

hmmm... well I upgraded to the new 1.3.9 version (which, by the way, you changed the coppermine.php to cpmfetch.php... caused some havoc on some pages but I figured it out  ;D)... the random is still having the "unrandom" features... check it out
http://www.myspecialdog.com on the spotlight at the right... keep refreshing and it pulls up the same every time. This is how Ive invoked the code. Do you see any mistakes?

Code: [Select]
<?php
include "/home/httpd/vhosts/myspecialdog.com/httpdocs/spotlight/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/spotlight');
$objCpm->cpm_viewRandomMedia ( 1, 1);
$objCpm->cpm_close();
?>

Thanks again for all your help!

Yeah, I thought I mentioned it, but that must have been to someone else...  I put it in the release notes for the change, and the upcoming and added in a warning in the cftest...  good catch anyway.

The code as shown there looks good.  I just checked mine and my randomization seems okay.  I will check in there and see what is going on. 

Did you remove the coppermine.php file also?  The test shows its still there, but the test could be broken.  It does not matter since you are calling the right one, but you can remove it.

Otherwise you are on linux / apache / php which is what I develop on, so I am not sure why you would have problems and not me.  I will see...





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

kroberson

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #656 on: July 07, 2005, 10:25:58 pm »

yup... totally wiped out the old set of files and just uploaded these.

thanks!
Logged

HeavenlyCurious

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #657 on: July 07, 2005, 10:41:33 pm »

I get the following error:

CoppermineFetch Install test page

Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bnowpics/public_html../public_html/galleryindex//include/config.inc.php)

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

Fatal error: Call to a member function on a non-object in /home/bnowpics/public_html/cpmfetch/coppermine.php on line 648


I HAVE edited the cftest file. My gallery is stored in the galleryindex folder (../public_html/galleryindex), this addon CPMFetch, is installed in the CPMfetch folder (../public_html/cpmfetch). I edited the path into: ../public_html/galleryindex, but it still doesn't work. What am I doing wrong ?
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 #658 on: July 07, 2005, 11:16:28 pm »

I get the following error:

CoppermineFetch Install test page

Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bnowpics/public_html../public_html/galleryindex//include/config.inc.php)

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

Fatal error: Call to a member function on a non-object in /home/bnowpics/public_html/cpmfetch/coppermine.php on line 648


I HAVE edited the cftest file. My gallery is stored in the galleryindex folder (../public_html/galleryindex), this addon CPMFetch, is installed in the CPMfetch folder (../public_html/cpmfetch). I edited the path into: ../public_html/galleryindex, but it still doesn't work. What am I doing wrong ?


So the partialurl is set to "/galleryindex"

Also try version 1.3.9 from the web site... the test program is actually useful now, and that one will be stable in about 2 days anyway.  Its fine for use..

Mind you coppermine.php is now cpmfetch.php, so remove the old version :)





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

fogpeople

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #659 on: July 08, 2005, 01:40:27 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
Logged
Pages: 1 ... 29 30 31 32 [33] 34   Go Up
 

Page created in 0.042 seconds with 21 queries.