Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Image display  (Read 4395 times)

0 Members and 1 Guest are viewing this topic.

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Image display
« 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:

Code: [Select]
<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

Logged

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Re: Image display
« Reply #1 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
Logged

dwo

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 143
Re: Image display
« Reply #2 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
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.