coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: dwo on June 25, 2008, 12:52:43 PM

Title: Image display
Post by: dwo on June 25, 2008, 12:52:43 PM
Hi.

Solution for displaying a 2x2 grid of lastuploaded pics, original size, downsized 50%, out of a specific category with css formatting:


<style type="text/css">
table.thomepage {
with:945px;
          height:650px;
          rules:none;
          border: thin solid rgb(232, 232, 232);
          border:1;
          margin-top: -5px; }
td.chomepage { text-align: center; }
img.ihomepage {width:50%; height:50%; border:0;}
</style>


<?php
  
include_once "cpmfetch.php";
  
$objCpm = new cpm("cpmfetch_config.php");
   
$options = array(
"imagesize" => "large",
"tablestyle" => "thomepage",
         
"cellstyle" => "chomepage",
         
"imagestyle" => "ihomepage",
);
  
$objCpm->cpm_viewLastAddedMedia(22$options);
  
$objCpm->cpm_close();
?>



Unfortunateyl IEXploder does not like the code at all and messes all up.

Any help appreciated.

reagrds, Dietmar

Title: Re: Image display
Post by: dwo on June 25, 2008, 03:14:46 PM
Something to add: Do not use the height command in css, as this is the problem with IE.

Also soltution to this thread:  http://forum.coppermine-gallery.net/index.php/topic,53456.0.html

regards, Dietmar
Title: Re: Image display
Post by: dwo on June 25, 2008, 05:01:51 PM
Again, not optimal.

If you have portrait oriented pics, then better skip the width command and just use the height command.

reagrds, Dietmar