4images Forum & Community
The forum for all 4images gallery administrators
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
[2023-01-23] 4images 1.10 released
Home
Help
Search
Login
Register
4images Forum & Community
»
4images Modifications / Modifikationen
»
Mods & Plugins (Requests & Discussions)
(Moderator:
mawenzi
) »
Auto-Sizing Pop-Up for Images
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: Auto-Sizing Pop-Up for Images (Read 21725 times)
0 Members and 1 Guest are viewing this topic.
aedemirci
Newbie
Posts: 14
Auto-Sizing Pop-Up for Images
«
on:
November 13, 2005, 11:22:16 PM »
Hi All,
I read related topics with this problem. One could fix it but no explanation...Here comes the problem. I inserted the lines below {header} tag in details.html.
Here is the code :
<script>
// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.
// SETUPS:
// ===============================
// Set the horizontal and vertical position for the popup
PositionX = 100;
PositionY = 100;
// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)
defaultWidth = 500;
defaultHeight = 500;
// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
var AutoClose = true;
// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();
}}
</script>
and replaced the {image} tag with
<a href="javascript:popImage('{media_src}','{width}','{height}')">{thumbnail}</a>
...
Finally, I reloaded the page without any Java errors. Nevertheless, the pop-up was not functioning
Any possible fixes ??? All the best...
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #1 on:
November 13, 2005, 11:29:54 PM »
please post the URL to your Gallery please...
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #2 on:
November 13, 2005, 11:33:07 PM »
http://galeri.yonorg.net
Thx
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #3 on:
November 13, 2005, 11:36:32 PM »
please paste the JS over the other JS in the header.html... It musst between the <head> and </head> Tag...
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #4 on:
November 13, 2005, 11:40:44 PM »
also tried it
still nothing...
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #5 on:
November 13, 2005, 11:45:38 PM »
please try this:
<a href="javascript:popImage('{media_src}','{image_name}')">{image}</a>
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #6 on:
November 13, 2005, 11:49:08 PM »
still doesn't work. besides I don't want the real image be seen in the details page. I want a thumbnail on the details page and after clicking on it, visitors should see the real image in a auto-sized pop-up windows...
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #7 on:
November 13, 2005, 11:51:40 PM »
then try {thumbnail_openwindow}... (o:
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #8 on:
November 13, 2005, 11:54:08 PM »
where should I put that tag ??? is it like this ? 'Cause it didn't work...lol...
<a href="javascript:popImage('{thumbnail_openwindow}','{image_name}','{width}','{height}')">{thumbnail}</a>
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #9 on:
November 13, 2005, 11:56:04 PM »
try to replace this <a href="javascript:popImage('{thumbnail_openwindow}','{image_name}','{width}','{height}')">{thumbnail}</a> with this {thumbnail_openwindow}... Sorry its very late an my Brain is sleeping... (o:
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #10 on:
November 13, 2005, 11:59:22 PM »
Sorry...The problem maybe with me
Now I replaced {image} tag with {thumbnail_openwindow}...still nothing plus no link on thumbnail anymore
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #11 on:
November 14, 2005, 12:00:23 AM »
okie then i will try to help you tomorrow...
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #12 on:
November 14, 2005, 12:01:08 AM »
do you want me to send you my details.html ???
Logged
Acidgod
4images Moderator
4images Guru
Posts: 2.421
It's me?
Re: Auto-Sizing Pop-Up for Images
«
Reply #13 on:
November 14, 2005, 12:06:57 AM »
no... (o:
Logged
4images Shop Demo
|
Your source for electronic music and partys
|
boa-constrictor.cc
aedemirci
Newbie
Posts: 14
Re: Auto-Sizing Pop-Up for Images
«
Reply #14 on:
November 14, 2005, 12:08:18 AM »
ok
goodnight...
Logged
Print
Pages: [
1
]
2
« previous
next »
4images Forum & Community
»
4images Modifications / Modifikationen
»
Mods & Plugins (Requests & Discussions)
(Moderator:
mawenzi
) »
Auto-Sizing Pop-Up for Images