Solved: 5 Years, 5 Months, 3 Weeks ago Private Message title in dropdown of header_welcomeblock_member?
#12
Solved: 5 Years, 5 Months, 3 Weeks ago
Sorry, very bad period.


It should works:

[Image: pEqQYlY.png]



in global.php edit in:

$query = $db->query("
        SELECT pm.subject, pm.pmid, pm.status, pm.dateline, fu.username AS fromusername, fu.uid AS fromuid, fu.avatar AS useravatar
        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['avatar'] = $private_dropdown['useravatar'];
        $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")."\";"); 


I have added only fu.avatar AS useravatar and $private_dropdown['avatar'] = $private_dropdown['useravatar'];



and in private_dropdown_template_template add:


<img src="{$private_dropdown['avatar']}" alt="" />


where you want add avatar. Obviously you will have to change the style of the avatar (size, position, etc.).
Reply


Messages In This Thread
RE: Private Message title in dropdown of header_welcomeblock_member? - by niere8 - 2016-03-13, 02:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)