coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: santosh_iit32 on January 11, 2007, 02:34:02 PM

Title: resize thumbnail height in my homepage
Post by: santosh_iit32 on January 11, 2007, 02:34:02 PM
this code is what I found to resize the height of the thumbnail but of no use!! coudl anyone help me with the modification. i searched but couldn't help.

<?php 
include "cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_formatStats("%<b>Our galleries hold %f photos in %c categories & %a albums having served %v views<br></b>");
print 
"Last photos uploaded:";
$options = array( 'imageheight' => '75');
$objCpm->cpm_viewRandomMedia (2,4);
$objCpm->cpm_close();
?>
Title: Re: resize thumbnail height in my homepage
Post by: vuud on January 11, 2007, 03:12:21 PM
Quote from: santosh_iit32 on January 11, 2007, 02:34:02 PM
this code is what I found to resize the height of the thumbnail but of no use!! coudl anyone help me with the modification. i searched but couldn't help.

<?php 
include "cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_formatStats("%<b>Our galleries hold %f photos in %c categories & %a albums having served %v views<br></b>");
print 
"Last photos uploaded:";
$options = array( 'imageheight' => '75');
$objCpm->cpm_viewRandomMedia (2,4);
$objCpm->cpm_close();
?>


What example are you using?

It should be:

$objCpm->cpm_viewRandomMedia (2,4,$options);

Please let me know where the example is wrong, or if you have just been careless.








Title: Re: resize thumbnail height in my homepage
Post by: santosh_iit32 on January 11, 2007, 05:51:41 PM
i copied from one of the topics here and I just can't find it anymore! and i'm running out of time. Could you please give me a sample as to how I could do this... meanwhile I will also search for this code which would resize the thumbnails at constant height and width. Thank you for the reply.
Title: Re: resize thumbnail height in my homepage
Post by: vuud on January 11, 2007, 09:31:04 PM
Quote from: santosh_iit32 on January 11, 2007, 05:51:41 PM
i copied from one of the topics here and I just can't find it anymore! and i'm running out of time. Could you please give me a sample as to how I could do this... meanwhile I will also search for this code which would resize the thumbnails at constant height and width. Thank you for the reply.

I posted the solution above... you cannot standardized to a constant height and width.  You can only have one.  You can tell it to do a height and width, but your pictures will be squished or stretched.  Think about it.

Don't worry about where you found it, as long as its not in the documentation like that.

Title: Re: resize thumbnail height in my homepage
Post by: santosh_iit32 on January 12, 2007, 01:55:51 PM
i dont mind having the pictures will be squished or stretched. I want to have a constant height.
Title: Re: resize thumbnail height in my homepage
Post by: vuud on January 12, 2007, 03:30:27 PM
Quote from: santosh_iit32 on January 12, 2007, 01:55:51 PM
i dont mind having the pictures will be squished or stretched. I want to have a constant height.

Well.. its your funky looking web page:

$options = array( 'imageheight' => '75', 'imagewidth' => '75');

That will do the height to 75 and width to 75