coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: darkheartagram on August 28, 2009, 02:56:38 AM

Title: Checking height of the image in theme.php
Post by: darkheartagram 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
Title: Re: Checking height of the image in theme.php
Post by: Joachim Müller on August 28, 2009, 10:26:30 AM
Take a look at the functions compute_img_size($width, $height, $max) and getimagesize($filename) (http://de.php.net/manual/en/function.getimagesize.php)
Not sure what your actual question is, you should post more details (refer to board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.0.html) 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.
Title: Re: Checking height of the image in theme.php
Post by: darkheartagram 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 )


<!-- 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 -->
Title: Re: Checking height of the image in theme.php
Post by: Joachim Müller on August 28, 2009, 01:37:45 PM
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 (http://forum.coppermine-gallery.net/index.php/topic,55415.0.html) 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?
Title: Re: Checking height of the image in theme.php
Post by: darkheartagram 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
Title: Re: Checking height of the image in theme.php
Post by: darkheartagram on August 29, 2009, 12:20:24 AM
problem solved
Title: Re: Checking height of the image in theme.php
Post by: Joachim Müller on August 29, 2009, 12:19:35 PM
This is the final reminder of board rules (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270631.html#msg270631) before getting banned.