05132005 1523 GMT-6

Still working on this same tutorial. The first function is supposed to 
say if something is a image or not. Right now, it states nothing is an 
image when its called.

The second function inserts what is called. Again, everything is coming 
back html code instead of an image.

Wade


function isImage(){
    return (ereg("(\.jpg$) | (\.gif$) | (\.jpeg$) | (\.png$)" , 
$this->document));
}

function insert($additionalAttributes=""){

    if ($this->isImage() ){
       echo "<img src=\" ".$this->document."\" alt=\" ".$this->title."\" ";

       if ($this->imgwidth) echo " width=".$this->imgwidth;
       if ($this->imgheight) echo " height=".$this->imgheight;
       if ($additionalAttributes) echo "$additionalAttributes";

       echo ">";
    }
    else {
       echo "<a href=\"".$this->document."\" ";

       if ($additionalAttributes) echo " $additionalAttributes";
       
       echo ">".$this->title."</a>";
    }
}



[Non-text portions of this message have been removed]



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to