Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    15
    Member #
    15883
    The iframe below the menu options (summer 05..etc) just shows the code instead of showing index.php as a picture gallery...please help!



    HTML.....


    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    
    
    <style type="text/css">
    <!--
    #apDiv1 {
        position:absolute;
        width:450px;
        height:115px;
        z-index:1;
        text-align: left;
    }
    -->
    </style>
    
    <STYLE type="text/css">
    <!--
    BODY {
    scrollbar-face-color: #000000;
    scrollbar-highlight-color: #000000;
    scrollbar-3dlight-color: #000000;
    scrollbar-darkshadow-color: #000000;
    scrollbar-shadow-color: #000000;
    scrollbar-arrow-color: #FFFFFF;
    scrollbar-track-color: #000000;
    }
    .style1 {
        font-family: Arial, Helvetica, sans-serif;
        font-weight: bold;
    }
    .style2 {font-family: Arial, Helvetica, sans-serif}
    -->
    </STYLE>
    </head>
    
    <body>
    <div id="apDiv1">
      <div>
        <div align="center" class="style1"><br />
        Collection</div>
      </div>
      <p><b><font color="#17311C"><a target="iframe" href="images/gallery/summer05/index.php">Summer 
    2005</a> <font face="Arial">?</font> <a target="iframe" href="images/gallery/summer06/index.php">Summer 2006</a> <font face="Arial">?</font> <a target="iframe" href="images/gallery/resort06/index.php">Resort 2006</a> <font face="Arial">?</font> <a target="iframe" href="images/gallery/summer07/index.php">Summer 2007</a><br />
      </font></b>Please click on each thumbnail for a detailed photograph.<br />
      <br />
    <iframe src="images/gallery/summer05/index.php" name="iframe" width="100%" height="250" scrolling="No" frameborder="0" id="iframe" allowtransparency="true" border="0"></iframe>
      <BR>
    <TR><TD style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" align=middle height=18><!-- #BeginEditable "brl" -->
    <TABLE style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" width="100%" border=1>
    <TBODY>
    <TR>
    <TD style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none"></TD></TR></TBODY></TABLE><!-- #EndEditable --></TD></TR></TBODY></TABLE></TD></TR>
    <TR>&nbsp;</p>
    </div>
    </body>
    </html>

  2.  

  3. #2
    Junior Member
    Join Date
    Sep 2007
    Posts
    15
    Member #
    15883
    PHP.....(1ST HALF)



    PHP Code:
    <?
    //CONFIGURATION

    $show_nav "above";
    //Options are "above", "below", "both", or "none" to determine if the page navigation appears above the
    //thumbnails, below them, or both.

    $show_download_button "0";
    $show_gal_title "0";
    $show_image_name "0";
    $show_image_caption "0";
    $right_click_disable "0";
    $use_watermark "0";
    // 1 for "On", 0 for "Off"

    $watermark_image_type 'png';
    $watermark_image_path '/home/HELM_USERNAME/public_html/PATH_TO_IMAGES_FOLDER/watermark.png';
    // usage: /home/HELM_USERNAME/public_html/IMAGES_FOLDER/watermark.png
    $image_caption_pos "bottom"// Options are "top" or "bottom";

    $nav_disp "dots";
    // Options are "dots" or "numbers"

    $image_alignment "center";
    // Options are "left", "center", and "right"

    $thumb_location "left";
    $thumb_alignment "left";
    //Options are "top", "bottom", "left", and "right" to detemine where the thumbnail images are in
    //relation to the iFrame containing the full-size images

    $img_quality "resample"// Options are "resize" or "resample". Resampling looks better but is slower.

    $rows "2";
    //[integer] How many rows of thumbnails

    $cols "10";
    //[integer] How many columns in each row

    $display "popup";
    //Options are "rollover", "click", and "popup" to determine whether the images display in the iFrame on
    //rollover of the thumbnail, in the iFrame on click of the thumbnail, or in a popup window on click of
    //the thumbnail.

    $text_display "none";
    /*
    Options are "filename", "caption", and "none" to determine what text displays underneath the
    thumbnail image.  If set to "caption," the text will be taken from the file "captions.txt" in
    the image directory.  That file should have one caption per line, with each line formatted
    as filename|caption, as follows:

    image01.jpg|This is the text of the caption
    image02.jpg|This is the caption for the image named image02.jpg
    db345uhsor.jpg|This caption is for the image named db345uhsor.jpg
    */

    $site['font_color'] = "#000000"//[color-code] Color for all text on the page.
    $site['background_color'] = ""//[color-code] Color for all text on the page.
    $site['background_image'] = ""//[color-code] Color for all text on the page.

    $thumb_table['border_width'] = "0"//[integer] Border width on table surrounding thumbnails. "0" for no border.
    $thumb_table['border_color'] = "#000000"//[color-code] Border color on table surrounding thumbnails.

    $nav['border_width'] = "0"//[integer] Border width on table surrounding page navigation. "0" for no border.
    $nav['border_color'] = "#000000"//[color-code] Border color on table surrounding page navigation.
    $nav['font-family'] = "Arial";
    $nav['font_color'] = "#FFFFFF";
    $nav['font-size'] = "small";
    $nav['link_decoration'] = "underline";

    $thumb['border_width'] = "0"//[integer] Border width on thumbnail images themselves. "0" for no border.
    $thumb['border_color'] = "#000000"//[color-code] Border color on thumbnail images.

    $image['border_width'] = "0"//[integer] Border width on large images. "0" for no border.
    $image['border_color'] = "#000000"//[color-code] Border color on large images.

    //You must enter either a width or height (or both) for the thumbnails, and at least a width
    //for the images.
    $thumb['width']  = "50"//[integer] Thumbnail width
    $thumb['height'] = ""//[integer] Thumbnail height

    $image['width']  = "500"//[integer] Image width
    $image['height'] = ""//[integer] Image height

    $popup_override_width  "300";
    $popup_override_height "200";

    $iframe_width "";
    $iframe_height "";

    $image['textheight'] = "15"// This may need to be set higher if the font sizes below are set higher than "medium"

    $image_disp['filename_color'] = "#000000"//[color-code] font color for image filename display
    $image_disp['galname_color'] = "#000000"//[color-code] font color for gallery name display
    $image_disp['filename_fontsize'] = "small"// Options are "xx-small", "x-small", "small"
    $image_disp['galname_fontsize'] = "small";  // "medium", "large", "x-large", "xx-large"
    $image_disp['filename_fontweight'] = "normal"// Options are
    $image_disp['galname_fontweight'] = "bold";  // "bold" and "normal"


    //CSS Configuration: Don't mess with this if you don't know CSS.
    $site['style'] = "
    <style type=\"text/css\">
    body {
        font-family: arial;
        font-size: medium;
        color: "
    .$site['font_color'].";
        background: "
    .$site['background_color']." url('".$site['background_image']."');
    }
    table {
        white-space: normal;
        border-width: 0px;
        border-style: solid;
        border-color: #000;
        border-collapse: collapse;
    }
    tr {
        white-space: normal;
        border: 0px solid #000;
    }
    td {
        white-space: normal;
        border: 0px solid #000;
    }
    table.thumbs, table.thumbs tr, table.thumbs td {
        border-width: "
    .$thumb_table['border_width']."px;
        border-color: "
    .$thumb_table['border_color'].";
    }
    table.nav, table.nav tr, table.nav td {
            color : #"
    .$nav['font-color'].";
            font-size : "
    .$nav['font-size'].";
        border-width: "
    .$nav['border_width']."px;
        border-color: "
    .$nav['border_color'].";
        margin: 3px;
    }

    table.nav a {
        text-decoration: "
    .$nav['link_decoration'].";
    }
    img.thumb {
        border-width: "
    .$thumb['border_width']."px;
        border-color: "
    .$thumb['border_color'].";
        border-style: solid;
    }
    img.main {
        border-width: "
    .$image['border_width']."px;
        border-color: "
    .$image['border_color'].";
        border-style: solid;
    }
    div.caption {
        font-size: x-small;
        margin-bottom: 2px;
    }
    table.bodyTable, table.bodyTable tr, table.bodyTable td {
        border: 0;
    }

    td.imageName {
            font-weight: "
    .$image_disp['filename_fontweight'].";
            color: "
    .$image_disp['filename_color'].";
            font-size: "
    .$image_disp['filename_fontsize'].";
            text-align: center;
            height: "
    .$image['textheight']."px;
    }

    td.imageCaption {

            font-weight: "
    .$image_disp['filename_fontweight'].";
            color: "
    .$image_disp['filename_color'].";
            font-size: "
    .$image_disp['filename_fontsize'].";
            text-align: center;
    }

    td.imageGal {
            font-weight: "
    .$image_disp['galname_fontweight'].";
            color: "
    .$image_disp['galname_color'].";
            font-size: "
    .$image_disp['galname_fontsize'].";
            text-align: center;
            height: "
    .$image['textheight']."px;
    }

    td.imageDisp {
            text-align: center;
    }

    a:link    {
    color : 000000;
    }
    a:visited {
    color : 000000;
    }
    a:hover   {
    color : 999999
    }
    a:active  {
    color : f00
    }
    </style>"
    ;

    $site['javascript'] = "
    <script language=\"JavaScript\">
    <!--
        function windowOpener(location,width,height) {
    myWindow=window.open(location, 'displayWindow','width=' + width + ',height=' + height + ', location=no, menubar=no, window.status=no, toolbar=no, scrollbars=no, resizable=no');
               myWindow.focus();
        }

        var detect = navigator.userAgent.toLowerCase();
        var OS,browser,version,total,thestring;

        function checkIt(string)
        {
            place = detect.indexOf(string) + 1;
            thestring = string;
            return place;
        }

        function resizeTehWindow(id,imga) {
            tableObj = document.getElementById(id);
            imgObj = document.getElementById(imga);
            var width = imgObj.offsetWidth + 20;
            var height;

            if (checkIt('msie') > 0)
            {
                height = imgObj.offsetHeight + 75;
            }
            else {
                    height = document.body.offsetHeight + 50;
            }

    //        window.alert(width);
    //        window.alert(height);
            self.resizeTo(width,height);
        }

        ///////////////////////////////////////////////////////////
        //Disable right mouse click Script
        //By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
        //For full source code, visit [url]http://www.dynamicdrive.com[/url]
        ///////////////////////////////////////////////////////////

        //var message=\"Function Disabled!\";
        var enabled=\""
    .$right_click_disable."\";
        ///////////////////////////////////
                function clickIE4(){
                        if (event.button==2 && enabled == 1){
        //                   alert(message);
                           return false;
                        }
                }

                function clickNS4(e){
                        if (document.layers||document.getElementById&&!document.all && enabled == 1){
                                if (e.which==2||e.which==3){
        //                                alert(message);
                                        return false;
                                }
                        }
                }

            function clickGen() {
                if (enabled == 1){
                        return false;
                    }
            }

                if (document.layers){
                        document.captureEvents(Event.MOUSEDOWN);
                        document.onmousedown=clickNS4;
                }
                else if (document.all&&!document.getElementById){
                        document.onmousedown=clickIE4;
                }


                document.oncontextmenu=clickGen;

        // -->
    </script>"
    ;

    //-----DO NOT EDIT AFTER THIS LINE --------------------------------------------------------------
    /*
    If you edit some thing something after this line, I hope you know what you are doing, because 
    sometimes I'm not sure what I did in this scripts too *g* ;) - That's all folks - Don't panik *g*
    */


    $ppp $rows $cols;

    //Securecheck
    if(!$thumb['width'] && !$thumb['height'])
    {
        die(
    "You must set the thumbnail width in the configuration");
    }
    if(!
    $image['width'] && !$image['height'])
    {
        die(
    "You must set the image width in the configuration");
    }
    if(!
    $rows || !$cols)
    {
        die(
    "You must set the rows and columns in the configuration");
    }

  4. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    15
    Member #
    15883
    PHP (2ND HALF)...


    class image_proc
    {
    var $type;

    function open($file)
    {
    global $type;
    $file = str_replace("+"," ",$file);

    if(function_exists(exif_imagetype) == true && exif_imagetype($file) != false)
    {
    $type = exif_imagetype($file); //get the imagetype with exif-support
    }
    else
    {
    if(strrchr(strtolower($file),".") == ".jpg")
    $type = 2;
    elseif(strrchr(strtolower($file),".") == ".jpeg")
    $type = 2;
    elseif(strrchr(strtolower($file),".") == ".png")
    $type = 3;
    elseif(strrchr(strtolower($file),".") == ".gif")
    $type = 1;

    else
    $type = "not supported";
    }
    // echo "TYPE: \"".$type."\"";

    switch($type)
    {
    case 1:
    $im = @ImageCreateFromGIF ($file); //open the file to editmode
    if(!$im){DIE("Image creation failed!");}
    break;

    case 2:
    $im = @ImageCreateFromJPEG ($file); //open the file to editmode
    if(!$im){DIE("Image creation failed!");}
    break;
    case 3:
    $im = @ImageCreateFromPNG ($file);
    if(!$im){DIE("Image creation failed!");}
    break;

    default:
    $im = ImageCreate (150, 30);
    $bgc = ImageColorAllocate ($im, 255, 255, 255);
    $tc = ImageColorAllocate ($im, 0, 0, 0);
    ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);
    ImageString($im, 1, 5, 5, "Can't open image: $file", $tc);
    break;
    }
    return $im;
    }

    function resize($file, $tnx="", $tny="", $img_qual="resample")
    {
    global $img_quality;
    if (is_string($file))
    $im = $this->open($file);
    else
    $im = $file;

    // $im = $this->open($file);
    // get some infos about the original
    $origwidth = imagesx($im);
    $origheight = imagesy($im);
    // calculation for the new data
    if($tny == "")
    {
    $tny = $origheight/($origwidth/$tnx);
    }
    if($tnx == "")
    {
    $tnx = $origwidth/($origheight/$tny);
    }
    // lets make a thumb and resize
    $im_new = imageCreateTrueColor($tnx, $tny);

    if ($img_quality == "resample")
    imageCopyResampled($im_new,$im,"0","0","0","0",$tn x,$tny,$origwidth,$origheight);
    else
    imageCopyResized($im_new,$im,"0","0","0","0",$tnx, $tny,$origwidth,$origheight);

    header("Content-type: image/jpg");
    Imagejpeg($im_new);
    }

    function output($file, $tnx="", $tny="")
    {
    $im = $this->open($file);
    // get some infos about the original
    $origwidth = imagesx($im);
    $origheight = imagesy($im);
    // calculation for the new data
    if($tny == "")
    {
    $tny = $origheight/($origwidth/$tnx);
    }
    if($tnx == "")
    {
    $tnx = $origwidth/($origheight/$tny);
    }
    // lets make a thumb and resize
    $im_new = imageCreateTrueColor($tnx, $tny);
    imagecopyresized($im_new,$im,"0","0","0","0",$tnx, $tny,$origwidth,$origheight);

    // header("Content-type: image/jpg");
    Imagejpeg($im_new);
    }

    function getHeight($file,$image_width,$image_height)
    {
    if($image_width > 0 && $image_height > 0)
    {
    $new['height'] = $image_height;
    $new['width'] = $image_width;
    return $new;
    }
    $im = $this->open($file);
    $oheight = imagesy($im);
    $owidth = imagesx($im);
    if ($image_width > $owidth)
    {
    $image_width = $owidth;
    }
    if ($image_height > $oheight)
    {
    $image_height = $oheight;
    }

    if($image_width > 0)
    {
    $new['width'] = $image_width;
    $new['height'] = ceil($oheight/($owidth/$image_width));
    return $new;
    }
    if($image_height > 0)
    {
    $new['width'] = $owidth/($oheight/$image_height);
    $new['height'] = $image_height;
    return $new;
    }
    return $new;
    }
    function watermarker($src,$type,$path)
    {
    switch($type)
    {
    case png:
    $watermark = imagecreatefrompng($path);
    break;
    case jpg:
    case jpeg:
    $watermark = imagecreatefromjpeg($path);
    break;
    case gif:
    $watermark = imagecreatefromgif($path);
    break;
    default:
    die ("Incorrect Watermark Type or Watermark Type Not Set");
    break;
    }
    $watermark_width = imagesx($watermark);
    $watermark_height = imagesy($watermark);
    $image = imagecreatetruecolor($watermark_width, $watermark_height);
    $image = imagecreatefromjpeg($src);
    $size = getimagesize($src);
    $dest_x = $size[0] - $watermark_width - 5;
    $dest_y = $size[1] - $watermark_height - 5;
    imagecopyresampled($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $watermark_width, $watermark_height);
    imagedestroy($watermark);
    // header("Content-Type: image/jpeg");
    // imagejpeg($image);
    return $image;
    }
    }

    // collect all images in this directory
    function read_dir()
    {
    $path = dirname(_PATH_TRANSLATED);
    $cdir = dir($path);
    while($entry = $cdir->read())
    {
    if((!is_dir($entry)) AND ((strrchr(strtolower($entry),".") == ".jpg") OR (strrchr(strtolower($entry),".") == ".jpeg") OR (strrchr(strtolower($entry),".") == ".png") OR (strrchr(strtolower($entry),".") == ".gif")))
    {
    $images[] = urlencode($entry);
    }
    }
    sort($images);
    ksort($images);
    return $images;
    }

    function get_caption ($filename)
    {
    $cap = file('captions.txt');
    foreach($cap as $val)
    {
    if (strstr($val,$filename))
    {
    $capLen = strlen($val);
    $filLen = strlen($filename) + 1;

    $tehCap = substr($val, $filLen, $capLen);
    return $tehCap;
    }
    }
    return NULL;
    }


    if($text_display == "caption")
    {
    $captions = file('captions.txt');
    foreach($captions as $captiona)
    {
    list($key,$val) = explode("|",$captiona);
    $caption[$key] = $val;
    }
    }
    else
    {
    $caption = NULL;
    }

    //OPERATEMODES
    switch($_GET[mode])
    {
    case download:
    $filename = $_GET['selected'];
    header ("Content-type: octet/stream");
    if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE"))
    header("Content-Disposition: filename=" . $filename); // For IE
    else
    header("Content-Disposition: attachment; filename=" . $filename); // For Other browsers
    readfile($filename);
    break;

    case thumb:
    $image_cl = new image_proc;
    $image_cl->resize(urldecode($_GET[selected]), $thumb['width'], $thumb['height'],$img_quality);
    break;

    case image:
    if(isset($_GET['selected']))
    {
    if(!isset($_GET['inframe']))
    {
    $image_cl = new image_proc;
    $dimensions = $image_cl->getHeight($_GET['selected'],$image['width'],$image['height']);

    if ($use_watermark == 1)
    $image_cl->resize($image_cl->watermarker(urldecode($_GET[selected]), $watermark_image_type,$watermark_image_path), $image['width'], $image['height']);
    else
    $image_cl->resize(urldecode($_GET[selected]), $dimensions['width'], $dimensions['height'], $img_quality);

    }
    else
    {
    list($w,$h) = explode("x",$_GET["windowDim"]);
    echo "<html>\n";
    echo " <head>\n";
    echo $site['style'];
    echo $site['javascript'];
    echo "\n </head>\n";
    echo " <body style=\"margin: 0; padding: 2px;\" onload=\"self.focus();resizeTehWindow('table1','te hImage')\">\n";
    echo " <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" id=\"table1\">\n";

    if ($show_gal_title == "1") {
    echo " <tr><td class=\"imageGal\">".ucfirst($_GET['galname'])."</td></tr>\n";
    }
    if ($show_image_name == "1" || $show_download_button == "1") {
    echo " <tr><td class=\"imageName\" nowrap=\"nowrap\">";
    if ($show_image_name == "1")
    echo ucfirst($_GET['selected']);
    if ($show_download_button == "1")
    echo "&nbsp;[&nbsp;<a href=\"$_SERVER[PHP_SELF]?mode=download&selected=$_GET[selected]\">Download</a>&nbsp;]";
    echo "</td></tr>\n";
    }
    if ($show_image_caption == "1" && $image_caption_pos == "top")
    {
    if (get_caption($_GET['selected']) != NULL)
    {
    echo "<tr><td class=\"imageCaption\">";
    echo get_caption($_GET['selected']);
    echo "</td></tr>\n";
    }
    }

    echo " <tr><td class=\"imageDisp\" align=\"center\"><img src=\"$_SERVER[PHP_SELF]?mode=image&selected=".$_GET['selected']."\" class=\"main\" id=\"tehImage\"></td></tr>\n";
    if ($show_image_caption == "1" && $image_caption_pos == "bottom")
    {
    if (get_caption($_GET['selected']) != NULL)
    {
    echo "<tr><td class=\"imageCaption\">";
    echo get_caption($_GET['selected']);
    echo "</td></tr>\n";
    }
    }

    echo " </table>\n";
    echo " </body>\n";
    echo "</html>\n";
    }
    }
    break;

    default:
    $page = isset($_GET['page']) ? $_GET['page'] : 1;

    @$i = ($page - 1) * $ppp;

    if ($iframe_width > 0) {
    $frame_width = $iframe_width;
    }
    else {
    $frame_width = $image['width'] + 40;
    }

    if ($iframe_height > 0) {
    $frame_height = $iframe_height;
    }
    else {
    if ($image['height'] > 0)
    $frame_height = $image['height'];
    else
    $frame_height = $frame_width;
    }

    $popup_width = $image['width'] + 20;
    $popup_height = $popup_width;

    $images = read_dir();
    $current_image = $images[$i];

    $image_c2 = new image_proc();

    $num_images = count($images);
    $num_pages = ceil($num_images / $ppp);
    $col_width = 100/$cols . "%";
    $zcol = 0;
    $xhtml_thumbs = "<table class=\"thumbs\" cellpadding=\"2\" cellspacing=\"0\">\n<tr>\n";
    while(($i < $num_images) && $i < ($page * $ppp))
    {
    // $images[$i] = urlencode($images[$i]);
    if($text_display == "filename")
    {
    $caption[$images[$i]] = $images[$i];
    }
    $galName = str_replace("/", "", dirname($_SERVER["PHP_SELF"]));

    $dimensions = $image_c2->getHeight($images[$i],$image['width'],$image['height']);

    $orig_width = $dimensions['width'];
    $orig_height = $dimensions['height'];

    $popup_width = ceil($orig_width + 20);
    $popup_height = ceil($orig_height + 45);

    if (!empty($popup_override_width) && $popup_override_width > $popup_width)
    $popup_width = $popup_override_width;

    if (!empty($popup_override_height) && $popup_override_height > $popup_height)
    $popup_height = $popup_override_height;

    if ($iframe_height == 0)
    {
    $frame_height = $orig_height;

    $new_width = ceil($orig_width + 40);
    if($new_width > $frame_width)
    {
    $frame_width = $new_width;
    }

    if($new_height > $frame_height)
    {
    $frame_height = $new_height;
    }

    $new_width = ceil($orig_width + 40);
    $new_height = ceil($orig_height + 40);

    if($new_height > $frame_height)
    {
    $frame_height = $new_height;
    }
    }

    if ($show_gal_title == "1")
    {
    $popup_height += $image['textheight'];
    }

    if ($show_image_name == "1")
    {
    $popup_height += $image['textheight'];
    }


    $xhtml_thumbs .= "<td valign=\"top\" align=\"center\" width=\"$col_width\">\n";

    if($display == "popup")
    {
    $xhtml_thumbs .= "<a href=\"javascript:windowOpener('$_SERVER[PHP_SELF]?inframe=1&mode=image&galname=".$galName."&selecte d=".$images[$i]."&windowDim=".$popup_width."x".$popup_height." ', '".$popup_width."', '".$popup_height."');\" ";
    }
    else
    {
    $xhtml_thumbs .= "<a href=\"" . $_SERVER['PHP_SELF'] . "?inframe=1&mode=image&selected=".$images[$i]."\" target=\"image\" ";
    }

    if($display == "rollover")
    {
    $xhtml_thumbs .= "<a href=\"$_SERVER[PHP_SELF]?inframe=1&mode=image&selected=".$images[$i]."\" onmouseover=\"image.location='".$_SERVER['PHP_SELF']."?inframe=1&mode=image&selected=".$images[$i]."'\" target=\"image\" ";
    }

    $xhtml_thumbs .= "><img src='".$PHP_SELF."?mode=thumb&selected=".$images[$i]."' class='thumb' /></a>\n";

    if(is_array($caption))
    {
    $xhtml_thumbs .= "<div class=\"caption\">" . $caption[$images[$i]] . "</div>\n";
    }

    $xhtml_thumbs .= "</td>\n";

    $i++;
    $zcol++;

    if(($zcol >= $cols) && ($i < ($page * $ppp)))
    {
    $xhtml_thumbs .= "</tr>\n<tr>\n";
    $zcol = 0;
    }
    }

    $xhtml_thumbs .= "</tr>\n</table>\n";

    // Pagination
    $next = $page + 1;
    $prev = $page - 1;
    $nav_string = "\n<table width=\"100%\" class=\"nav\" cellpadding=\"3\" cellspacing=\"0\">\n<tr>\n<td align=\"center\">";

    // Page $page of $num_pages :: ";

    if($page == 1)
    $nav_string .= "<<Previous | ";
    else
    $nav_string .= "<a href=\"" . $_SERVER['PHP_SELF'] . "?page=$prev\"><<Previous</a> | ";

    for($pnav = 1; $pnav <= $num_pages; $pnav++)
    {
    if($pnav == 1 && $pnav == $page)
    $nav_string .= $pnav;
    elseif ($pnav == 1 && $pnav != $page)
    $nav_string .= " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=$pnav\">$pnav</a> ";
    elseif ($pnav == $num_pages && $pnav == $page)
    $nav_string .= $pnav;
    elseif ($pnav == $num_pages && $pnav != $page)
    $nav_string .= " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=$pnav\">$pnav</a> ";
    elseif($pnav == $page)
    {
    if ($nav_disp == "dots")
    $nav_string .= " . ";
    else
    $nav_string .= " $pnav ";
    }
    else
    {
    if ($nav_disp == "dots")
    $nav_string .= " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=$pnav\">.</a> ";
    else
    $nav_string .= " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=$pnav\">$pnav</a> ";
    }
    }

    if($page == $num_pages)
    $nav_string .= " | Next>>";
    else
    $nav_string .= " | <a href=\"" . $_SERVER['PHP_SELF'] . "?page=$next\">Next>></a>";

    $nav_string .= "</td>\n</tr>\n</table>\n";

    // Build the page

    $thumbs_cell = "<td align=\"$thumb_alignment\" valign=\"top\">$xhtml_thumbs</td>\n";
    if($display == "popup")
    $iframe_cell = "";
    else
    $iframe_cell = "<td align=\"$image_alignment\" valign=\"top\"><iframe src=\"" . $_SERVER['PHP_SELF'] . "?inframe=1&mode=image&selected=$current_image \" width=\"$frame_width\" height=\"$frame_height\" frameborder=\"0\" name=\"image\"></iframe></td>\n";

    $body_table = "<table class=\"bodyTable\" align=\"center\">\n<tr>\n";
    switch($thumb_location)
    {
    case "top":
    $body_table .= $thumbs_cell . "</tr>\n<tr>\n" . $iframe_cell;
    break;
    case "bottom":
    $body_table .= $iframe_cell . "</tr>\n<tr>\n" . $thumbs_cell;
    break;
    case "left":
    $body_table .= $thumbs_cell . $iframe_cell;
    break;
    case "right":
    $body_table .= $iframe_cell . $thumbs_cell;
    break;
    }

    $body_table .= "</tr>\n</table>\n";

    echo $site['style'];
    echo "<!-- SCRUOT -->".$site['javascript'];

    if($show_nav == "above" || $show_nav == "both")
    echo $nav_string;

    echo $body_table;

    if($show_nav == "below" || $show_nav == "both")
    echo $nav_string;

    break;
    }
    ?>

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    1) Make sure your webhost allows PHP.

    2) See this part at the beginning of your script ...
    <?
    //CONFIGURATION

    Did you try:

    <?php
    //CONFIGURATION


    3) When you post PHP code on this forum,
    put your script between |php| and |/php|
    ... except use square brackets [ and ]
    (I think if I use them in my explanation, the forum
    will think I'm using them for real).


  6. #5
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    put then in code blocks like
    Code:
    
    
    PHP Code:
     <?php echo 'this is some php'?>

    Ok maybe you cant do it here normally you can post bbcodes inside a code block and it doesnt display the enclosed bbcode
    Regards Phil,


  7. #6
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,656
    Member #
    1234
    Liked
    137 times
    Is this hosted somewhere that we can SEE it in action?
    Where did you get this script from?
    Note: it looks like the config... isn't configured, e.g.
    $watermark_image_path = '/home/HELM_USERNAME/public_html/PATH_TO_IMAGES_FOLDER/watermark.png'

    That 3rd post is too long, I can't put the PHP brackets around it... HTH did you post it?!?!
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  8. #7
    Junior Member
    Join Date
    Jul 2009
    Posts
    6
    Member #
    19426
    This gallery appears to have the same HTML code as the one I have. Mine was purchased at Heritage Web Design. I have a question regarding the choice of "alt" or "caption". I am using the "alt" attribute for two reasons (see code below). 1) My testimonials are all jpg's (http://www.sunnycrestanimalcare.com/client_gallery.html) and I want the search engines to find the text in the jpg. 2) I want the text to pop up when the image is clicked on or rolled over. Everything works fine in explorer having the "alt" attributes. In Chrome and in Mozilla nothing pops up showing the text.
    My questions are:
    1) If I switch things in the index.php file to "caption" from "alt" will the search engines find the text as well?
    2) Is there a way to edit the config file so I can have both captions and alt attributes?

    Thanks for the help

    **** Glassberg

    $text_display = "alt";
    /*
    Options are "alt", "filename", "caption", and "none" to determine what text displays underneath the
    thumbnail image. If set to "caption," the text will be taken from the file "captions.txt" in
    the image directory. That file should have one caption per line, with each line formatted
    as filename|caption, as follows:
    image01.jpg|This is the text of the caption
    image02.jpg|This is the caption for the image named image02.jpg
    db345uhsor.jpg|This caption is for the image named db345uhsor.jpg
    */


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:21 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com