Author Topic: [Mod] Show original image in new window by clicking on button  (Read 11030 times)

0 Members and 1 Guest are viewing this topic.

Offline lukasinoooo

  • Newbie
  • *
  • Posts: 32
    • View Profile
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 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:

Offline germish

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: [Mod] Show original image in new window by clicking on button
« Reply #1 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.
Best Regards
Ralf, the Island Ape !

Offline cloe

  • Full Member
  • ***
  • Posts: 120
    • View Profile
Re: [Mod] Show original image in new window by clicking on button
« Reply #2 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?
Peace And Luv :)

--Cecilie--

http://www.cloevvold-photo.com

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [Mod] Show original image in new window by clicking on button
« Reply #3 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?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: [Mod] Show original image in new window by clicking on button
« Reply #4 on: August 08, 2007, 01:25:05 AM »
Just target _blank if use 100% image. Correct, no point with MOD.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline madynmalfi

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: [Mod] Show original image in new window by clicking on button
« Reply #5 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>