Results 1 to 3 of 3

Thread: I am stuck. PHP Photo Album script v2.11

  1. #1
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow I am stuck. PHP Photo Album script v2.11

    1) Script Title: PHP Photo Album script v2.11

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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:

    Code:
    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?

    Code:
    <script type="text/javascript"><!--
    google_ad_client = "pub-xxxxxxxxxxxxxxxxxx";
    /* 468x15 Fotovenster */
    google_ad_slot = "xxxxxxxxxxxxxxx";
    google_ad_width = 468;
    google_ad_height = 15;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    I just want to have some kind of small revenue on my site.

    Thanks in advance!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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 to load a viewer that's capable of showing HTML, the simplest being just a pop up window. For example:

    Code:
    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.
    DD Admin

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •