Thank you RateU!!!
It works
So:
In global.php BEFORE of this line:
(Thank you Leefish for the place
)
I added this code:
Created a new template called "private_dropdown_template" with inside only this variable:
And created a new template called "private_dropdown_template_template" with status PM (unread/read), date, from user, subject, link to PM:
(With PHP and Template Conditionals Plugin)
The result
![[Image: 3cuvgAa.png]](https://camo.mybb.com/cfa638144c7644264cb7bfd8e9c195e8f85fba5e/687474703a2f2f692e696d6775722e636f6d2f336375766741612e706e67)
I used:
because with {$private_dropdown['dateline']} I had UNIX datetime like "1444702684"
Other thing about PM status. If I used this code:
with {$private_lang_unread} I had always and only "Unread" mark , also on all other PM's already read.
Maybe not 100% perfect but it seems to work
Thank you again

So:
In global.php BEFORE of this line:
// Load appropriate welcome block for the current logged in user
(Thank you Leefish for the place

I added this code:
// Dropdown PM
$query = $db->query("
SELECT pm.subject, pm.pmid, pm.status, pm.dateline, fu.username AS fromusername, fu.uid AS fromuid
FROM ".TABLE_PREFIX."privatemessages pm
LEFT JOIN ".TABLE_PREFIX."users fu on (fu.uid=pm.fromid)
WHERE pm.folder = '1' AND pm.uid = '{$mybb->user['uid']}'
ORDER BY pm.dateline DESC
LIMIT 5
");
$private_dropdown_dateline = my_date($mybb->settings['dateformat'], $private_dropdown['dateline']);
while($private_dropdown = $db->fetch_array($query))
{
$private_dropdown_link = htmlspecialchars_uni($private_dropdown['pmid']);
$private_dropdown_status = htmlspecialchars_uni($private_dropdown['status']);
$private_dropdown_subject = htmlspecialchars_uni($private_dropdown['subject']);
$private_dropdown_fromuser = htmlspecialchars_uni($private_dropdown['fromusername']);
$private_dropdown_dateline = my_date($mybb->settings['dateformat'], $private_dropdown['dateline']);
eval("\$private_dropdown_template_template .= \"".$templates->get("private_dropdown_template_template")."\";");
}
eval("\$private_dropdown_template = \"".$templates->get("private_dropdown_template")."\";");
Created a new template called "private_dropdown_template" with inside only this variable:
{$private_dropdown_template_template}
And created a new template called "private_dropdown_template_template" with status PM (unread/read), date, from user, subject, link to PM:
<if ($private_dropdown['status'] == 0) then>
<a href="private.php?action=read&pmid={$private_dropdown['pmid']}">
<strong>{$private_dropdown_subject} from {$private_dropdown_fromuser}, <span class="icon-stopwatch"></span> <?=my_date($mybb->settings['dateformat'], $private_dropdown['dateline'])?> <?=my_date($mybb->settings['timeformat'], $private_dropdown['dateline'])?> Unread
</strong></a>
<else>
<a href="private.php?action=read&pmid={$private_dropdown['pmid']}">{$private_dropdown_subject} from {$private_dropdown_fromuser}, <span class="icon-stopwatch"></span> <?=my_date($mybb->settings['dateformat'], $private_dropdown['dateline'])?> <?=my_date($mybb->settings['timeformat'], $private_dropdown['dateline'])?></a>
</if>
(With PHP and Template Conditionals Plugin)
The result
I used:
<?=my_date($mybb->settings['dateformat'], $private_dropdown['dateline'])?>
<?=my_date($mybb->settings['timeformat'], $private_dropdown['dateline'])?>
because with {$private_dropdown['dateline']} I had UNIX datetime like "1444702684"
Other thing about PM status. If I used this code:
if($pm['status'] == 0)
{
$private_lang_unread = "<span style=\"font-weight: bold;\">Unread !</span>";
}
if($pm['status'] == 1)
{
$private_lang_unread = "Already read";
}
with {$private_lang_unread} I had always and only "Unread" mark , also on all other PM's already read.
Maybe not 100% perfect but it seems to work

Thank you again
