4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: aedemirci 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 :roll: :roll: :roll: :roll:
Any possible fixes ??? All the best...
-
please post the URL to your Gallery please...
-
http://galeri.yonorg.net
Thx :D :D :D
-
please paste the JS over the other JS in the header.html... It musst between the <head> and </head> Tag...
-
also tried it :cry: still nothing... :cry:
-
please try this:
<a href="javascript:popImage('{media_src}','{image_name}')">{image}</a>
-
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... :) :)
-
then try {thumbnail_openwindow}... (o:
-
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>
-
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:
-
Sorry...The problem maybe with me :D
Now I replaced {image} tag with {thumbnail_openwindow}...still nothing plus no link on thumbnail anymore :)
-
okie then i will try to help you tomorrow...
-
do you want me to send you my details.html ???
-
no... (o:
-
ok :D :D :D :D :D goodnight...
-
THX... :D
-
Any possible solutions yet ? :mrgreen:
By the way, I extracted the codes and tried in a blank HTML and they worked...And that made me more and more nervous :twisted:
Thx :)
-
why you dont use the {thumbnail_openwindow} in the thumbnail_bit.html?
Then the Detail Page is opening in a new Window... (o:
-
But it's not a solution as the new window also contains data. I want people to see only original image...I know I want too much, but that's what I want :lol: :lol: :lol: :lol: :lol:
-
sorry but thi is only a Javascript request and i dont now the Javascript that you are use... )o:
try this... (o:
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<a href="#" onclick="MM_openBrWindow('{media_src}','{image_name}','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=100,height=100')">{thumbnail}</a>
-
I think this is gonna work after a few minor fixes :D :D :D Thank you very much indeed (for your patience also) :oops: :oops: :oops: