Author Topic: Image in Detail View  (Read 5018 times)

0 Members and 1 Guest are viewing this topic.

Offline sunl

  • Newbie
  • *
  • Posts: 20
    • View Profile
Image in Detail View
« on: August 05, 2010, 02:13:26 PM »
Hello Everyone

I try this script, its really nice. But i have a problem which i want to solve.

In detail page :- If image size is bigger it distort the screen and Horizontal Scrollbar appears.

I wanna knows, Is anyone know how to fix this thing, So that image size remain small like

eg: 600 x 500px or 700 x 600px but image remain original when someone download it like (1920 x 1200). Actually i try image resizer but it is

different thing it resize original Image instead screen image. I search forum but not able to find solution.

Please Help if you can

Thanks

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: Image in Detail View
« Reply #1 on: August 05, 2010, 03:10:18 PM »
Hello and welcome to 4images forum.

In templates/<your template>/media/jpg.html template use this this line:
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}" style="max-width: 640px; width: expression(this.width > 640 ? 640: true);">(referrence)

Change 640 to the maximum image width.
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 kubiczek

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • Gross Peterwitz
Re: Image in Detail View
« Reply #2 on: August 05, 2010, 03:30:51 PM »

Offline sunl

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Image in Detail View
« Reply #3 on: August 05, 2010, 08:23:17 PM »
Thanks for reply. But here is little problem. With this code script resized and fit in window but image still as like as it before means huge 1920 x 1200 size. It should be 640 px.


Offline sunl

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Image in Detail View
« Reply #5 on: August 07, 2010, 01:24:56 PM »
I try all codes which all of you suggested but all of these codes not working. Peview Picture still shows original size of 1600 x 1200 instead 640px. The big size of template ruin the whole beauty of template. Template should be fit in computer window. But it distorted due to big preview size. :(

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: Image in Detail View
« Reply #6 on: August 07, 2010, 04:30:43 PM »
Can I see it?
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 sunl

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Image in Detail View
« Reply #7 on: August 07, 2010, 04:42:42 PM »
OK Guys I figured it out, what was wrong. Actually I was trying to edit jpg.html file directly from ACP ( Admin Control Panel). When i edit it. Its create jpg.html file outside ( media/) folder and every time it takes me there. When i place V@nu code through filemanager (from Hosting Control Panel) its Work Fine.

Thanks everyone for help.