PDA

View Full Version : Photo Album Script - Help with Formatting



NoClue
04-24-2006, 11:21 PM
I'm using the Photo Album script here:
http://www.dynamicdrive.com/dynamicindex4/photoalbum.htm

I need to change 2 things and I'm getting an error. They are:

1. How to format the "optional_title_attribute", "optional_text_description"

2. If I want the page numbers (navlinks) to display at the top and bottom how do I do this? I tried moving the script to the top but I'm getting an error.

Thanks!

dmwhipp
05-01-2006, 03:29 PM
John gave me instructions on adding page numbers to the top here:

http://www.dynamicdrive.com/forums/showthread.php?t=9330&highlight=photo+album

Deborah

NoClue
05-11-2006, 04:00 PM
Thanks Deborah, that helped.

One more thing. When I enter a title in the section where it should go, the title doesn't display. What am I doing wrong?

Here's an example of what I have:

//Specify images:
//galleryarray[x]=["path_to_image", "optional_title_attribute", "optional_text_description", "optional_link"]
var galleryarray=new Array()
galleryarray[0]=["http://www.lirvaproductions.com/images/Client_YAS.gif", "YAS", "The Youth Awareness and Safety Program", "http://www.youthawarenessandsafety.com"]

jscheuer1
05-11-2006, 04:07 PM
Generally, you have to allow enough height here:


.slideshow{ /*CSS for DIV containing each image*/
float: left;
width: 200px;
height: 270px;
}

in the style section for there to be room for the description as well as the image. Say your image is 270px high, you would need about another 30px for a one line description, so make it 300px. Otherwise, even if the description is used, it will not be visible.

If this is not what is happening, please provide a link to your page.

dmwhipp
05-11-2006, 04:10 PM
Sorry, I didn't use titles, so I can't help you there.
Deborah

jscheuer1
05-11-2006, 07:11 PM
Since, dmwhipp and I cross posted, you may miss my suggestion (http://www.dynamicdrive.com/forums/showpost.php?p=35726&postcount=4).

NoClue
05-12-2006, 11:18 PM
ok!! I added more pixels to the height but it's still not showing. Here's the css I'm using:

.slideshow{ /*CSS for DIV containing each image*/
float: left;
margin-left: 6px;
width: 320px;
height: 280px;
color: #0076ae;
font-size: 8pt;
font-weight: bold;
font-family: Verdana, Arial, Helvetica, sans-serif;
}

.slideshow img{ /*Change "auto" below to a number (ie: 200px) to hard code dimensions of album images*/
width: 260px;
height: 200px;
border: none;
}

Here's the page:

http://www.lirvaproductions.com/portfolio_NEW.html

Thanks so much!!

jscheuer1
05-13-2006, 06:38 AM
What are you referring to, I see 'titles' (like:The Youth Awareness and Safety Program, for example) under each of the three images and when I hover over the images I see title attributes pop up at the mouse pointer.

I think either you fixed it since you posted, or you fixed it but, because you had the old version cached, cannot see the changes.

Or possibly you expected the 'title' to appear above the image? The title, is a tool tip type thing onmouseover.

NoClue
05-16-2006, 03:48 PM
You're right!! I thought it would appear above the image.

Is there a way that I can have the title appear above the image?

jscheuer1
05-16-2006, 05:23 PM
For that, replace the existing function buildimage(i) with this one (additions red):


function buildimage(i){
var tempcontainer=galleryarray[i][3]!=""? '<a href="'+galleryarray[i][3]+'" target="'+href_target+'">' : ""
tempcontainer+='<span class="slottitle">'+galleryarray[i][1]+'<\/span><br \/><img src="'+galleryarray[i][0]+'" border="1" title="'+galleryarray[i][1]+'">'
tempcontainer=galleryarray[i][3]!=""? tempcontainer+'</a>' : tempcontainer
tempcontainer=galleryarray[i][2]!=""? tempcontainer+'<br \/>'+galleryarray[i][2] : tempcontainer
return tempcontainer
}

You can control the style of the 'title' from the stylesheet, example:


.slottitle {
color:#000;
background-color:#fff;
text-decoration:none;
}

The height of .slideshow will still need to be great enough to allow for this added content.

NoClue
05-29-2006, 09:19 PM
Hey John,

Thanks! That's exactly what I wanted.