To replace the "Delete Their PM!" link if the PM has already been deleted by the sender, do the following:
In private.php, find
PHP Code:
$pmreceipts = $DB_site->query("
SELECT
pmreceipt.*, pmreceipt.pmid AS receiptid
FROM " . TABLE_PREFIX . "pmreceipt AS pmreceipt
WHERE pmreceipt.userid = $bbuserinfo[userid]
ORDER BY pmreceipt.sendtime DESC
");
Replace with:
PHP Code:
$pmreceipts = $DB_site->query("
SELECT
deleted, pmreceipt.*, pmreceipt.pmid AS receiptid
FROM " . TABLE_PREFIX . "pmreceipt AS pmreceipt
WHERE pmreceipt.userid = $bbuserinfo[userid]
ORDER BY pmreceipt.sendtime DESC
");
The pm_receiptsbit template replacement string should be changed to:
HTML Code:
<td class="alt2"><span class="smallfont"><if condition="$show['readpm']">$receipt[read_date] <span class="time">$receipt[read_time]</span><else /><em>$vbphrase[unread_date]<br /><if condition="$receipt[deleted] == '0'"><a href="private.php?$sesion[sessionurl]do=unsend&pm=$receipt[receiptid]">$vbphrase[deleteunread]</a><else />$vbphrase[was_deleted]</if></em></if></td>