Stumped Stumped
 

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

Stumped

Started by MarkP, November 03, 2006, 05:15:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MarkP

I am trying to resize the size of the thumbnails displayed on my front page. My site: http://www.opshots.net

The code I am trying to use:
<?php 
include "cpmfetch/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:";
$styleguide = array("imagestyle" => "test1""linkstyle" => "test1","imagewidth" => "200","imageheight" => "200");
$objCpm->cpm_viewLastAddedMediaFromAlbum (1,3"cat=1,7,11,14,$styleguide");
print 
"Some Random photos:";
$objCpm->cpm_viewRandomMediaFromAlbum (1,3"cat=1,7,11,14,$styleguide");
$objCpm->cpm_close();
?>


Now everything works good except it does not set the size of the thumbnail at all. I must be missing something obvious

vuud

Quote from: MarkP on November 03, 2006, 05:15:45 PM
I am trying to resize the size of the thumbnails displayed on my front page. My site: http://www.opshots.net

The code I am trying to use:
<?php 
include "cpmfetch/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:";
$styleguide = array("imagestyle" => "test1""linkstyle" => "test1","imagewidth" => "200","imageheight" => "200");
$objCpm->cpm_viewLastAddedMediaFromAlbum (1,3"cat=1,7,11,14,$styleguide");
print 
"Some Random photos:";
$objCpm->cpm_viewRandomMediaFromAlbum (1,3"cat=1,7,11,14,$styleguide");
$objCpm->cpm_close();
?>


Now everything works good except it does not set the size of the thumbnail at all. I must be missing something obvious


Take a close look at your function call... especially the part starting with "cat= .... through the ");

Hint: your attempting to combine two parameters into one... Your styleguide is being ignored.

Also, careful with forcing height AND width... if they are not perfectly square to start with, they will be distorted.  I'd choose one and not do the other...

Vuud

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

MarkP

Thanks for pointing me to the right area....may I post the code that worked? If so here it is:

<?php 
include "cpmfetch/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( 'imagewidth' => '120');
$objCpm->cpm_viewLastAddedMediafrom (1,3,"cat=1,7,11,14",$options);
$objCpm->cpm_close();
?>

vuud

Quote from: MarkP on November 03, 2006, 11:03:11 PM
Thanks for pointing me to the right area....may I post the code that worked? If so here it is:

<?php 
include "cpmfetch/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( 'imagewidth' => '120');
$objCpm->cpm_viewLastAddedMediafrom (1,3,"cat=1,7,11,14",$options);
$objCpm->cpm_close();
?>


Excellent! 

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