Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-28-2007, 03:12 PM
PhoenixGB PhoenixGB is offline
New Comer (less than 5 posts)
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Talking PHP Album - Changing pop up background colors/colours, tile bar, path etc

1) Script Title: PHP Photo Album script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...photoalbum.htm

3) Describe problem: I want to be able to do several things and as i am a complete newbie with php i need some sage advice...

This is the site i'm testing it out on

http://elvisontour.co.uk/test/newgallery.htm

1. I would like to control the background colour of the popup page.

2. I would like to remove the path and title bar if possible.

Managed to change the colors of the links without too much trouble but i am struggling with this. BTW, thats not me in the Elvis outfit!!

Cheers All

Kev
Reply With Quote
  #2  
Old 05-28-2007, 04:12 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 19,000
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

Although this script uses PHP to gather the images it displays from a directory, the rest of the script is coded in javascript. There is no pop up page, that is the image itself you are viewing. Virtually all modern browsers do not permit displaying a pop up without the title bar, and if the address bar is not displayed, the path is displayed either in the title bar (most browsers) or in a proprietary information bar (Opera, perhaps others).

Modifications can be made to the javascript to pop up something other than the image itself, even something other than a pop up window.
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
  #3  
Old 05-28-2007, 08:00 PM
PhoenixGB PhoenixGB is offline
New Comer (less than 5 posts)
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok cheers, what about chaning the bacground colour and fixing margins?

Kev
Reply With Quote
  #4  
Old 05-28-2007, 08:15 PM
jscheuer1's Avatar
jscheuer1 jscheuer1 is offline
No Kidding?
 
Join Date: Mar 2005
Location: SE PA USA
Posts: 19,000
Thanks: 19
Thanked 1,135 Times in 1,121 Posts
Blog Entries: 3
Default

The background color of what? The margins of what? An image displayed by itself in a browser pop up window has neither of these.

A popular modification to this script is to use it with lightbox 2.03:

http://www.dynamicdrive.com/dynamici...box2/index.htm

To do so, install the lightbox files as instructed on the demo page. Then add this to the PHP Photo Album script (additions red):

Code:
if (gsortorder=="asc" || gsortorder=="desc")
galleryarray.sort(sortbydate)

function buildbox(){
for (var i = 0; i < galleryarray.length; i++){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0];
document.write('<a style="display:none;" title="Elvis Detail" href="'+imagecompletepath+'" rel="lightbox[joe]"><\/a>')
}
}
buildbox();

var totalslots=dimension.split("x")[0]*dimension.split("x")[1]

function buildimage(i){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" rel="lightbox[joe]" onClick="return popuplinkfunc(this)">'
tempcontainer+='<img src="'+imagepath+galleryarray[i][0]+'" title="'+galleryarray[i][0]+' ['+galleryarray[i][1]+']" />'
tempcontainer+='</a><br />'
tempcontainer+=(descriptionprefix[0]==1)? descriptionprefix[1]+(i+1) : ""
return tempcontainer
}
and change this in the PHP Photo Album script:

Code:
function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
var popwin=open(imgsrc.href, "popwin", popupsetting[1])
popwin.focus()
return false
}
else
return true
}
to:

Code:
function popuplinkfunc(imgsrc){
myLightbox.start(imgsrc); return false;
}
__________________
WWWWWWWWWWWW
- John
________________________

Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:47 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.