Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2011
    Location
    Ontario, Canada
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Embedding Images: Providing Embed Code for users to share on their site

    I was hoping someone could shed some light on how the embed code is created for the images on this page.

    http://www.charitywater.org/media/banners.php

    I am looking to setup a similar concept for my non-profit organization. For the life of me I can't figure out how to generate the Embed Code:

    Please help.

    Thanks,
    Alan

  • #2
    New Coder
    Join Date
    Aug 2011
    Location
    Ontario, Canada
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts
    For those that are interested in a similar gallery.

    Here is the php code I am using. Problem solved.

    PHP Code:

    <?php 

    // Each sponsor is an element of the $sponsors array: 

    $sponsors = array( 
        array(
    'fleming','Apply for the EVC Program today.','http://flemingcollege.ca/'), 
        array(
    'rom','You belong at the ROM','http://www.rom.on.ca/'), 
        array(
    'canadian_wildlife','Canadian Wildlife Federation. Celebrating 50 years.','http://www.cwf-fcf.org/en/index.html/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
        array(
    'support','Help support Fleming College and the EVC Program.','http://flemingcollege.ca/'), 
    ); 

    /* // Randomizing the order of sponsors: 
    shuffle($sponsors); */ 

    ?> 

    <?php 
    // Looping through the array: 

    foreach($sponsors as $company

        echo

        <div class="sponsor" title="Click to flip"> 
        <div class="sponsorFlip"> 
        <img src="images/collaborate/'
    .$company[0].'.png" alt="More about '.$company[0].'"/> 
        </div> 
         
        <div class="sponsorData"> 
        <div class="sponsorDescription"> 
        '
    .$company[1].
        <br /><br /> 
        <div class="sponsorURL"> 
        <a href="'
    .$company[2].'">'.$company[2].' </a> 
        </div></div></div></div> 
        '


    ?>


  •  

    Posting Permissions

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