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

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]

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.

peeps

I am working with the last release you had and everything seems to work great! However, I am getting broken images when it access only 1 particular album....

[31-Dec-2004 13:38:54] PHP Warning:  fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0023.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 146
[31-Dec-2004 13:39:41] PHP Warning:  fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0073.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 146
[31-Dec-2004 13:43:09] PHP Warning:  fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0271.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 152
[31-Dec-2004 13:44:29] PHP Warning:  fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0230.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 152


Any ideas?

Ah I figured it out....for albums where the intermediate picture is so small that there is no larger picture, there is no normal_imgxxxx.jpg.

That might be a tough one to figure out for the intermidiate picture call from cfimageget.php....

Like you may have to check for "normal_" and if it doesn't exist, display the "large" file.....

http://www.philpeeps.com/gallery/thumbnails.php?album=4

That is a link to my album that has only small 400x300 images....so only thumbnails and "large"...there is no intermediate file.....

vuud


Yo Peeps

I had no idea this condition would exist until last night when I tried viewing a larger version of a very wide image and there was none.  Didn't put that together with this until you mentioned it.  Thanks for the troubleshooting - saves me much agony... I can just fix it now

I am going to do some code tomorrow night and get this fixed and get the link to the intermediate page working.  Maybe fix some html formatting issues and I think there was one other thing - but I can't remember it right now.

Well happy new year to all... Promise a new release will be out late tomorrow (most likely) - maybe 0.9, maybe 1.0

Bill (Vuud) Chmura
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

Titooy

Maybe it's a stupid question but why does it write "Since XXX we've added about XX images" ?

peeps

Quote from: Titooy on January 01, 2005, 11:17:55 AM
Maybe it's a stupid question but why does it write "Since XXX we've added about XX images" ?
just go into the code and change it to what you want it to say.....

Titooy

Of course but my question is: Why is it "about"? isn't it an exact number?

kegobeer

Maybe because the person who coded it doesn't speak English as their first language.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Tranz

Well, the stats include the private albums, but the viewer might not have access to all those files, so it would make sense that the number is approximate. If it is exact and the viewer somehow figured out that they're not seeing all the images that are counted, then that could cause confusion.

vuud

Quote from: Titooy on January 01, 2005, 09:38:53 PM
Of course but my question is: Why is it "about"? isn't it an exact number?

Heh, all good answers...  The actual reasons are:

1) That part was never really redone after I created it for personal use

2) The tag line generated is going to be customized by you

3) When I was working with the date functions the PHP docs stated that depending on a few factors, the date could end up being off a little bit (based on when midnight fell) hence the "about" part.

4) I thought there was a forth, but it eludes me right now...

Gonna go fix everything now... will probably post something with all the fixes tonight


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

#108
... and there was much rejoicing

The files are attached to the original post here, or can be found on my web site.

http://forum.coppermine-gallery.net/index.php?topic=12679.msg57492#top

;D - Things fixed and added in this release


  • Bug in determining what file should be fetched
  • Sometimes small images dont have a normal_ version, just thumb and large
  • Sometimes large images dont have a large version, just normal and thumb
  • Link directly to page in albums - default and link as imagelink=int
  • Fix about xxx since problem - removed "about" :)
  • Cleaner HTML generated - probably wont clean it up too much more
  • The cpm_listMediaAddedOverLastDays() function now accepts an optionhash, but will only use style options of them.[\li]
Thanks to Peeps and KaptainKory for bug reports, suggestions and some code!

I hope this is all the bugs.  I have some things on my todo list I want to work in I can start on sometime soon, but won't do that until after the stable release is out (1.0)

??? Post any problems to this board.

Thanks

Bill "Vuud" Chmura

PS. KaptainKory: Hope the html is clean enough for you - fixing that actually forced me to get rid of some ugly raw html sections in my code.  so thanks!


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

Now, when using cfimageget.php, i get teh following errors when getting a broken image...

error_log[02-Jan-2005 10:02:57] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:02:57] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:26] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:26] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:30] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:30] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:52] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:52] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:05:05] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:05:05] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143


cfimageget.last.jpg:/home/philpeep/public_html

Everything else is still working fine from what I can tell.

vuud


hah!  there is always something. 

Can you do a "view image" from your web browser and see if it gives you any other warnings and outputs?  I will be back in later today and will see what happened to it.

(I think I know what it is)

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

peeps

Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143

vuud

Quote from: peeps on January 02, 2005, 09:29:10 PM
Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143


Hey Peeps,

I cant replicate it here, and I even tried a small image that did not have a normal_ version,  But I did find a few potentials in the code (things that could have broken it) and make some changes / enhancements.  Here is a new version - I am not posting it on the front page as I can't be sure it will fix your problem.  Let me know how it works out:

Hope this works!

(note: attachment removed and added to original post until it becomes irrelevant)

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 January 03, 2005, 04:55:25 AM
Quote from: peeps on January 02, 2005, 09:29:10 PM
Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142

Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143


Hey Peeps,

I cant replicate it here, and I even tried a small image that did not have a normal_ version,  But I did find a few potentials in the code (things that could have broken it) and make some changes / enhancements.  Here is a new version - I am not posting it on the front page as I can't be sure it will fix your problem.  Let me know how it works out:

Hope this works!



I updated and refreshed my test file ~100 times with no errors...

Looks good! Thanks!

vuud

Fantastic...

Sorry for that bug... Until you came along I had no idea that coppermine did that!  You've been a great help - I appreciate the patience

Let me know if other strangeness occurs or you think of anything good for the next version :D

Vuud

PS. For all that care: The 0.9.1 release fixed this problem - and is the newest download on the original post in this thread
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

NEOo

Hi all

I dont know if im in the right section of the forum, if not please move it  :P. MOVED  8)
Im using coppermine fetch, i use the <?php $objCpm->cpm_viewRandomMedia(5,1); ?> script.
and the standerd align is left and i want it center or right.

does someone know how to do that??

vuud

#116
Quote from: NEOo on January 04, 2005, 01:52:16 PM
Hi all

I dont know if im in the right section of the forum, if not please move it  :P. MOVED  8)
Im using coppermine fetch, i use the <?php $objCpm->cpm_viewRandomMedia(5,1); ?> script.
and the standerd align is left and i want it center or right.

does someone know how to do that??

I guess this was moved here...  So yes, there are a few things you can do to solve this.

First:  The first real release (1.0) in a few days will provide centering as the default... A quess it makes sense instead of forcing everyone to override it.  Not much more is changing in it till after that.

Second: The way you can do it now is through CSS and the options hash.  This is the way I originally envisioned all the formatting and style to be controlled (hence the lack of an align tag).   For example:


<style type="text/css"> .photoclip {  text-align:center; }  </style>

<?php $objCpm->cpm_viewRandomMedia(5,1, array("cellstyle" => "photoclip")); ?>


This will insert a class tag into the td entry that will make it go to whatever alignment you want.  This also opens up a whole world of borders, padding, etc...  There are options for tables, headers, cells, rows, images, links, etc...

Disclaimer:  I am not up on CSS as much as I'd like to be so if I am wrong or anything - someone please tell me!

Hope this gets you where you want to go.  ;D

Bill

PS. If anyone has done anything interesting with the CSS for this, or with CoppermineFetch in particular - let me know!  ;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

dale

Hi, looks like a great script. Im having this error though.
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html//cpgfetch/coppermine.php on line 371

I am using CPG 132. with the invisionboard bridge. I have tried to show images in my forum portal as well as on a test page and get the same error.

Here is my testpage script. I need it to be in one script for my potal page. my test page is outside of the gallery and cpgfetch folders.
<?php 
include "gallery/include/config.inc.php";
include 
"cpgfetch/coppermine.php";
$objCpm = new cpm($mysql_dbname$mysql_host$mysql_username$mysql_password$cpm_mysql_tableprefix$urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>


I also get the following error when going to the cfimageget.php file on my site.
Error in getImageTouse: Extension (strtolower): .jpg Fileprefix: thumb_ Fileinfo: userpics/10002/ CIMG0030.JPG
Warning: Cannot modify header information - headers already sent by (output started at /home2/barstone/public_html/potaid/cpgfetch/coppermine_dao.php:319) in /home2/barstone/public_html/potaid/cpgfetch/cfimageget.php on line 118

Warning: Cannot modify header information - headers already sent by (output started at /home2/barstone/public_html/potaid/cpgfetch/coppermine_dao.php:319) in /home2/barstone/public_html/potaid/cpgfetch/cfimageget.php on line 119


Thanks for any help, Dale.
Im not a complete idiot... Some parts are missing.

vuud

Lets take these one at a time...

Quote from: dale on January 05, 2005, 02:49:20 AM
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html//cpgfetch/coppermine.php on line 371

...snip...

Here is my testpage script. I need it to be in one script for my potal page. my test page is outside of the gallery and cpgfetch folders.
<?php 
include "gallery/include/config.inc.php";
include 
"cpgfetch/coppermine.php";
$objCpm = new cpm($mysql_dbname$mysql_host$mysql_username$mysql_password$cpm_mysql_tableprefix$urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>


..snip...

Thanks for any help, Dale.

If you have one of the newest versions (a recent dev version) then the configuration you have above will not work.  Ironically I changed that because it was hard to use.  That also probably means my docs are wrong somewhere (and out of date).  I shall go and find the errant documentation and fix it. 


<?php 
error_reporting
(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

include "cpgfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>



Now this assumes that where ever this page is, the cpgfetch directory is under it.  The new two lines at the top are strictly for troubleshooting and will force errors to be displayed no matter what the server error reportings are set too.

I am going to look at the cfimageget problem you reported next

Have a nice day!   ;D

Update:  I was just looking at your profile to find your coppermine site to try to figure it out.  if you are doing this on the site you have listed (storm riders) then your installation is at /cpg not /gallery.  So above it should be:

$objCpm = new cpm('/cpg');

If this is the case




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

The saga continues...

Quote from: dale on January 05, 2005, 02:49:20 AM
I also get the following error when going to the cfimageget.php file on my site.
Error in getImageTouse: Extension (strtolower): .jpg Fileprefix: thumb_ Fileinfo: userpics/10002/ CIMG0030.JPG


Hmmm, I guess I have to ask if you are on the latest version (see first post in this thread).  and also, if you can check via ftp that you do have a file:  /gallery/albums/userpics/10002/thumb_CIMG0030.JPG

The header errors are normal once things are broke, so we can ignore those.  In the latest version of the program the only way to get that error is if all three of these fail:

1) The file and size that you want (in this case: thumb_CIMG0030.JPG) does not exist
2) If it does not and you wanted an intermediate, it gives a large
3) If it does not and you wanted a large it gives an intermediate.

So you must have wanted a thumbnail, but it can not be found.

I fixed some code after 0.9 was out (hence the last one) that could be causing this problem.  Can you make sure you are at 0.9.1?  See the first post in this thread for download

Later

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