well, no need to fight. i do not agree this is something so needed, however i'd like to help.
as vb doesn't provide a hook for the additional query entry, you'll need to make a file edit.
find the following codes in private.php. use a php editor so you can see the line numbers as there are 18 $pms variable defined in the private.php
starting: line 1629
ending: line 1639
PHP Code:
// query private messages
$pms = $db->query_read_slave("
SELECT pm.*, pmtext.*
" . iif($vbulletin->options['privallowicons'], ", icon.title AS icontitle, icon.iconpath") . "
FROM " . TABLE_PREFIX . "pm AS pm
LEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
" . iif($vbulletin->options['privallowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = pmtext.iconid)") . "
WHERE pm.userid=" . $vbulletin->userinfo['userid'] . " AND pm.folderid=" . $vbulletin->GPC['folderid'] . "
ORDER BY pmtext.dateline DESC
LIMIT $startat, " . $vbulletin->GPC['perpage'] . "
");
replace it with:
PHP Code:
// query private messages
$pms = $db->query_read_slave("
SELECT pm.*, pmtext.*
" . iif($vbulletin->options['privallowicons'], ", icon.title AS icontitle, icon.iconpath") . "
FROM " . TABLE_PREFIX . "pm AS pm
LEFT JOIN " . TABLE_PREFIX . "pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
" . iif($vbulletin->options['privallowicons'], "LEFT JOIN " . TABLE_PREFIX . "icon AS icon ON(icon.iconid = pmtext.iconid)") . "
WHERE pm.userid=" . $vbulletin->userinfo['userid'] . " AND pm.folderid=" . $vbulletin->GPC['folderid'] . " " . ($_GET['unreadonly'] ? "AND messageread = 0" : "") . "
ORDER BY pmtext.dateline DESC
LIMIT $startat, " . $vbulletin->GPC['perpage'] . "
");
Now visit your private messages as:
http://forumurl/private.php?unreadonly=1. You can put that link to anywhere you wish.