Checking height of the image in theme.php Checking height of the image in theme.php
 

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

Checking height of the image in theme.php

Started by darkheartagram, August 28, 2009, 02:56:38 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

darkheartagram

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

Joachim Müller

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.

darkheartagram

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 )


<!-- 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 -->

Joachim Müller

I told you about board rules in my previous reply, so this is the final repetition:
Quote from: Joachim Müller on August 28, 2009, 10:26:30 AMyou 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?

darkheartagram

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


Joachim Müller

This is the final reminder of board rules before getting banned.