Ok. The better one:
make another template called privmsg_attachmentimage
with this code:
Code:
<p><normalfont><img src="{imagesfolder}/attach/$message[attachmentextension].gif" width="16" height="16" border="0" alt="">
Attachment:<br> <img src="attachment.php?s=$session[sessionhash]&privatemessageid=$message[privatemessageid]" border="0" alt="" vspace="8" hspace="4">
</normalfont><br>
<smallfont>Downloads: $message[counter]</smallfont></p>
Then found the place with:
Code:
if ($message['attachmentid'] != 0) {
$message['attachmentextension'] = strtolower(getextension($message['filename']));
eval("\$message[attachment] = \"".gettemplate('privmsg_attachment')."\";");
} else {
$message['attachment'] = '';
}
and substitute it with this:
Code:
if ($message['attachmentid'] != 0) {
$message['attachmentextension'] = strtolower(getextension($message['filename']));
if (($viewattachedimages) and ($bbuserinfo[showimages]) ) {
eval("\$message[attachment] = \"".gettemplate('privmsg_attachmentimage')."\";");
} else {
eval("\$message[attachment] = \"".gettemplate('privmsg_attachment')."\";");
}
} else {
$message['attachment'] = '';
}