Advanced search  

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

Pages: [1]   Go Down

Author Topic: Checking height of the image in theme.php  (Read 3654 times)

0 Members and 1 Guest are viewing this topic.

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Checking height of the image in theme.php
« on: August 28, 2009, 02:56:38 am »

Hi I"d like to check width and height and compare it to ger real width of picture.

There is {THUMB_CELL_WIDTH} to get width ( modificated in source code adding +2 )  but how to get high?

My CPG version 1.4.24
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Checking height of the image in theme.php
« Reply #1 on: August 28, 2009, 10:26:30 am »

Take a look at the functions compute_img_size($width, $height, $max) and getimagesize($filename)
Not sure what your actual question is, you should post more details (refer to board rules for the basics; posting what you actually want to accomplish might help as well as zipping your custom theme and attaching the zip). Not sure what the use of "checking" should be.
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Checking height of the image in theme.php
« Reply #2 on: August 28, 2009, 12:09:51 pm »

I'd like to compare width and height t0 get proper width of image ( I'd like to check that image is vertical or horizontal ) ( I'd like to have div below image the same width as image )


Code: [Select]
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" valign="top" align="center">
         <div>
<div align="center" style="width:{THUMB_CELL_WIDTH}px;"><a href="{ALB_LINK_TGT}">{ALB_LINK_PIC}</a></div>
    <div align="center" style="width:{THUMB_CELL_WIDTH}px; margin-left:1px; border-left:1px solid #9e9e9e; border-right:1px solid #9e9e9e; border-bottom:1px solid #9e9e9e; margin-bottom:10px;"><a href="{ALB_LINK_TGT}" style="color:#323030">{ALB_DESC}</a></div>
    <div>{ADMIN_MENU}</div>
    </div>
        </td>
<!-- END album_cell -->
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Checking height of the image in theme.php
« Reply #3 on: August 28, 2009, 01:37:45 pm »

I told you about board rules in my previous reply, so this is the final repetition:
you should post more details (refer to board rules for the basics; posting what you actually want to accomplish might help as well as zipping your custom theme and attaching the zip).
You haven't done as suggested and posted a link to your gallery. You haven't done as suggested and attached your custom theme. What anser do you expect?
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Checking height of the image in theme.php
« Reply #4 on: August 28, 2009, 08:03:37 pm »

Theme in zip, some gif files could missing. Gallery is actually in intranet so I couldn't give link
Logged

darkheartagram

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 25
Re: Checking height of the image in theme.php
« Reply #5 on: August 29, 2009, 12:20:24 am »

problem solved
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Checking height of the image in theme.php
« Reply #6 on: August 29, 2009, 12:19:35 pm »

This is the final reminder of board rules before getting banned.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.