4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on December 24, 2002, 08:43:33 PM

Title: [Mod] Show original image in new window by clicking on image
Post by: V@no on December 24, 2002, 08:43:33 PM
Works with all 4images versions

This MOD will let in detail page by clicking on the image, open new fullscreen window with bigger size image (new window will be closed by clicking on mouse buttons).
NOTE:
1. This MOD doesnt resize or do anything with images, and u'll need upload "big/original" images manualy.
2. Because its open new window with no html code, it will show on top of the window FULL PATH to the image :( and if u use some download manager it may start downloading the image instead of showing it.
3. It works only with images, that doesnt requre media icons.
4. "Big/original" images filename must be the same as the image filename.
5. If u deleted picture from the site (as admin), "big/original" picture will stay there, u'll need delete it manualy.
6. There is no control by user permissions for viewing "big/original" images, means that the script will create a link to the popup window if it find "big/original" file for the picture.

INSTALLATION:
1. open /includes/functions.php file
1.1. find:
Code: [Select]
   $path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id : MEDIA_TEMP_PATH) : (($cat_id) ? THUMB_PATH."/".$cat_id : THUMB_TEMP_PATH))."/".$file_name;
    return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $path) : $return_code;
Replace with:
Code: [Select]
   $path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id : MEDIA_TEMP_PATH) : (($image_type == "big") ? MEDIA_PATH."/".$cat_id."/big" : (($cat_id) ? THUMB_PATH."/".$cat_id : THUMB_TEMP_PATH)))."/".$file_name;
    return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $path) : (($image_type != "big") ? $return_code : "");
1.2. Find:
Code: [Select]
   "image_file_name" => $image_row['image_media_file'],
Add after:
Code: [Select]
   "media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1),
1.3. Find:
Code: [Select]
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0) {Replace with:
Code: [Select]
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $big = 0) {
1.4. Find:
Code: [Select]
   $media_src = get_file_path($media_file_name, "media", $cat_id, 0, 1);Add after:
Code: [Select]
   $media_src_big = get_file_path($media_file_name, "big", $cat_id, 0, 1);1.5. Find:
Code: [Select]
   $media = $site_template->parse_template("media/".$file_extension);Replace with:
Code: [Select]
   $media = ((!$big) ? ($site_template->parse_template("media/".$file_extension)) : $media_src_big);1.6. At the end of the file before
Code: [Select]
?>Add this:
Code: [Select]
function check_remote_big($remote_media_file) {
  global $config;
  return (preg_match("#^(https?:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $remote_media_file)) ? 1 : 0;
}
function check_local_big($local_media_file) {
  global $config;
  return (preg_match("#^((\.)*\/.*?\.(".$config['allowed_mediatypes_match'].")$)#is", $local_media_file)) ? 1 : 0;
}
function check_big_type($file_name) {
  global $config;
  return (in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 1 : 0;
}


2. Open details.html template
2.1 Find:
Code: [Select]
{image}Replace with:
Code: [Select]
{if media_src_big}
    <script type="text/javascript">function openpopupbig(big){var popurl="{media_src_big}";settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                  
                  <a class="big" href="javascript:openpopupbig('big')">{endif media_src_big}
   {image}{if media_src_big}</a>{endif media_src_big}




3. Now, all u need is create a folder with name "big" in the category folder. For ex. if u have a picture with name proba.jpg in category number 29, u'll need locate that category folder /data/media/29, create folder "big", so in this example it would looks like this: /data/media/29/big and upload picture proba.jpg. Upload "big/original" images in that folder with same filename.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on December 26, 2002, 02:29:53 AM
Finaly I figured out how to make tempalate.
Also fixed a problem described in NOTE 2 and fixed problem if used htaccess anti-leech file (see post: http://4homepages.de/forum/viewtopic.php?t=2885)


You'll need make those changes:

2. Open details.html template.
2.1. Find:
Code: [Select]
{image}2.2. Replace with:
Code: [Select]
                 {if media_src_big}
<script type="text/javascript">function openpopupbig(big){var popurl="details.php?image_id={image_id2}&big=1";settings='fullscreen,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                  
                  <a class="big" href="javascript:openpopupbig('big')">{endif media_src_big}
                {image}{if media_src_big}</a>{endif media_src_big}

Now need some more changes:

4. Open details.php file.

4.1. Find:
Code: [Select]
$templates_used = 'details,header';
$main_template = 'details';
Replace with:
Code: [Select]
if (isset($_GET['big']) || isset($_POST['big'])) {
$templates_used = 'big,header';
$main_template = 'big';
}else{
$templates_used = 'details,header';
$main_template = 'details';
}
4.2.Find:
Code: [Select]
 "msg" => $msg,Add after:
Code: [Select]
 "image_id2" => $image_id,
5 Create big.html template.
5.1.
Insert code:
Code: [Select]
{header}
<script language="JavaScript">
<!--//
if (window.Event) document.captureEvents(Event.ONCLICK);
document.onclick = window.close;
function clickIE4(){
if (event.button){
window.close();
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which){
window.close();
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onclick = window.close;
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onclick = window.close;
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("window.close(); return false")
//-->
</script>
<center>
<img src="{media_src_big}"  onClick="window.close()" alt="{image_name}">
</center>
</body>
</html>

You can check how it works here:
http://come.no-ip.com/details.php?image_id=1198

[EDITED] 01.03.03
P.S. this javascript working perfectly on my WindowsXP OS, but someone told me that it doesnt work on WindowsME...
it supposed to close window by pressing any mouse buttons, anywhere on the screen.
so, if someone have better script that do same and more capatible, and also can close window by pressing on keyboard, please post it here.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: MrWante on February 04, 2003, 03:02:41 AM
Thank you V@no!

A truly great mod, that works just perfectly for me!
And also thanks for the extra help to get it working!
Nice with nice guys! :D

Anyway, if you ever are in the northern part of Stockholm and need a place to crash, call me!

:D

So, great modding, and keep 'em comming, you seem to have the talent for it!

Enough with the superlatives.... :D
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: dannyb on February 18, 2003, 05:34:45 PM
Quote from: V@no
Finaly I figured out how to make tempalate.

5 Create big.html template.
Code: [Select]

[java code snip]
...
...
[java code snip]

</script>
<center>
<img src="{media_src_big}"  onClick="window.close()" alt="{image_name}">
</center>
</body>
</html>



The layout gets better when you replace :
Code: [Select]

</body>
</html>


with
Code: [Select]
{footer}
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on February 19, 2003, 12:08:56 AM
well, that was supposed to be just a window, with no control panel, and only picture....but u do whatever it fits to u ;)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: dannyb on February 19, 2003, 03:20:05 PM
Quote from: V@no
well, that was supposed to be just a window, with no control panel, and only picture....but u do whatever it fits to u ;)


Then you also shouldn't use {header}  :) but instead of it:
Code: [Select]
<HTML>
<HEAD>
</HEAD>
<BODY>

Then you have an empty window with ONLY the image in it :-) I use the 4waters template from www.vierstra.com, and layout got a little bit messed up :)

But many thanks for your Module, it works great at my site!!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on February 19, 2003, 04:40:03 PM
Quote from: dannyb
Quote from: V@no
well, that was supposed to be just a window, with no control panel, and only picture....but u do whatever it fits to u ;)


Then you also shouldn't use {header}  :) but instead of it:
Code: [Select]
<HTML>
<HEAD>
</HEAD>
<BODY>

Then you have an empty window with ONLY the image in it :-) I use the 4waters template from www.vierstra.com, and layout got a little bit messed up :)

But many thanks for your Module, it works great at my site!!


Ah, u are right... :D  :!:
{header} was just simplier  :wink:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Chris on February 23, 2003, 07:30:48 PM
Quote from: V@no
[EDITED] 01.03.03
P.S. this javascript working perfectly on my WindowsXP OS, but someone told me that it doesnt work on WindowsME...
it supposed to close window by pressing any mouse buttons, anywhere on the screen.
so, if someone have better script that do same and more capatible, and also can close window by pressing on keyboard, please post it here.

I don't know if this helps you, but if you are using a browser other than IE, the click has to take place on top of the image to close the window otherwise the click does nothing.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on February 23, 2003, 07:48:25 PM
Quote from: Chris
Quote from: V@no
[EDITED] 01.03.03
P.S. this javascript working perfectly on my WindowsXP OS, but someone told me that it doesnt work on WindowsME...
it supposed to close window by pressing any mouse buttons, anywhere on the screen.
so, if someone have better script that do same and more capatible, and also can close window by pressing on keyboard, please post it here.

I don't know if this helps you, but if you are using a browser other than IE, the click has to take place on top of the image to close the window otherwise the click does nothing.

thx, but since I changed from full screen window, to just maximized, it doesnt metter anymore.  :wink:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Chris on February 23, 2003, 08:07:57 PM
After a quick examination, I found some room for improvement.

==================================================

As you go through includes/functions.php from top to bottom, the following lines are not needed:
Code: [Select]
"media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1),


function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0, $big = 0) {
Change this line from V@no
Code: [Select]
   "media_src_big" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode, $show_link, $detailed_view, 1),to this instead:
Code: [Select]
 "media_src_big" => $media_src_big,Continuing, the following line is not needed:
Code: [Select]
   $media = ((!$big) ? ($site_template->parse_template("media/".$file_extension)) : $media_src_big);
==================================================

Some inaccuracies also exist.  It's not a big deal but since I've already found them, maybe posting improvements might interest someone.

There is no class "big" defined for this mod, so in details.html
Code: [Select]
<a class="big" href="javascript:openpopupbig('big')">you can remove
Code: [Select]
class="big"
As long as I'm taking the time, in big.html maybe it's worth noting that the
Code: [Select]
<center></center>is deprecated in the HTML 4.0 specification in favor of the DIV element.  Therefore it's better to use this:
Code: [Select]
<div align="center"></div>Deprecated means that future browsers won't be required to support the CENTER element.

In details.php:
Code: [Select]
$templates_used = 'details,header';does not exist.  Perhaps it's there for V@no from another mod?

==================================================

This note isn't anything big, but since there is no {image_id} tag created by details.php, it is safe to change
Code: [Select]
 "image_id2" => $image_id,to
Code: [Select]
 "image_id" => $image_id,I try to follow the 4images code style whenever possible so this is just a personal preference.  For me, it makes reading the code easier since the naming convention is consistent.  Again, not a big deal.

Also, instead of adding "big=1" to the URL, I find it more useful to specify a template to be used instead.

Open details.php.  Replace this code
Code: [Select]
if (isset($_GET['big']) || isset($_POST['big'])) {
$templates_used = 'big,header';
$main_template = 'big';
}else{
$templates_used = 'details,header';
$main_template = 'details';
}
with this
Code: [Select]
$main_template = "details";
if (isset($_GET['template']) || isset($_POST['template'])) {
  $template = (isset($_GET['template'])) ? stripslashes(trim($_GET['template'])) : stripslashes(trim($_POST['template']));
  if (!file_exists(TEMPLATE_PATH."/".$template.".".$site_template->template_extension)) {
    $main_template = $template;
  }
}
Now you can use
Code: [Select]
var popurl="details.php?image_id={image_id}&template=big";in the javascript that opens a new window.  This makes details.php look for a template named "big.html" or whatever name you specify.

The javascript to open a new window has a compatibility limitation.  It won't work if the user SHIFT-clicks in IE to try to open the link in a new window.  It happens.  Users don't know it will open in a new window so they try.  Same applies for CTRL-click in Mozilla based browsers.

Also, to open a new window without certain features when using 'fullscreen', you don't have to explicitly use "feature=no".  It's safe to just leave it out.  The browser only adds features that are requested in this case.

So taking the javascript knowledge above, we can change our link that opens the image in a big window from:
Code: [Select]
                 {if media_src_big}
       <script type="text/javascript">function openpopupbig(big){var popurl="details.php?image_id={image_id2}&big=1";settings='fullscreen,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                  
                  <a class="big" href="javascript:openpopupbig('big')">{endif media_src_big}
                {image}{if media_src_big}</a>{endif media_src_big}
to this
Code: [Select]
{if media_src_big}
<script language="JavaScript" type="text/javascript">
function openBigWindow(url) {
  bigwindow = window.open(url,'bigwindow','fullscreen,scrollbars=yes,resizable=yes');
  bigwindow.focus();
}
</script>
<a href="./details.php?image_id={image_id}&template=big" onClick="openBigWindow(this.href);return false;">
{image}</a>{endif media_src_big}
By the way, the script language should always be specified.  It's more important to a browser that the script type.
Here's a great online javascript reference: http://www.devguru.com/Technologies/ecmascript/quickref/javascript_index.html

Lastly: Thank you V@no for this mod!  I've always wanted 4images to do this and your mod came along just when I needed it.  So don't anyone think that I'm ungrateful.  :wink:

Edit: Corrected a statement I made about how javascript window.open() works.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on February 23, 2003, 08:27:02 PM
this was my first mod I ever did...it was really mess...and I was trying make it with as less files to change as possible.
now, when I look at my functions.php and other 4images files, after all the changes I did to them, I'm this much (little) close just  start all over.... 8O
if automatic mod installer will be ever released, it wont be able install anything on my gallery :?

@ Chris, if it's not too much to ask, maybe u could post complete mod here (not just the changes from my post)?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Chris on February 23, 2003, 08:51:17 PM
Quote from: V@no
@ Chris, if it's not too much to ask, maybe u could post complete mod here (not just the changes from my post)?

 :lol:
It's your mod, I was hoping you would do that.  I'm also still working on polishing my implementation and I doubt I will have time.  Sorry.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Clow Read on February 24, 2003, 02:14:59 AM
@ Chris and v@no ^^

could you put up a complete and updated version of this mod??? ^^

thxn ^_~
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: ParaNike on April 01, 2003, 09:39:31 PM
Well, the MOD is great!

I have seen on V@no Gallary some special features. At the picture details are some informations like "Image dimension: 800x600 (Original: 1600x1200)"! The same thing for file size.
How does it work to get the informations about the original picture. Can some one explain how I can get this features too?

Another thing is, that I want a function for the download. Is it possible to write the downloadfunction, that it will download the picture in the "big" folder if it is avalabile?
So the Members will get the picture in the originalsize and not only in the small size.

Please help me!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: ParaNike on April 06, 2003, 01:34:04 PM
Is some one here? :)

Why can`t help me some one?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: geewhiz on April 24, 2003, 01:54:05 PM
Getting it all together!

It would be nice if we could have Chris and or V@no post an updated script changes required to get " Open Image" all nice and neat.

I am certain others have looked at this and scratched their heads.

Thanks guys
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: geewhiz on May 06, 2003, 03:47:20 PM
Is it possible to:
1. make the pop-up window automatically resize to image?
2. have just the image name on the window and not the path?
3. place the image "name" below the image in a box?

Answers to these would be greatly appreciated.

Thanks![/b]
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: GrZeCh on June 17, 2003, 06:41:13 PM
Hello!
I have a question about this:

Quote
5. If u deleted picture from the site (as admin), "big/original" picture will stay there, u'll need delete it manualy.


Is there any possibility to change that script will do that?

Sorry for my english.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on May 02, 2005, 08:51:08 PM
Great MOD!

How can I change the directory ./big?

In fact, I'd like to show the picture located in /data/media/nr, only in a new window without details information... just the picture.
So I don't need a the original picture or a copy of the original picurte. I want to show the same picture in details and in the new windows without details informations
I think, the only thing is, I have to modify the path.

Thank you for helping me.

Serge
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on May 07, 2005, 03:44:31 PM
I guess it wont be a big thing to change the directory... anybody who can help me???

Thank you...
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on May 18, 2005, 12:14:31 PM
...  :(  nobody here who can help me???   :(
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on May 27, 2005, 09:15:45 AM
Hi everybody

When I release a new image, the original image is copied to the folder "big".
The original image is shown by clicking on the image.

I'd like to show instead of the original image the same image again in a new windows by clicking the image. Just without all the details.

In my opinion, I have just to change a path of the location of the image... but how do I have to make that modifications?

Now I delete the original file and copy the image from ./data/media/nr/ to ./data/media/nr/big by hand. That is not very comfortable.

Thank you for helping me!!

Serge
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on May 31, 2005, 01:05:32 PM
Hi

I think I have the solutions:

I replace the following code
Code: [Select]
$path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id : MEDIA_TEMP_PATH) : (($image_type == "big") ? MEDIA_PATH."/".$cat_id."/big" : (($cat_id) ? THUMB_PATH."/".$cat_id : THUMB_TEMP_PATH)))."/".$file_name;
   return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $path) : (($image_type != "big") ? $return_code : "");

by

Code: [Select]
$path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id : MEDIA_TEMP_PATH) : (($image_type == "big") ? MEDIA_PATH."/".$cat_id."/" : (($cat_id) ? THUMB_PATH."/".$cat_id : THUMB_TEMP_PATH)))."/".$file_name;
   return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : $path) : (($image_type != "big") ? $return_code : "");

I deleted the "big".

I have no idea about php, I just tried.  :wink:

Serge

PS: I'm wondering, that nobody could gave me a hint...
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Lain on June 02, 2005, 11:47:27 AM
Guten Tag zusammen ^^

zwar hat schon mal vor einiger Zeit jemand nach diesem nachtrag gefragt, leider konnte es bis heute keiner beantworten ^^; wobei ich sehen muss das es bei  V@no wunderbar klapt. Probiere schon ein weilchen rum das aufgerufene fenster an die grösse des Bildes anzupassen.

Ich dachte schon gestern abend hatt es mit .... height={height},width={width}, als nachtrag in der <script type=.... Zeile geklapt, bis ich feststellen musste das er bei {height} und {width} nicht das bild in ./big/ als mass hernimmt sondern das das sich im ordner ./Nr./ befindet. ^^;

Code: [Select]
{if media_src_big}
<script type="text/javascript">function openpopupbig(big){var popurl="details.php?image_id={image_id2}&big=1";settings='fullscreen,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                 
                 <a class="big" href="javascript:openpopupbig('big')">{endif media_src_big}
               {image}{if media_src_big}</a>{endif media_src_big}

ist jemand so nett und könnte die betreffende zeile passend ändern, wenn ich überhaupt bei diesem teil richtig bin ^^;


Mfg Lain
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: ~Maren~ on July 11, 2005, 11:20:37 PM
Kommt hier noch jemand mit dem Mod klar?

Funktioniert bei mir leider hinten und vorne nicht, auch wenn ich diese (chaotische ;)) Reihenfolge beibehalten hab wie es hier alles beschrieben war.

Quote
Parse error: parse error, unexpected ':' [...]httpd.www/4imagestest/includes/functions.php on line 119

bekomme ich als Fehlermeldung, mit der ich ehrlich gesagt nichts anfangen kann.

Diese Zeile 119/functions.php selbst sieht folgendermaßen aus:

Quote
function check_remote_thumb($remote_thumb_file) {




Kann mir jemand helfen, wenn ich die komplette Datei hier poste? Oder ist der Fehler möglicherweise so weitläufig, dass ich´s ganz vergessen kann?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: jaimecb on August 01, 2005, 06:40:42 AM
ok the mod work´s .. but... if i click on download icon... the image downloaded is the small image... and not the big image...
who can i modify on functions.php the download link for donwload the big image...  :? :? :?

 :oops: sorry for my very poor english

thanks
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on August 15, 2005, 07:37:41 PM
Could V@no or Chris post the actual script for this mod? The stuff before is kinda confusing.
Thanks guys!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on August 17, 2005, 11:08:22 AM
Hi V@no and Chris,
Im interested in the actual script for this mod, too
At the moment it's a little bit confusing :wink:

And can you tell me how I can change the download-button-link from rezized-image to the image in the big folder?
Just something like
Code: [Select]
if big image then image_download_url is ../big :wink:
thank you
Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on August 17, 2005, 12:38:50 PM
I think you'd need to use a {if image_big kind of thing for that. I made the script work, tried doing the download button thing, but it's too complex for me to work that by myself.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on August 17, 2005, 02:54:37 PM
I think you'd need to use a {if image_big kind of thing for that. I made the script work, tried doing the download button thing, but it's too complex for me to work that by myself.


I found a mod for this under
http://www.4homepages.de/forum/index.php?topic=7499.0

but unfortunatley it's not working on my site  :roll:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on August 17, 2005, 10:59:44 PM
I think you'd need to use a {if image_big kind of thing for that. I made the script work, tried doing the download button thing, but it's too complex for me to work that by myself.


I found a mod for this under
http://www.4homepages.de/forum/index.php?topic=7499.0

but unfortunatley it's not working on my site  :roll:

Thanks for the tip! After a bit of fiddling, I managed to make it work. :D
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on October 16, 2005, 04:07:20 PM
is it possible to show a text, when I point with the cursoer on the picture in the detail-view?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on October 16, 2005, 09:50:09 PM
you can use {if media_src_big} and {endif media_src_big} in your /media/ templates.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on October 16, 2005, 10:01:58 PM
sorry... can you give me some more information on that....   :oops:

I want to implement a text like "Click on the picture for full-screen-picture" So the text should be displayed on detail.html.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on October 19, 2005, 07:40:51 PM
sorry... can you give me some more information on that....   :oops:

I want to implement a text like "Click on the picture for full-screen-picture" So the text should be displayed on detail.html.

Hi V@no

I also need the text "Click on the picture for full-screen-picture" in details.html on mouse over the small image
At the moment there it shows only the image_name on mouse over. But where does the image_name on mouse over come from???
At the moment my code in details.html looks like this.
Code: [Select]
{if media_src_big}
<script type="text/javascript">function openpopupbig(big){var popurl="details.php?image_id={image_id2}&big=1";settings='fullscreen,location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=yes';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                 
<a href="javascript:openpopupbig('big')">{endif media_src_big}
{image}</a>

So where do I have to put the tag alt="Click on the picture for full-screen-picture" ???

Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on October 20, 2005, 12:25:14 AM
in jpg.html (any media templates you are using with this mod)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on October 20, 2005, 03:58:48 PM
in jpg.html (any media templates you are using with this mod)

That's it.
Im working for three years with 4images, but i never found the jpg.html in the media folder  :roll:
Thank you V@no

Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: TIMT on October 20, 2005, 04:33:46 PM
Quote
in jpg.html (any media templates you are using with this mod)

V@no... thank you!!   :D
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 05, 2005, 07:53:06 PM
Hallo,
ich suche schon lange nach einer Lösung auf die Anzeige der richtigen Dateiinfos, wenn man den Big-Folder-Patch benutzt.
Also es sollte dort die richtige Dateigröße angezeigt werden und beim klick auf download, zip, oder normal das original File gedownloadet werden.

Und dann suche ich noch eine Lösung auf das Problem, dass man die original-Dateine selber löschen muss.

Da muss es doch irgendwo einen Patch geben?
Ich hoffe ihr könnt mir weiterhelfen, auch in der Suchmaschine habe ich es nicht gefunden!

Vielen Dank!

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on December 05, 2005, 07:58:57 PM
Ist es das was du suchst?
http://www.4homepages.de/forum/index.php?topic=7499.msg45784#msg45784

viele Grüße
Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 07, 2005, 04:18:11 PM
Ja genau, das ist ein Teil!
Jetzt bräuchte noch folgendes:

-Download der big-file beim klick auf Download
-Dateiinfos über die Big-File
-evtl. noch lösche inkl. der big-file

Wäre super, wenn mir jemand schreiben könnte, wie das geht!
Ich habe in der Suchmaschine leider nichts gefunden, weil ich auch nicht weiß, unter welchem Suchbegriff ich das finde.

Vielen Dank!!

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on December 07, 2005, 05:18:48 PM
Da steht das alles, aber auf englisch.
Schau dir mal den Code, den du für diesen Mod verwendet hast, genauer an.
Ich weiß nicht mehr wo, aber der Mod verwendet zwei Pfade. Einen für /download/ und einen für /big/
Ich hatte damals das selbe Problem wie du und habe den /download/ pfad auch einfach in /big/ unbenannt und dann hats funktioniert.

viele Grüße
Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 08, 2005, 07:39:50 PM
Echt, das steht da alles unter diesem Link: http://www.4homepages.de/forum/index.php?topic=7499.msg45784#msg45784

Wenn man das mit dem /download/ Pfad ändern könnte, wäre das ja total super!
Aber wo kann man das ändern?
Bei mir sehe ich nämlich überhaupt keinen Ordner, der download heißt, oder wenn ich den big-ordner in download umbenenne, dann kann man nicht mehr das original-image aufrufen.

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on December 08, 2005, 08:38:09 PM
Hallo Fireball22,
du hast doch dieses Mod eingebaut:
http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712

innerhalb dieses Mods befindet sich folgender Code:

Quote
// CTN download file block insert BEGIN
   if( file_exists(MEDIA_PATH."/".$image_row['cat_id']."/download/".$image_row['image_media_file']) )
     $download_file_size = @filesize(MEDIA_PATH."/".$image_row['cat_id']."/download/".$image_row['image_media_file']);
    elseif( file_exists(MEDIA_PATH."/".$image_row['cat_id']."/big/".$image_row['image_media_file']) )
     $download_file_size = @filesize(MEDIA_PATH."/".$image_row['cat_id']."/big/".$image_row['image_media_file']);
    $download_file_size = format_file_size($download_file_size);
// CTN download file block insert END

In diesem Code gibt es aus Gründen die ich nicht kenne einen /download/ und einen /big/ pfad. Ich habe in meinem Code einfach den /download/ pfad ebenfalls in /big/ umbenannt und dann wurde das große Bild downgeloadet.

Ich hoffe nun hast du verstanden was ich meine. Genauer kann ich es nicht mehr erklären :-)
viele Grüße
Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 09, 2005, 01:00:49 PM
Ok, vielen Dank!
So werde ich es dann auch gleich machen!

Was ändert sich den eigneltich mit dem Mod unter dem Link?

Fireball22

Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 09, 2005, 05:59:01 PM
Hat super Funktioniert, aber er zeigt mir die Original-Bildgröße(Pixel) immer in der Thumbnail-Größe an.
Die Anzeige für die Original-Dateigröße funktioniert aber!

Und wo finde ich das mit dem Download-Button und zip-Button, dass dort die Original-Files gedownloadet werden, genauso wie bei dem Leuchtkasten.
Ich habe leider nicht unter deinem Link gefunden.

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on December 09, 2005, 06:04:33 PM
Quote
Und wo finde ich das mit dem Download-Button und zip-Button, dass dort die Original-Files gedownloadet werden, genauso wie bei dem Leuchtkasten.
Ich habe leider nicht unter deinem Link gefunden.

Komm schon Fireball22
lies dir doch mal meinen letzten Beitrag genau durch
http://www.4homepages.de/forum/index.php?topic=3236.msg54070#msg54070

da hab ich doch genau das geschrieben?

Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 09, 2005, 06:56:28 PM
OK, ich habe mir das ganze "Zeug" jetzt alles in einer Stunde durchgelesen und gleich ausprobiert. :D

So, das zippen Funktioniert nach der patchung gar nicht mehr und das downloaden der original-file funktioniert schon, aber nur mit dem thumbnail, das mit dem lechtkasten habe ich gar ned gelesen und das mit der bildergröße in pixel wird bei mir die thumbnail-datei genommen.

Was kann ich nur machen??
Ich weiß leider auch nicht mehr weiter!

Wäre super, wenn du mir sagen könntest, wie ich die paar Problemchen da oben noch lösen könnte!!

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Matthias70 on December 09, 2005, 07:09:24 PM
Das Problem ist, dass du verschiedene Mods (big image - download folder - original image by click usw.) kombiniert hast.
Die einzige Möglichkeit, die ich sehe ist aufwändig, aber manchmal gehts nicht anders  :roll:

Du solltest jedes einzelne Mod in dieser Mod-Kombination durchlesen und evtl. Erweiterungen bzw. Links die auf dein Probleme eingehen, verfolgen.

viele Grüße
Matthias
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Fireball22 on December 09, 2005, 07:34:10 PM
Ok, das wird dann wirklich bissel dumm.
Ich weiß da dann überhaupt ned, wo ich suchen soll, da bleibt mir nur noch das löschen von 4Images.

Kann mir der Admin nicht helfen? Er hat doch bestimmt alles im Kopf :D

Fireball22
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on March 03, 2006, 01:30:23 AM
V@no, I was wondering if and how this mod could work in 1.7.2 . I'm about to upgrade to 1.7.2, and I don't know if it'll screw up my gallery. Thanks!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: @nni on March 05, 2006, 07:42:21 PM
Hallo V@no ich möchte Dir gratulieren für den tollen Mod den du da geschrieben hast. Habe Ihn auf Deiner HP angeschaut, und musste sagen, dass das genau der Mod ist, den ich schon lange suche. Habe mich sofort an die Arbeit gemacht und Dein Beschrieb genau abgearbeitet. Schritt für Schritt habe ich die Dateien functions.php, details.html, details.php und big.html angepasst.
Das Resultat war ernüchternd. Das Teil funktionierte nur zum Teil, denn mein Bild in der Detailansicht wurde nur noch durch ein X dargestellt, aber bei anklicken wurde das Windows-Fenster mit dem grossen Bild geöffnet.
Also habe ich mit den Vorschlägen von Chris begonnen zu integrieren, danach funktionierte gar nichts mehr.
So habe ich meine gesicherten Dateien wieder hineinkopiert und nochmals von vorne begonnen, da ich dachte, ich hätte irgendwo einen Fehler begangen (was ich wohl auch habe). Leider wieder das selbe Resultat.

Nun meine bitte an irgend jemand da drausen. Könnte mir jemand, der diesen Mod erfolgreich implementiert hat die oben genannten Dateien per E-Mail zukommen lassen?

Wäre wirklich froh, denn ich bin mit meinen Nerven am Ende.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on March 11, 2006, 06:09:40 AM
I tried just copying and pasting the code in 1.7.2, but I get a blank page. I had to reupload my old files.
Any help would be very appreciated here.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on March 14, 2006, 06:28:50 AM
I tried just copying and pasting the code in 1.7.2, but I get a blank page. I had to reupload my old files.
Any help would be very appreciated here.
I just installed this mod on fresh v1.7.2 and it worked just fine, didnt need to change anything in the mod.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Washi on March 14, 2006, 03:15:30 PM
I tried just copying and pasting the code in 1.7.2, but I get a blank page. I had to reupload my old files.
Any help would be very appreciated here.
I just installed this mod on fresh v1.7.2 and it worked just fine, didnt need to change anything in the mod.

It did? Even in 1.7.1, I had to tweak it a bit for it to work. I'll try it again.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Optimum on March 23, 2006, 02:18:20 PM
Hi,

I installed this but I get the same problem as I did with one of the other mods.
It opens the detail.html page, I have the usual stuff there, then I have this code visible:

Quote
<script type="text/javascript">function openpopupbig(big){var popurl="./data/media/1/big/BIG.jpg";settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>
<a class="big" href="javascript:openpopupbig('big')">
Just below that is the actual image, and below the image I have:
Quote
</a>

There is no link on the image, I can't click on it. What is wrong? I see the <a> tags, so there should be a link present, right?
Please help! I use the latest version, 1.7.2.

TIA,
Mat
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on March 23, 2006, 02:37:36 PM
The "link" is pointed to the javascript function openpopupbig it opens a popup with no toolbar, no status bar, the size of the big image.
Where can I see it?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Optimum on March 23, 2006, 02:44:07 PM
Hi V@no, sorry, I fixed it.. :D
It works great!! Just what I was looking for :)

One other question: would it be ok, if I'd set the newWindow size when it opens?  EDIT: did that already, works great :) Just hoping you'll give your OK on this, just to be safe..

No way to "fit" it to the "big" picture size, right?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on March 23, 2006, 02:53:19 PM
try inserting width/height into:[qcode]          <script type="text/javascript">function openpopupbig(big){var popurl="{media_src_big}";settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no,width={width},height={height}';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>[/qcode]
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Optimum on March 23, 2006, 02:55:22 PM
Yes, I did just that, thanks!

Regards,
Mat
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Optimum on March 28, 2006, 03:29:01 PM
V@no, can I use
Code: [Select]
JavaScript:window.close(); instead of your script for closing the window in the "big" template?
I'd like to keep the right-click option.
I've tested it and it works fine, would just like your ok on this, since it's your mod and you know best if this will change anything..

TIA,
Mat
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on March 28, 2006, 03:51:51 PM
there is no copyright on this mod, you can change it anyway you like it to ;)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: askwar on May 01, 2006, 12:09:31 AM
I'm having problems with the additions V@no made. He wrote:

4. Open details.php file.

4.1. Find:
Code:
$templates_used = 'details,header';
$main_template = 'details';


Hm, in my details.php (from an unmodded 1.7.2), there's no line containing "templates_used":

u-alexander-skwar-name@hetzner ~/web/html $ grep templates_used details.php
u-alexander-skwar-name@hetzner ~/web/html $

Where's the following code to be added?

Code: [Select]
if (isset($HTTP_GET_VARS['big']) || isset($HTTP_POST_VARS['big'])) {
$templates_used = 'big,header';
$main_template = 'big';
}else{
$templates_used = 'details,header';
$main_template = 'details';
}

Could somebody please post the line number?

Or, even better: Could somebody please provide a patch (ie. the output from "diff -u")?

Thanks,
Alexander
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: askwar on May 01, 2006, 12:24:05 AM
Hm, reg. my question a few minutes ago: As I wrote, there's no line with:
Code: [Select]
$templates_used = 'details,header';. But, there IS:
Code: [Select]
$main_template = 'details';It is right in the beginning of the file. And there, I replaced it with
Code: [Select]
if (isset($HTTP_GET_VARS['big']) || isset($HTTP_POST_VARS['big'])) {
$main_template = 'big';
}else{
$main_template = 'details';
}

Is that right?

Attached, you can also find a patch against the 4images 1.7.2 files.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Brainwrek on July 05, 2006, 03:23:33 PM
Hey guys... I've been playing around with this quite a bit and LOVE IT!  But I'm curious what would have to be done to make this work on the ecard pages?  I've added the details.html stuff into the postcards templates, and can't get it to work.  Any ideas what I'm missing?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: ccsakuweb on August 30, 2006, 12:28:26 PM
hi! I have installed resized-image mod and i would like install this mod that opne a new window with the original image but i don't know how to save the original image in /big before resized the image. do you know how to do this.. http://www.4homepages.de/forum/index.php?topic=7499.0 here seve the original image in download directory and i doesn't know if that mod works with resized-image . I have 1.7.3 could you help me please? I don't want to save the original image by my hand because my users upload wallpapers and i don't have the original size..
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: live@ct on November 17, 2006, 07:21:22 AM
this its not working with the MOD Pic Security :(

I think :P because it not show the image
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Mackie on November 20, 2006, 08:25:47 AM
Hopefully someone can help me. 

I'm only new to Mods and Plugins for 4images, but this one really appealed to me.  I've replaced and tweaked everything according to the rules, but when I was testing out the gallery, whenever I click on the picture, it opens to a blank screen, with nothing on it.

Example:  http://musearchives.net/recent/details.php?image_id=1

What did I do wrong? 
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: mversion on November 21, 2006, 01:13:01 AM
EDIT
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: unite on February 15, 2007, 08:14:02 PM
Great mod I have incorporated this with the another mod I found.
Examle: www.militaryphotos.us
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Bogdan on March 08, 2007, 12:06:16 PM
Hello

I instaled on 4images 1.7.4  the image resizeing mod and also this one. But, if i click an image in Iexplorer 6 , it doesn't open a new window with original image. In Firefox and Opera , the open big "function" works properly. I dont have pop up block software activated. I tested on 5 - 6 computers and on all, only Iexplorer doesent open the big image.

Also, i tried to instaled this mod http://www.4homepages.de/forum/index.php?topic=7499.0 but some of the codes that need replacing doesn't match the one in my files.

Please, help me... point me to the right topics
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: egyptsons on March 24, 2007, 02:35:00 AM
this was my first mod I ever did...it was really mess...and I was trying make it with as less files to change as possible.
now, when I look at my functions.php and other 4images files, after all the changes I did to them, I'm this much (little) close just  start all over.... 8O
if automatic mod installer will be ever released, it wont be able install anything on my gallery :?

@ Chris, if it's not too much to ask, maybe u could post complete mod here (not just the changes from my post)?

so am geting  confused :?
where is the right code to change  :?: or how it's work  :roll:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: darvid on March 25, 2007, 04:02:02 PM
is there a working demo somewhere? and, yeah, it was asked a bunch of times now, does somebody can post the final version of the mod? it is hard to work through from page 1 to 5.

since there is no demo yet, does it look like http://www.huddletogether.com/projects/lightbox2/ ?

@unit: which second mod u have combined this mod with?

thanks in advance

Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Bogdan on March 25, 2007, 06:51:43 PM
The final version of the mod is posted on the first post ;)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: darvid on March 25, 2007, 07:05:57 PM
thanks!

u mean only the very first post? it is so confusing, because Vano posts in the 2. post (http://www.4homepages.de/forum/index.php?topic=3236.msg13402#msg13402) more code.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Bogdan on March 25, 2007, 07:26:48 PM
No, you install both mods. The second post is a mod to the original mod :D . So, install the mod from the first post, then do the modification from the second post.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: egyptsons on April 02, 2007, 06:34:35 PM
No, you install both mods. The second post is a mod to the original mod :D . So, install the mod from the first post, then do the modification from the second post.

Thanks I'll try
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: darvid on April 02, 2007, 08:10:49 PM
i ve got a big pleasure:

which 4image version u have?

if u have 1.7.4, would u maybe just post the code of the modified files? i ve tried to modify the code by myself, but i got serious error messages or links didnt work (like new pictures, or in categories).
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: krissykris18 on July 03, 2007, 10:08:37 PM
An updated and FULL version of this MOD would be really great to have. Reading everyones posts has just confused me... :(
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: unite on July 05, 2007, 05:23:42 AM
Yes it works great I have it installed www.militarywallpaper.us to see it.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: knsin0 on September 17, 2007, 04:14:12 PM
Hello,
i would like to display the resolution of the images in the details pages, i suposse it can be done by adding something like {widht}x{height} but i need to get the resolutions from the big folder where are the real size images, how can i do it?  :?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: jackald on December 20, 2007, 02:02:25 AM
How can i  do it the easiest way. I just want to edit jpg.html 

it looks like this:
<a href="{media_src}">
<img src="{media_src}" border="1" alt="{image_name}"  /></a>

This link should it be edit to point to big directory and specific file

i tried
<a href="big/{cat_id}/{image_file_name}">
<img src="{media_src}" border="1" alt="{image_name}"  /></a>

But i doesnt work i dont know why
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: olrac on February 10, 2008, 11:05:53 AM
Someone please make this mod easier because I tried to go into the first post still not working..

or someone just give us

functions.php
details.php
details.html
big.html

so we can just download it! thanks very much! :wink:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: olrac on February 10, 2008, 11:09:37 AM
Someone please make this mod easier because I tried to go into the first post still not working..

or someone just give us

functions.php
details.php
details.html
big.html

so we can just download it! thanks very much! :wink:

I tried everything but it doesn't work.
please i need your help if there someone installed this mod perfectly please share with us! thanks very much!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: GeO3x on February 10, 2008, 07:41:44 PM
Yea.. It would be great to have an updated version of this mod for latest 4images version - 1.7.6
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: expo on March 20, 2008, 06:22:11 PM
Will this mod work on 1.7.6?  Can someone verify?

Thanks
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: ccsakuweb on March 21, 2008, 01:54:41 PM
yes i tried yesterday and works fine
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: unite on May 06, 2008, 01:02:18 AM
I tried this with the latest version and it didnt work> If you have it working please post how you did it or share the files that were moded.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Salti on June 27, 2008, 06:14:13 PM
yes, a new version will be very nice. :-)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Sunny C. on September 28, 2008, 07:40:38 PM
Ist es möglich, dass sich das nicht in einem neuen Fenster öffnet, sondern sich das so öffnet?
http://highslide.com/
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Boemmel on October 24, 2008, 08:24:22 PM
Ist es möglich, dass sich das nicht in einem neuen Fenster öffnet, sondern sich das so öffnet?
http://highslide.com/

Das hätte ich auch gerne!  :lol:
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: abda53bd on November 24, 2008, 06:40:31 AM
Long time user and contributor.. some of you may remember me.. v@no may..  :)


So I'm installing 4images on a clients site and forgot how to add a link to download the full size image inside the big folder, but only if they are a registered user..
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: mawenzi on November 24, 2008, 01:22:54 PM
@abda53bd

... maybe this can help ... ;)
... [MOD] Alternate directory for download files ...
... http://www.4homepages.de/forum/index.php?topic=7499.msg33712#msg33712 ...
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: AntiNSA2 on March 28, 2009, 05:03:06 PM
Does anyone know if this mod is compatiple with piclense mod?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: krazy9 on June 06, 2009, 09:51:38 PM
I need Some Help
Show Actual Size image in my own (or) Custom Page.
--------------------------------------------------------------------------
Like:
backgroundscity.net

Click on any thumbnail
and click the Full Size Wallpaper.
and view the page and url.
---------------------------------------------
I Need This Mod.
------------------------
Help Me Please.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: popac on September 28, 2009, 03:12:13 PM
Thank you V@no,
MOD working with 1. 7. 7 ver.   :D
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: hitrax on October 03, 2009, 04:40:13 PM
Hallo,

bisher funktionierte dieser MOD ohne Probleme.   :D

Heute habe ich dann von php 4. 4. 9 auf php 5. 2. 10 umgestellt.  Seitdem macht der MOD Probleme.
Ich kann keine Fotos mehr im BIG verzeichnis aufrufen, ich lande immer wieder auf der Detail-Page.
Das heißt ich klicke in der Detail-Page auf die Vorschau, normal würde jetzt das BIG-Bild in einem seperaten Fenster aufgehen.
Ich lande aber wieder auf der Detail-Page.

Switche ich zurück auf php 4. 4. 9 funktioniert alles wieder perfekt.
Ich benötige jedoch php 5. .  um einen anderen MOD zu installieren.

Es wäre super wenn mir jemand helfen könnte.


MfG Helge
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Rembrandt on October 03, 2009, 05:54:53 PM
Hi!
....
Heute habe ich dann von php 4. 4. 9 auf php 5. 2. 10 umgestellt.  Seitdem macht der MOD Probleme. ....
hm..  nur so eine idee....wird die gleiche php config geladen?

register globals jetzt vielleicht auf off?
wenn dann versuche mal die:
$HTTP_GET_VARS['big']
$HTTP_POST_VARS['big']

auf das zu ändern:
$_GET["big"]
$_POST["big"]

schlagt mich nicht,wenn nicht funktioniert.

mfg Andi
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on October 03, 2009, 09:14:38 PM
wenn dann versuche mal die:
$HTTP_GET_VARS['big']
$HTTP_POST_VARS['big']

auf das zu ändern:
$_GET["big"]
$_POST["big"]i
Thanks, I've updated the original instructions.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Sunny C. on October 03, 2009, 09:26:03 PM
Nice, works fine!
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: hitrax on October 03, 2009, 10:41:33 PM
Hallo Andi,

You are my Hero  :D

Dein Tip war Gold wert.  Jetzt funktioniert alles so wie soll.
Danke Dir und noch ein schönes Wochenende.

MfG Helge
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Sunny C. on October 10, 2009, 08:35:58 PM
V@no,
this 4.1
$templates_used = 'details,header';
$main_template = 'details';
is not Correckt!

Only this line
$main_template = 'details'

Is it not possible that the modification of the folders "big" and "original" automatically generated?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: jackald on December 07, 2009, 04:34:34 PM
Ianm  using mode which cache image page. (http://www.4homepages.de/forum/index.php?topic=11441.msg64952#msg64952)

And now when i click on image it wont redirect to orginal picture,

How can i sole that?

Title: Re: [Mod] Show original image in new window by clicking on image
Post by: bigwave on December 13, 2009, 07:50:42 PM
Hi,
I love this mod--it's working great in 1.7.7! 

I was wondering if there is some code I could insert in the details page that alerts a visitor that by clicking on the main image that there is a larger version as in: "Click here for larger version."  Some of my pics don't have a larger version so I just can't add html to the details page--the alert should only appear if there is a corresponding image in the "big" folder.  I am thinking that people are missing the fact that there is a larger version.

Also, is it possible to add Google analytics code to the original image (in the big folder) pop-up so I would know if visitors are viewing the alternative version.  If not could the Google code be added to the link so analytics would count it.

The below would get google to count the click
Code: [Select]
a href="http://www.maui-tropica.com/maui-tropica-gallery/data/media/192/big/P1050620.jpg"   onClick="javascript: pageTracker._trackPageview('/downloads/P1050620'); "
The below is the code from the details page
Code: [Select]
<script type="text/javascript">function openpopupbig(big){var popurl="./data/media/192/big/P1050620.jpg";settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>
<a class="big" href="javascript:openpopupbig('big')">

Here is the link to the Google info
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55529

Thanks,

Brian
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Szooguun on January 27, 2010, 01:27:30 PM
Sorry for my English. Hi, I regard this modification. Does not display me correctly the original image resolution, after inserting the code (width) x (height) is displayed at the resolution of indirect rather than the original image. Could someone help me how to see the original resolution images from the big folder. Many thanks in advance.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Szooguun on February 09, 2010, 03:42:38 PM
Sorry for my English. Hi, I regard this modification. Does not display me correctly the original image resolution, after inserting the code (width) x (height) is displayed at the resolution of indirect rather than the original image. Could someone help me how to see the original resolution images from the big folder. Many thanks in advance.


Help please ;-)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on February 10, 2010, 12:16:21 AM
Hi Szooguun, welcome to 4images forum.
Can I see it?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Guldstrand on June 02, 2010, 11:43:58 PM
Instead of opening the large image in a new window, how do I do if I want the big picture to be downloaded, using the original download button on the details-page?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Marcovich on June 21, 2010, 02:12:29 PM
I have a problem!

Click on this page from Firefox and internet explorer:

http://www.backgroundscity.net/lions_112/lion-25440.htm

Click on the thumbnail and in firefox its working, its open:
http://www.backgroundscity.net/data/media/112/big/Lion.jpg

and in internet explorer its not working, its open:
http://www.backgroundscity.net/lions_112/data/media/112/big/Lion.jpg

So its not working in IE and in FIREFOX its working,
How to fix it?

Marco.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on June 21, 2010, 02:58:36 PM
This problem is related to your "SEO" modifications, which allowed you have categories in virtual subdirectories:
/lions_112/lion-25440.htm

Apparently javascript ignores HTML's "base href" tag. You'll need find a way make javascript be aware of that.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Marcovich on June 21, 2010, 03:11:43 PM
There is no other way to fix it?
Marco.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on June 22, 2010, 01:42:08 AM
In details.html replace
Code: [Select]
<script type="text/javascript">function openpopupbig(big){var popurl="{media_src_big}";settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>
with:
Code: [Select]
<script type="text/javascript">function openpopupbig(big){var popurl="{media_src_big}";if (document.getElementsByTagName("base") && document.getElementsByTagName("base")[0].href) popurl = document.getElementsByTagName("base")[0].href + popurl; settings='location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=yes,resizable=yes,dependent=no';winpopsbigWindow=window.open(popurl,big,settings);winpopsbigWindow.focus();}</script>                 

If it doesn't work, then perhaps google knows ;)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: relu on July 01, 2010, 06:36:34 PM
If possible to open just the image in a simple html page after click?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Jan-Lukas on August 30, 2010, 09:57:25 PM
So, habe mir das mal in meiner Testseite eingebaut, klappt 1A
Was mir noch fehlt bzw. was ich evtl. nicht gefunden habe, ist das man das Bild (im Extra Fenster) mit dem Spacer.gif bearbeitet.
Welche Stelle müsste ich also bearbeiten, das man anstelle des Bildes, das Spacer (transparente) Bild drauf legen kann.



LG

Hat sich erledigt, weil nicht mehr gebraucht.
Die großen Bilder sollen sogar kopiert werden

LG
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: spyroman on November 03, 2010, 08:26:13 PM
Hello i just had change my server after install my gallerie all works fine, i use the mod show orginal big picture in new window. Before it work fine, now if i click on teh pic it donw open the pic in iorginal size it open a new window with the whole site?
What is false i think it only can be a small thing?
Thanks
Spyro
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on November 04, 2010, 12:59:29 AM
Welcome to 4images forum.


Without seeing the site I can only guess there is a javascript error on your page. Check error console in your browser (if available)
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: spyroman on November 04, 2010, 01:20:48 AM
Hi problem is i have backup from old server, all datas download, then only upload on new server, set the rights and config.php, all i srunning but if i click on teh pic to open orginal size in new window, it opens the complete website as a pic not the pic alone. So if its a java problem will hapen nothing or not?
Are there some special chmods for folder big or for the pics inside?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: spyroman on November 09, 2010, 09:08:14 AM
Hello? can noone help me? I  try all but the problem still there
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: spyroman on November 24, 2010, 09:55:14 PM
Hello please can someon help me??? I cant here post a link because its a secure membersite, so only acces can be with member and password. I complete download from old server where all was full functional, and only upload, nithing modify after. and now big picture dont open teh complete website then open??
Why no one help me also not after i ask per PN?
Thanks
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on November 25, 2010, 01:49:20 AM
There is no way to tell without seeing the gallery (in some cases even seeing the source would require). And having only 30 minutes window for the access to the gallery is not even worth the trouble - that's why there is no help.
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: spyroman on November 25, 2010, 04:31:47 PM
No it was another Problem now its ok, it was from the php.ini (if (isset($HTTP_GET_VARS['big']) || )  this now is possible to chenge in the ini , but in future updates of php it cant be change so easy.
So now all works fine
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: V@no on November 25, 2010, 05:28:38 PM
If you are using suggestions by Chris on first page, then you'll need replace all $HTTP_GET_VARS and $HTTP_POST_VARS that are located above include(ROOT_PATH."global.php");
with $_GET and $_POST
Not changes in php.ini required.

P.S.
In the future, you should mention if you are not using original code
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Torsten Ernst on December 19, 2011, 06:47:55 PM
Hallo,

ich habe die big- Modifikation von V@no integriert. Nun habe ich auf der Seite, wo die Bilder in Originalgröße angezeigt werden die beiden Vorschaubilder für das nächstes Bild bzw vorheriges Bild unten eingefügt. Praktisch so wie auf der Detailseite auch. Die Links habe ich entsprechend angepasst und man kann nun direkt von einen Bild in Orginalgröße zum nächsten Bild in Originlgröße springen. So weit so gut. Mit der Bedingung {if prev_image_name} bzw. {if prev_image_name} werden die Vorschaubilder nur angezeigt wenn das Bild im jeweiligen Ordner auch vorhanden ist.

Nun mein Problem.  Es sollen die Vorschaubilder für das nächstes Bild bzw vorheriges Bild nur angezeigt werden wenn das Originalbild auch im Unterordner big vorhanden ist. Ich habe schon mehrere Stunden rumprobiert eine zusätzliche Bedingung wie {if prev_image_big_name} bzw. {if prev_image_big_name} zu erstellen, ich bekomme es nicht hin. Kann mir jemand bitte helfen?

MfG, Torsten
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Rembrandt on December 19, 2011, 09:00:34 PM
und mit:
Code: [Select]
{if media_src_big}...{endif media_src_big}gehts nicht?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Torsten Ernst on December 20, 2011, 01:21:13 PM
Nein leider nicht, es ist praktisch so wie vorher. Ich vermute das liegt daran, dass das momentan angezeigte Bild eben als großes Bild vorliegt und nicht das vorherige bzw. das nächste. Die Idee mit dem Befehl
{if media_src_big}...{endif media_src_big} ist schon richtig denke ich, er muss sich aber wie gesagt auf das vorherige bzw. das nächste Bild beziehen. Hier mal zum besseren Verständnis der momentane Code für das "nächste" Vorschaubild:

<td align="center" width="120" class="row2">
{if next_image_name}{lang_next_image}<br />
<a href="{next_image_url}&big=1"><img src="{next_thumb_file}" border="1"></a><br />
<a href="{next_image_url}&big=1">{next_image_name}</a>
{endif next_image_name}</td>

Ist es möglich eine Funktion wie z-B.  {if prev_media_src_big} bzw. {if next_media_src_big} in die functions.php zu schreiben? Könnte das klappen?

P.S. Ich wollte mal schauen wie du richtig heißt aber auch deiner Seite "über mich" steht nichts, ist das so gewollt?  8)

MfG, Torsten
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: kar76 on February 27, 2013, 06:55:27 PM
Hello Friends

How to make it work with "Google Friendly Urls For 4images Best Seo Mod"
I want url something like this img-flower-123.htm
Please help
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Szooguun on January 02, 2018, 04:00:40 PM
Hello. I would like the full picture to open in a new tab and not in a new window. How to do it?
Title: Re: [Mod] Show original image in new window by clicking on image
Post by: Szooguun on January 17, 2018, 10:51:25 PM
Hello. I would like the full picture to open in a new tab and not in a new window. How to do it?

I managed to get this effect by changing the code in details.html to:

Code: [Select]
{if media_src_big}
<script type="text/javascript">
function OpenInNewTab(big) {
  var url="details.php?image_id={image_id2}&big=1";
  var win = window.open(url, '_blank');
  win.focus();
}
</script>
<a href="javascript:OpenInNewTab('big')">
{endif media_src_big}{image}{if media_src_big}</a>{endif media_src_big}

Maybe someone will also benefit from this solution. Regards.