Author Topic: pictures in landscape style and portrait style  (Read 6236 times)

0 Members and 1 Guest are viewing this topic.

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
pictures in landscape style and portrait style
« on: September 25, 2006, 05:24:53 PM »
Hello,

in default, all pictures in my site are shown in portrait-style ( vertical).

This is de code in the jpg.html file that makes they are shown that way :

<!-- Template file for JPG Files -->
<img src="{media_src}" border="0" title="{image_name}" alt="{image_name}" width="310" height="437" />
<br>

but how can i show my pixtures that are made in "landscape-style", horizontal ?

the code for these pics should be like
<img src="{media_src}" border="0" title="{image_name}" alt="{image_name}" width="437" height="310" />

Thx for any Help.






Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: pictures in landscape style and portrait style
« Reply #1 on: September 26, 2006, 12:55:40 AM »
why would you hard code the dimentions? use {width_height} tag instead...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: pictures in landscape style and portrait style
« Reply #2 on: September 26, 2006, 08:23:54 PM »
all my pics have the same proportions

some widht="610" height="875"
some widht="875" height="610"

i don't want to show them real size (=too big) on screen.
i want to show them 1/2 their size

so
width="310" height="437"
or
width="437" height="310"

if i use {width_height}, i see the real proportions, and that's too big.

Is there a solution for this ?

thx a lot.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: pictures in landscape style and portrait style
« Reply #3 on: September 27, 2006, 12:37:16 AM »
try this:
Code: [Select]
<?php
if ($this->val_cache['width'] > $this->val_cache['height'])
{
?>

<img src="{media_src}" border="0" title="{image_name}" alt="{image_name}" width="437" height="310" />
<?php
}
else
{
?>

<img src="{media_src}" border="0" title="{image_name}" alt="{image_name}" width="310" height="437" />
<?php
}
?>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline kief24

  • Sr. Member
  • ****
  • Posts: 267
    • View Profile
Re: pictures in landscape style and portrait style
« Reply #4 on: September 27, 2006, 06:40:51 AM »
do i put this in jpg.html ?
because if i do so, i get a blank details.html page.