PDA

View Full Version : PHP Photo Album Mod



batfan
03-10-2009, 05:40 PM
1) Script Title: PHP Photo Album script

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

3) Describe problem: Well, this is directly related to the following thread:

http://www.dynamicdrive.com/forums/showthread.php?t=10509

However, this thread is closed and I was unable to contact the moderator as it appears that my account has been suspended due to inactivity :rolleyes:

Anyways, I am implementing a JQuery lightbox plugin called Facebox, with this Photo Album script. The only thing that needs to be done to get the links to open in Facebox is to add


rel="facebox"

to the links. I have done this by adding it to the code below



function buildimage(i){
var imagecompletepath=(targetlinkdir!="")? targetlinkdir+galleryarray[i][0] : imagepath+galleryarray[i][0]
var tempcontainer='<a href="'+imagecompletepath+'" target="'+href_target+'" rel="facebox">'

As described in this other post, this works fine on the first page. However, once you navigate to any of the other pages, it does not. It simply links to the image. It also stops working on the first page, once you have visited the other pages.

The moderator told the user to add the following code to the Photo Album script


document.getElementById("navlink"+p).className="current"
initLightbox();

This of course, does not apply to me as I am not working with the same lightbox script. I simply need the appropriate relationship ('rel=') added to all of the image links.

I understand that the Photo Album script rebuilds the links with each new page. I guess what's confusing me is the fact that I've modified the way that the script is supposed to build those links, so . . . shouldn't that apply to all links?

Any help you guys can provide would be appreciated.

batfan
03-11-2009, 09:14 PM
Sorry for the bump but, I really need this answered. Seems like a simple enough question.

How do I add a 'rel' tag to every image, regardless of the page?

batfan
03-13-2009, 03:40 AM
Wow. Really??? No moderators can help me with this?

batfan
03-19-2009, 04:01 PM
I can't believe this. This post has been up since 3/10 and I have emailed 2 moderators about it and I have still yet to receive 1 single reply.