instead of doing:
if($File != NULL ) { echo " <img src="$config[images]/attachment.gif\ alt="Attachment">" }
you can pop in:
if ($File) {
if (ereg(".DOC",$File)) {
echo " <img alt = "Doc Attached" src="$config[images]/a-doc.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".TXT|.PL|.CGI",$File)) {
echo " <img alt = "Textfile Attached" src="$config[images]/a-txt.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".HTM|.SHTM",$File)) {
echo " <img alt = "Webpage Attached" src="$config[images]/a-htm.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".XLS",$File)) {
echo " <img alt = "Spreadsheet Attached" src="$config[images]/a-xls.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".PDF",$File)) {
echo " <img alt = "PDF Attached" src="$config[images]/a-pdf.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".ZIP|.TAR|.GZ",$File)) {
echo " <img alt = "Zip Attached" src="$config[images]/a-zip.gif" width=16 height=16 hspace=1>";
}
elseif (ereg("gif|jpeg|jpg|bmp",$File)) {
echo " <img alt = "Picture Attached" src="$config[images]/a-pic.gif" width=16 height=16 hspace=1>";
}
elseif (ereg("WAV|.MP3|.AU|.SND|.RA|.RM|.MID",$File)) {
echo " <img alt = "Sound Attached" src="$config[images]/a-sound.gif" width=16 height=16 hspace=1>";
}
elseif (ereg(".MOV|.MPG|.AVI",$File)) {
echo " <img alt = "Video Attached" src="$config[images]/a-video.gif" width=16 height=16 hspace=1>";
}
else {
echo " <img alt = "Attachment" src="$config[images]/a-clip.gif" width=16 height=16 hspace=1>";
}
}
if ($Poll) {
echo " <img alt = "Poll" src="$config[images]/pollpic.gif" width=16 height=16 hspace=1>";
}
if (ereg("(No Text)",$Body)) {
echo " <img alt = "NoText" src="$config[images]/notext.gif" width=15 height=15 hspace=1>";
}
if (ereg("Post deleted by",$Body)) {
echo " <img alt = "Deleted" src="$config[images]/deleted.gif" width=15 height=15 hspace=1>";
}
if (ereg("Edited by",$Body)) {
echo " <img alt = "Edited" src="$config[images]/edited.gif" width=15 height=15 hspace=1>";
}
should do the trick, and add images accordingly...
[:red]--------------
http://extremeforums.org