PDA

View Full Version : PHP Photo Album Script v2.11



RStyers
03-23-2013, 09:13 PM
1) Script Title: PHP Photo Album Script v2.11

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

3) Describe problem: I have everything working great! It's a cool script. But I can not figure out how to make the pictures DISCRIPTION a hyperlink.


//Optional, manual description for particular pictures inside album
//Syntax: albumid.desc[Pictures]="Picture description here"
myvacation.desc[0]="Strawberry Cheesecake $20.00"///Would like for this to be a hyperlink to another page

I still want the thumbnail picture to open up as a larger picture(thats okay) but I also would like for the description below it to be a hyperlink to another page.

Thanks for your great script and for any help!!!

jscheuer1
03-24-2013, 02:32 AM
I'd go for the obvious:


//Optional, manual description for particular pictures inside album
//Syntax: albumid.desc[Pictures]="Picture description here"
myvacation.desc[0]="<a href='someother.htm'>Strawberry Cheesecake $20.00</a>"///Would like for this to be a hyperlink to another page

Just pay particular attention to the nested quotes (red). They're single ('), not double("). Javascript syntax requires that nested quotes be either escaped, or (as I have shown here) of a different type than the outer quotes. Here it's easiest to simply use a different type. Escaping (although it can be used at any time) only becomes necessary when there are quotes nested within already nested quotes.

RStyers
03-27-2013, 02:12 AM
Thanks so much, That works great!!!