Author Topic: Resize images on details page  (Read 11436 times)

0 Members and 1 Guest are viewing this topic.

Offline conflagration

  • Pre-Newbie
  • Posts: 2
    • View Profile
Resize images on details page
« on: October 13, 2009, 01:38:35 PM »
Hi community,

I just installed 4images and I really like the simplicity of the installation and configuration, but there's still one problem left: I want to use 4images to upload high quality photos, so I allow picture sizes up 10k x 10k pixels. Although I want people to be able to download the pictures in this high resolution, I want the pictures to be shown on the details page resized to a maximum with of 1000px. Is there a way to do this?

Thanks in advance,
Thomas

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: Resize images on details page
« Reply #1 on: October 13, 2009, 01:56:50 PM »
hi thomas...

yes - of course --- just use this small modifcation and you will be happy: http://www.4homepages.de/forum/index.php?topic=15680.0

greetz,
bergblume

Offline conflagration

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Resize images on details page
« Reply #2 on: October 13, 2009, 02:28:44 PM »
Hi bergblume,

thank you for your help. I took a look at the threat, and the solution there could be a compromise. But i would prefer something, that would do a server side resizing to avoid unnessecary traffic. I just want the "download" button to return the full size image.

Best regards,
Thomas

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Resize images on details page
« Reply #3 on: October 13, 2009, 03:04:38 PM »
hi Thomas and welcome to 4images forum ...

... for this you need some modifications, as described in the following tutorial ...
... [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=20496.0 ...
« Last Edit: October 14, 2009, 03:56:49 PM by mawenzi »
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Resize images on details page
« Reply #4 on: October 14, 2009, 03:22:28 PM »
hi Thomas and welcome to 4images forum ...

... for this you need some modifications, as described in the following tutorial ...
... [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=22030.0 ...

Hi mawenzi,

You pointed out the wrong url, I searched it and here is the correct url

http://www.4homepages.de/forum/index.php?topic=20496.0

Thank you so much for your post. It helped me out. Thanks :)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Resize images on details page
« Reply #5 on: October 14, 2009, 03:58:05 PM »
... you are right ... sorry ... I've corrected the link ...
... but remember ... with the resizing MOD you are loosing the exif-infos from your images ...
... but there are still other ways to show the exif-infos on the detail-page ...
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Resize images on details page
« Reply #6 on: October 15, 2009, 01:11:36 AM »
... you are right ... sorry ... I've corrected the link ...
... but remember ... with the resizing MOD you are loosing the exif-infos from your images ...
... but there are still other ways to show the exif-infos on the detail-page ...

Oops, is it ? Can you please kindly point me out, how to show exif-infos into the page for those resize images ? Because I really need exif-info and resize mods that's why. Thanks mawenzi.

With Regards,

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Resize images on details page
« Reply #7 on: October 15, 2009, 01:43:14 AM »
... the loosing of the exif-infos is not a 4images problem ... it's caused by using of the modul "GB Bibliothek" for resizing ...
... here some solutions to show exif-infos on detail-page by using resizing MOD during the image upload via browser / website-uploadform ...

1. by storing of the exif-infos during the upload process ...
    [MOD] EXIF V.1.7.6 Suchfelder Erweiterung : http://www.4homepages.de/forum/index.php?topic=21053.0 ...

2. by using of the big-folder solution ( storing of the original image in the big-folder ) and reading of the exif-datas from the "big"-image ...
    [TUT] One Image - Three Sizes : http://www.4homepages.de/forum/index.php?topic=20496.0 ...
    and then is to change the path to the big-images in the "exif function" in includes/functions.php ...

PS. I use solution No. 2 ... ;)
    
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

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: Resize images on details page
« Reply #8 on: October 15, 2009, 02:47:50 AM »
3. use ImageMagick instead of GD
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 apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Resize images on details page
« Reply #9 on: October 15, 2009, 03:48:21 AM »
Thanks for your quick responses. I gotta try and get back to you  :D . Thanks.

With Regards

=====================================================
Just Tested, everything works fine. Only just one thing, mawenzi , can you please kindly tell me which code do i have to change from the includes/functions.php to get exif info from big image ?

Thanks much.

With Regards
« Last Edit: October 15, 2009, 06:33:05 AM by apaunganhote »

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Resize images on details page
« Reply #10 on: October 15, 2009, 11:42:58 AM »
... in includes/functions.php ( e.g. vers. 1.7.7 ) find in section "function get_media_code" ...

if ($detailed_view && $image_info[2] == && function_exists('exif_read_data') && $exif_data = @exif_read_data($src'EXIF')) {


... and replace it for your new big-image path with the following ...

$src_big 
$site_sess->url(ROOT_PATH."data/media/".$cat_id."/big/".$media_file_name);
$src_exif = (!file_exists($src_big)) ? $src $src_big;
if (
$detailed_view && $image_info[2] == && function_exists('exif_read_data') && $exif_data = @exif_read_data($src_exif 'EXIF')) {


PS. : or use it similar, the part "EXIF" varies in the different 4images versions ... !
Your first three "must do" before you ask a question ! ( by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline blastarhymes

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Resize images on details page
« Reply #11 on: October 22, 2009, 01:53:29 PM »
was gonna say i had this problem but its fixed now :)
BBC Code: Clone Cash System

 

Post your comments here