Author Topic: Immediate Image  (Read 13774 times)

0 Members and 1 Guest are viewing this topic.

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Immediate Image
« on: December 30, 2008, 03:38:43 AM »
Hi

I like this software very much but I have a slight problem.

I have images with big dimensions some being over 6000 pixels and when I upload these they show up way to big. Is there a way of resizing them so they show up at say 500x400 for example but when downloaded they have there original dimesions. If I use the Auto Resize mod when downloaded they don't have there original dimensions.

Hope this is clear :lol:

Offline alekinna

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Gallery of cross-stitching
Re: Immediate Image
« Reply #1 on: December 30, 2008, 04:29:55 AM »

Offline MikeK

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: Immediate Image
« Reply #2 on: December 30, 2008, 12:53:05 PM »
Hi ;)

You only have to do this:

in \templates\default\media\jpg.html

you must edit to this

Code: [Select]
<!-- Template file for JPG Files -->
<!-- <img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br /> -->
<img src="{media_src}" border="1" alt="{image_name}" width="640" /><br />

I've remarked the original line with <!-- .......... -->

The width "640" or "800" works perfect and you dont have to say the height!

If you are uploading PNG or GIF in such dimensions you have to do the same mod for png.html and gif.html

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Immediate Image
« Reply #3 on: December 30, 2008, 04:29:40 PM »
Thanks man, thats works perfect 8)

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #4 on: December 30, 2008, 04:39:12 PM »
Hi,

but with this solution you become a problem with smaller images than e.g.: "640 px"  :?

Use this code:
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}" style="max-width: 640px; width: expression(this.width > 640 ? 640: true);">

Kurt

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Immediate Image
« Reply #5 on: December 30, 2008, 04:41:51 PM »
Do I put this in the same file jpg.html?

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #6 on: December 30, 2008, 04:48:08 PM »
yes, replace all code from jpg.html with the posted code

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Immediate Image
« Reply #7 on: December 30, 2008, 04:52:29 PM »
Thank you, I know I shouldn't ask here but how do I remove the time after the date i.e.

30.12.2008 10:48

And change to

30.12.2008 :)

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #8 on: December 30, 2008, 04:56:17 PM »
in ACP/Setting
delete here in the "time format" the H:i
and save it

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Immediate Image
« Reply #9 on: December 30, 2008, 04:57:57 PM »
Thanks man for all you help :)

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #10 on: December 30, 2008, 04:59:53 PM »
you welcome  :wink:

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: Immediate Image
« Reply #11 on: December 31, 2008, 05:04:20 AM »
If I'm not mistaken expression() would only work in IE browser (?)

you can use PHP code in templates which will work in any browsers:
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}" <?=(intval("{width}")>640?'width="640"':'');?>>
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 KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #12 on: December 31, 2008, 08:41:04 AM »
Hi,

i use my code in my mods and i have no problems with IE, FF and Opera   8O

Kurt

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: Immediate Image
« Reply #13 on: December 31, 2008, 08:57:41 AM »
just googled some more and all I could find that expression() is only for IE..
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 KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Immediate Image
« Reply #14 on: December 31, 2008, 10:00:42 AM »
http://4images.malediven-bilder.de/details.php?image_id=185
http://4images.malediven-bilder.de/details.php?image_id=185&l=English
it is working?
The image is resize with "expression()"
The orig size is open with a link under the smal image

Kurt