View Full Version : I am stuck. PHP Photo Album script v2.11

09-16-2009, 03:05 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 want to add adsense links in the popup screen which is displayed when clicking on a picture. However I am having serious problem in getting this working.

I understand I should edit the ddphpalbum.js file and in the following line:

definefooter: '<div class="footerbar">X Sluiten</div>', //Define HTML for footer interface

But I cannot get it working. Any care to give me a (small) hand with this?

<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
/* 468x15 Fotovenster */
google_ad_slot = "xxxxxxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 15;
<script type="text/javascript"

I just want to have some kind of small revenue on my site.

Thanks in advance!

09-16-2009, 09:39 PM
The default built-in lightbox script that comes with PHP Album can only display images, and not rich HTML. If you need to do the later, you should change the onphotoclick event handler (http://www.dynamicdrive.com/dynamicindex4/php-photoalbum_suppliment.htm) to load a viewer that's capable of showing HTML, the simplest being just a pop up window. For example:

new phpimagealbum({
albumvar: myvacation, //ID of photo album to display (based on getpics.php?id=xxx)
dimensions: [3,2],
sortby: ["file", "asc"], //["file" or "date", "asc" or "desc"]
autodesc: "Photo %i", //Auto add a description beneath each picture? (use keyword %i for image position, %d for image date)
showsourceorder: true, //Show source order of each picture? (helpful during set up stage)
onphotoclick:function(thumbref, thumbindex, thumbfilename){
window.open("popup"+thumbindex+".htm", "", "width=900px,height:800px")

Here I'm assuming your enlarged images are saved in popup0.htm, popup1.htm, etc, where the trailing number corresponds to the source index of the thumbnail image clicked on. On these pages, you can include rich HTML, such as Adsense.

09-17-2009, 10:03 AM
Thanks for the reply, however I don't understand what you meant.
Anyways, I managed to get it displayed with Adsense links beneath it, by using an iframe. :)