4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: lukasinoooo on May 19, 2006, 01:08:15 AM

Title: [Mod] Show original image in new window by clicking on button
Post by: lukasinoooo on May 19, 2006, 01:08:15 AM
Ok let's tray (my in english is  :roll: no comment) his MOD will let in detail page by clicking on the button, open new fullscreen window with bigger size image  8)
demo: http://aletapety.pl/img-aaliyah-621-aaliyah3800x600-17464.htm click on the (http://aletapety.pl/templates/default/images/full.gif) in page

Step 1
Download file from the attachment ,place in your catalogue frompictures (/images)



1. open /includes/functions.php file
1.1. Find:

"image_id" => $image_row['image_id'],

Replace with:

"image_id" => $image_row['image_id'],
"download_full" => $download_full,


1.2. Find:

    $download_button = "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />";

Replace with:

    $download_button = "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />";
    $download_full = "<img onClick=\"window.open('" . substr(MEDIA_PATH,2) . "/" . $image_row['cat_id'] . "/" . $image_row['image_media_file'] ."','new','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=800,height=600,top=50,left=50')\" src=\"".get_gallery_image("full.gif")."\" border=\"0\" alt=\"\" />";


1.3. Find:

    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";

Replace with:


    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
    $download_full = "<img onClick=\"window.open('" . substr(MEDIA_PATH,2) . "/" . $image_row['cat_id'] . "/" . $image_row['image_media_file'] ."','new','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=800,height=600,top=50,left=50')\" src=\"".get_gallery_image("full.gif")."\" border=\"0\" alt=\"\" />";




Now all you need is add {download_full} in details.html or if you want in thumbnail_bit.html  :wink:
Title: Re: [Mod] Show original image in new window by clicking on button
Post by: germish on October 04, 2006, 03:48:14 PM
I could have seen the point of this if there would be 3 different image sizes of a picture !!!
1. Thumbnail size = few KB
2. Enlargement size = KB according to size
3. Original size by click = KB size of the original photo.

YET this is NOT was is happening here.

2. and 3 are the same size in KB only displayed in different pixelsize.

So once you click on enlargement you already download the full picture size which is cropped back.
(If you right click and save this/edit on your PC you have the correct size anyway)

I fail to see the point of opening up the foto in another window, which by the way is not opening in fullscreen mode !!!

If you have a mod which actually would have a third REAL size which is saved with the DB record this would be far more helpful.
Title: Re: [Mod] Show original image in new window by clicking on button
Post by: cloe on July 30, 2007, 12:55:20 AM
This works... but there is something that im not happy with..
Is there a way to make the window thats pop up to be 100%. And display the pidture in the center horrisantly and vertically, with a black background.
And remove the code thats try to rezise the picture?
Title: Re: [Mod] Show original image in new window by clicking on button
Post by: son_gokou on August 08, 2007, 01:23:58 AM
This is good... but what's the point of showing in a new window the same size image?
Title: Re: [Mod] Show original image in new window by clicking on button
Post by: thunderstrike on August 08, 2007, 01:25:05 AM
Just target _blank if use 100% image. Correct, no point with MOD.
Title: Re: [Mod] Show original image in new window by clicking on button
Post by: madynmalfi on December 01, 2012, 06:57:22 AM
i've seen many mods for this but each mode have some problems :D ...
This might help you .. give it try ( i am sure its what you are looking for)..
This mod will let you make any size you want in the detail page but without resizing the picture + link or button to show full picture in new page..

demo: http://nice-cool-pics.com/img-aconcagua-hike%2C-argentina-4769.htm

lets start

step 1
open 4image/templates/your template/midia/jpg.html  
(i have just jpg in my site so i made changes in jpg) (if your images are all in jpg then chose jpg , if not then you have to change all the picture types you have)
Find
<img src="{media_src}" border="0" alt="{image_name}" width_height="" usemap="#navi" />
replace it with
<img src="{media_src}" border="0" alt="{image_name}" width="750" height="750" usemap="#navi" />
change width="750" and height="750" to your size that you want to show in detail page

step 2
open  4image/templates/your template/detail.php
add this in any place you want to show link to show the full size picture
<h2><a href="{media_src}">see fullsize</a></h2>