CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 3 CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 3
 

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

Main Menu

CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG

Started by vuud, December 17, 2004, 10:19:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vuud

Quote from: n3n on December 20, 2004, 11:10:50 AM
new cpm('coppermine', 'localhost'

did it like that and so on, is that what you meant ? got a whole load of errors with that.


No, that line should now read

$objCpm = new cpm('coppermine', 'localhost', 'root','XXXXXXXX', 'cpg132_', '/grafflix');

You need to replace the XXXX with your password (inside the quotes).  Otherwise the error I am seeing on test.php is some sort of syntax error.  If you do the above then please post the exact code you have again. 
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

n3n

ooh, major breakthrough, got a pic :D still getting few error lines though, checkout test.php

vuud


Okay, thats probably something I need to fix on this end.  I have a few other things I need to take care of and then I will fix that and let you know to update to it.

I am thinking I had the error levels too high on my test box so I did not get those... my bad.

Glad to see you are getting pics!  Brings me great joy and relief.

;D

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

n3n


vuud

okay, there is a new version up on the site that eliminates all the errors,  my bad.

give that a whirl....

Since your thumbnails are so small, would you like to have an option to show normal size instead of just thumbnails?

Have a nice day

;D
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

n3n

Yea that would be a nice function :D

tnx for the new version, gonna test it right away

vuud


Okay, I have a few things I want to roll into a new version... That will be one of them then.

In the one you downloaded there is another file called cfimageget.php - that one is there so that you can get a random image from an html page via the img tag

<img src="url/cfimageget.php" />

But its only good for one image at a time and the code is still very *new*.

It will probably be a day or two, but I should have the new featues worked out and documented.  Plan is also to change the stylehash to an optionshash - that can contain style information amongst neat new features.

More on this later

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

n3n

tnx for the new version, tested it and get 0 errors with all_error enabled in php.ini :)

also gonna give the html thingie a try, first finding out how to position the images on a page.

peeps

It seems to work if I comment out this line:

header ("Content-Length: " . filesize($filetoget));

As soon as I uncomment, I just get a broken image (red x).

Also, it seems to display a broken image (red x) when it trys to display a pic from a private gallery...

http://www.philpeeps.com/wp/test.php

refresh it a bunch and you will see what I mean.

It would also be helpful to allow it to be a link to that picture.....

vuud


Okay, the cfimageget.php is still kind of under development.  So bear with me - I am glad someone is trying it though... it helps,

Well, you've hit some items that are still in the ironing out stage.

* None of the code here will allow a gallery marked private to be displayed.  So unless you have it marked as viewable by the public, you will not get an image back.

* If it can't return an image then you get the broken image, because your image tag did not get an image back.  It made sense to me at the time, but perhaps I should have it return a transparent pixel or something.  What do you think?  I'm open to suggestions here.  It will probably end up being a programmable behavior.

The private gallery thing is going to be overrideable.  Just have to work it in (I don't have any so the whole private gallery thing snuck up on me at the last momemt)

The filesize line seems to work here... I will tamper with it some more and maybe comment it out until I can determine why it is breaking for you.  Are you on a linux / apache / php combo?

Thanks for playing

;D




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

peeps

Quote from: vuud on December 21, 2004, 03:13:12 AM

Okay, the cfimageget.php is still kind of under development.  So bear with me - I am glad someone is trying it though... it helps,

Well, you've hit some items that are still in the ironing out stage.

* None of the code here will allow a gallery marked private to be displayed.  So unless you have it marked as viewable by the public, you will not get an image back.

* If it can't return an image then you get the broken image, because your image tag did not get an image back.  It made sense to me at the time, but perhaps I should have it return a transparent pixel or something.  What do you think?  I'm open to suggestions here.  It will probably end up being a programmable behavior.

The private gallery thing is going to be overrideable.  Just have to work it in (I don't have any so the whole private gallery thing snuck up on me at the last momemt)

The filesize line seems to work here... I will tamper with it some more and maybe comment it out until I can determine why it is breaking for you.  Are you on a linux / apache / php combo?

Thanks for playing

;D
IMO, I think if it tries to get a private image, it should loop until it gets a public image.

Currently, I have a script outside of cpg that returns an image with a link to that image but does not obey album permissions, so I am very intersted in getting yours to work....

Keep it up!

vuud


Oh no, you misunderstand me...  The only way to get into the situation of getting a private image is if you specifically request an album id that is private.  The queries it does will never return any image from a private album... no way no how.

As for returning a link, I am not sure how to do this.  The normal php calls can do this easily, but from a straight html page I don't know if it is reliably possible.

Hmmmm

What kind of media do you have in your gallery?  just jpg mostly?
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

peeps

just jpeg and 1 video....

wonder why i get the broken images if it cannot request private galleries....

my code is the minimum....

<img src="http://www.philpeeps.com/gallery/CoppermineFetch/cfimageget.php" />

vuud

I did some more work on it tonight and posted a dev version for you to download.  There are a few things you should know.

Download from here:
http://cpmfetch.fistfullofcode.com
(Look for the lastest dev version in the download area)
[this has been edited due to a broken link from here]

I was not able to reproduce the error here, but I have only jpegs.  I will try putting in some videos and filtering them out.  The code is simple, so I am guessing that it is getting your video. 

The version of cfimageget.php has a new var named $debug at the top.  When set to true, it will attempt to create a file in the same directory each time it serves an image.  I had to change my file perms to allow it on my server, so if you get it on yours then please relax the file permissions temporarily in that directory.

Once installed, keep hitting the code until you get the broken image.  Then look in the file:  "cfimageget.last" I think that was the name anyway.  it should have a line of data in it (only one) with the extention and then the file it tried to serve.  let me know what that was.

Sorry for the issues, but the code is really new and I am still getting over it.

Also, the default if you dont request a size now is the thumbnail size. 

Bill



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

Quote from: n3n on December 20, 2004, 09:21:50 PM
Yea that would be a nice function :D

tnx for the new version, gonna test it right away

The development version now will take an extra parameter in the stylehash called imagesize.  That can be:

thumb, int, large

It will cause the program to return back a larger or really big image.

Here is an example

<?php
   $styleguide = array(
      "alttag" => "One of the last photos submitted",
      "imageSIZE" => "large");

$objCpm->cpm_viewRandomMedia(1,1,$styleguide);
?>

Download from here:
http://cpmfetch.fistfullofcode.com  - look in the download section
You can play with it if you want or wait till its all done.

See ya

Bill
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

tedd

Heyy, when i'm jusing your code for the random image or any other code im getting this error:
Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 67

Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 140

Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 88


And i would like to have a counter on my website (outside the gallery). Your counter only shows:  xx pictures. Correct me if im wrong!

I want to have this on my site: "171 files in 7 albums with 17 comments viewed 6520 times"

cxprod


I really want to use the last added media syntax...
the thing is...
I have one category full of wmv files...
when i put the include on my page it came up with just the alt text

i put up a test album with a few jpg files and it worked... since the jpgs were the last added media

so.... do you think you'll be able to call the thumbs from the video files? and link them to the page with the video.. or the album with the video...

and if not... is there a way to call last added media from a certain category... I already played with a few different versions of the include and i kept getting errors...
such as..

<?php $objCpm->cpm_viewLastAddedMediaFromCategory(1,1,2) ?>


Great job with this btw!!!!! I love it already

n3n

tedd checkout the new version he posted on his website, it doesnt give any errors.

n3n

and vuud, tnx for the work, gonna give it all a go when im done with school.

tedd