Image display Image display
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Image display

Started by dwo, June 25, 2008, 12:52:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dwo

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


dwo

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

dwo

Again, not optimal.

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

reagrds, Dietmar