View Full Version : PHP Photo Album script
radioss
05-31-2007, 06:56 PM
1) Script Title: PHP Photo Album script
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm
3) Describe problem:
So here's the deal: this script works perfectly when i use it on firefox and opera. however, on ie6 (and i think safari), it does not display some of the images. it is set to show them 2x2 per page, but on ie it only shows it as a 2 columns, 1 row, and the other pictures do not go to another page, they just don't get displayed. i hope this makes sense.
Can anybody here take a look at this script on my page and tell me what the problem is? go here: http://radiojeffersonga.com/gallery.shtml
thank you.
Matt
jscheuer1
05-31-2007, 09:01 PM
It's working fine in IE too. There is just something about your layout and/or styles that doesn't allow those images to be seen. They are there on the page.
jscheuer1
05-31-2007, 09:19 PM
I played around with your page locally, and adding this to the script (red):
. . . urimage=0
for (y=0; y<dimension.split("x")[1]; y++){
for (x=0; x<dimension.split("x")[0]; x++){
if (curimage<galleryarray.length)
document.write('<div id="slide'+curimage+'" class="slideshow">'+buildimage(curimage)+'</div>')
curimage++
}
document.write(' <br style="clear: left" />')
}
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open(imgsrc.href, "popwin", popupsetting[1])
popwin.focus()
return false
}
else
return true
}
</script>
seems to fix the problem.
soulzcore
06-01-2007, 11:11 AM
First of all Thnks for such a wonderful album script...I needed a light weight and easy script for integrating into Joomla and it did perfectly..
I was thinking of customising it even more,but even if i do even a slight change in the code the images arnt being displayed,maybe because am totally new to programming...
Anywayz the problem is "when I click on the images in the album I want them to open in a new window which should contain some other content also..."
Like If I click on a image in the album it should open in a new window n show the full image and also some other instruction's or description...I tried adding my custom text to this function
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open(imgsrc.href, "popwin", popupsetting[1])
popwin.focus()
return false
i replace the imgsrc.href with html..But it doesnt work..Wat shall i do to make it workk...???
Thanks in Advance..
radioss
06-02-2007, 03:16 AM
i appreciate the help. i'll have to try it out on another day, as i am away from my server all weekend.
jscheuer1
06-02-2007, 06:05 AM
I don't like pop up windows for this for several reasons. I will offer an alternative, but first I will answer your question anyway:
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open("", "popwin", popupsetting[1])
popwin.document.write('<img src="'+imgsrc.href+'"><br>Some other stuff');
popwin.document.close();
popwin.focus()
return false
}
else
return true
}
I like using a DHTML pop up instead though, as explained here:
http://www.dynamicdrive.com/forums/showpost.php?p=94434&postcount=4
soulzcore
06-02-2007, 11:59 AM
That was so excellent,i never thought in that way...
As u mentioned DHTML window ,cant we use the DHTML window widget as the POP up..??
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm
I tried using this in the PHP foto album script..
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onClick="return dhtmlwindow.open("googlebox", "div", "somediv", "Custom title", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")">'
It doesnt work and how to display the image in it..??using imgsrc.href again..??
Hope it doesnt turn out to be simple again...:p :p
jscheuer1
06-02-2007, 01:43 PM
Due to the way nested quotes must be treated inside of quoted strings, it would be more like so:
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onclick="return dhtmlwindow.open(\'googlebox\', \'iframe\', this.href, \'Custom title\', \'width=700px,height=450px,resize=1,scrolling=1,center=1\', \'recal\');return false;">'
I chose iframe, as it seems the best of the available widget methods to use for this. I added the return false, as this is required to prevent the default action of the link.
soulzcore
06-02-2007, 06:28 PM
That worked like a charm...jscheuer1 dude u really rock..
I tried using some more creativity and used the DIV function of the DHTMl Window widget..But the images arent been displayed...
I used this code..
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
'<div id="somediv" style="display:none">
<p style="height: 400px">This is some content within a DIV, shown inside this window instead</p>
<img src="'+imgsrc.href+'">
</div>'
dhtmlwindow.open('divbox', 'div', 'somediv', '#4: DIV Window Title', 'width=450px,height=300px,left=200px,top=150px,resize=1,scrolling=1');
return false
}
else
return true
}
is it correct????
soulzcore
06-04-2007, 07:36 AM
I want to include another javascript into the popup window...But it doesnt work..I tried including it directly..
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open("", "popwin", popupsetting[1])
popwin.document.write('<img src="'+imgsrc.href+'"><br>Some other stuff<script type="text/javascript" src="..."></script>');
popwin.document.close();
popwin.focus()
return false
}
else
return true
}
The script in the red..Any way of doing this...??
I tried using this <SCRIPT LANGUAGE=\"Javascript\" SRC=\"..."></SCRIPT> also..
The script is of displaying Ad's..
jscheuer1
06-04-2007, 07:51 AM
I want to include another javascript into the popup window...But it doesnt work..I tried including it directly..
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open("", "popwin", popupsetting[1])
popwin.document.write('<img src="'+imgsrc.href+'"><br>Some other stuff<script type="text/javascript" src="..."></script>');
popwin.document.close();
popwin.focus()
return false
}
else
return true
}
The script in the red..Any way of doing this...??
I tried using this <SCRIPT LANGUAGE=\"Javascript\" SRC=\"..."></SCRIPT> also..
The script is of displaying Ad's..
You would need to escape the closing slash on the closing script tag:
<script type="text/javascript" src="..."><\/script>
Otherwise, the script that this is in will think that it has ended.
soulzcore
06-04-2007, 08:53 AM
I used the <\/script> it seems to work,but the image is being displayed and after a few seconds the ads from the included JS are only being displayed,both arent being displayed simultaneously on the same page(popup)..
:confused: :confused: :confused: Any help..??
soulzcore
06-05-2007, 05:37 AM
Due to the way nested quotes must be treated inside of quoted strings, it would be more like so:
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" onclick="return dhtmlwindow.open(\'googlebox\', \'iframe\', this.href, \'Custom title\', \'width=700px,height=450px,resize=1,scrolling=1,center=1\', \'recal\');return false;">'
I chose iframe, as it seems the best of the available widget methods to use for this. I added the return false, as this is required to prevent the default action of the link.
I used this,but but with the DHTML window another window of the image is opening...!!!
Wat could teh problem be..??
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.