Foto Function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kholm@dis.umsmed.edu

    #1

    Foto Function

    //-------------------------
    function photoIt($_pic,
    $_float = 'right',
    $_alt = 'Default Text') {
    if ( file_exists($_p ic) ) {
    list($_w, $_h, $_t, $_a) = getimagesize($_ pic);
    $_wide = $_w + 11 + 17;
    $_high = $_h + 12 + 16;
    $_w .= "px";
    $_h .= "px";
    $_wide .= "px";
    $_high .= "px";
    print "<SPAN STYLE='float: $_float; border: 0px; width:$_wide;
    height: $_high; ";
    print "margin: 0px; padding: 0px;'>";
    print "<IMG STYLE='margin: 0px; height: 12px; width: 11px;'
    SRC='i/phTopLef.jpg'>" ;
    print "<IMG STYLE='margin: 0px; height: 12px; width: $_w;'
    SRC='i/phTop.jpg'>";
    print "<IMG STYLE='margin: 0px; height: 12px; width: 17px;'
    SRC='i/phTopRig.jpg'>" ;
    print "<IMG STYLE='margin: 0px; height: $_h; width: 11px;'
    SRC='i/phLeft.jpg'>";
    print "<IMG STYLE='margin: 0px; height: $_h; width: $_w;'
    ALT='$_alt' SRC='$_pic'>";
    print "<IMG STYLE='margin: 0px; height: $_h; width: 17px;'
    SRC='i/phRight.jpg'>";
    print "<IMG STYLE='margin: 0px; height: 16px; width: 11px;'
    SRC='i/phBotLef.jpg'>" ;
    print "<IMG STYLE='margin: 0px; height: 16px; width: $_w;'
    SRC='i/phBottom.jpg'>" ;
    print "<IMG STYLE='margin: 0px; height: 16px; width: 17px;'
    SRC='i/phBotRig.jpg'>" ;
    print "</SPAN>";
    } else {
    print "<IMG BORDER=0 SRC='bogusPic' ALT='NO PHOTO'>";
    }
    }

    The above function applies a photo effect on around an image. This
    effect can be seen at : http://wallshall.com/photoIt/index.phtml

    You can get... for free... the images necessary to produce this effect
    at http://wallshall.com/photoIt/photoIt.tar

    photoIt.tar contains the following files:

    phBotLef.jpg
    phBotRig.jpg
    phBottom.jpg
    phLeft.jpg
    phRight.jpg
    phTop.jpg
    phTopLef.jpg
    phTopRig.jpg
    photoIt.php

    I hope you find this useful.

    -Ken

  • Geoff Berrow

    #2
    Re: Foto Function

    I noticed that Message-ID:
    <1107812292.196 323.213570@c13g 2000cwb.googleg roups.com> from
    kholm@dis.umsme d.edu contained the following:
    [color=blue]
    >
    >You can get... for free... the images necessary to produce this effect
    >at http://wallshall.com/photoIt/photoIt.tar[/color]

    Nice, and change the effect by just adding different images.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    Working...