Image display Image display
 

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

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